-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISLE: Common accessors for some insn data fields (#3781)
Add accessors to prelude.isle to access data fields of `func_addr` and `symbol_value` instructions. These are based on similar versions I had added to the s390x back-end, but are a bit more straightforward to use. - func_ref_data: Extract SigRef, ExternalName, and RelocDistance fields given a FuncRef. - symbol_value_data: Extract ExternalName, RelocDistance, and offset fields given a GlobalValue representing a Symbol. - reloc_distance_near: Test for RelocDistance::Near. The s390x back-end is changed to use these common versions. Note that this exposed a bug in common isle code: This extractor: (extractor (load_sym inst) (and inst (load _ (def_inst (symbol_value (symbol_value_data _ (reloc_distance_near) offset))) (i64_from_offset (memarg_symbol_offset_sum <offset _))))) would raise an assertion in sema.rs due to a supposed cycle in extractor definitions. But there was no actual cycle, it was simply that the extractor tree refers twice to the `insn_data` extractor (once via the `load` and once via the `symbol_value` extractor). Fixed by checking for pre-existing definitions only along one path in the tree, not across the whole tree.
- Loading branch information
Showing
13 changed files
with
959 additions
and
882 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
cranelift/codegen/src/isa/aarch64/lower/isle/generated_code.manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
src/clif.isle 9ea75a6f790b5c03 | ||
src/prelude.isle 6aaf8ce0f5a5c2ec | ||
src/prelude.isle 73285cd431346d53 | ||
src/isa/aarch64/inst.isle dafd813ba278ce19 | ||
src/isa/aarch64/lower.isle 2d2e1e076a0c8a23 |
22 changes: 14 additions & 8 deletions
22
cranelift/codegen/src/isa/aarch64/lower/isle/generated_code.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
cranelift/codegen/src/isa/s390x/lower/isle/generated_code.manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
src/clif.isle 9ea75a6f790b5c03 | ||
src/prelude.isle 6aaf8ce0f5a5c2ec | ||
src/isa/s390x/inst.isle 1ae3c0f9c956affd | ||
src/isa/s390x/lower.isle d18ee0bff12cad4e | ||
src/prelude.isle 73285cd431346d53 | ||
src/isa/s390x/inst.isle 87a2d7c0c69d0324 | ||
src/isa/s390x/lower.isle 3c124e26bc411983 |
Oops, something went wrong.