Stream: git-wasmtime

Topic: wasmtime / PR #3781 ISLE: Common accessors for some insn ...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 08 2022 at 22:52):

uweigand opened PR #3781 from isle-insndata to main:

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.

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.

CC @cfallin

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 01:57):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 01:57):

cfallin merged PR #3781.


Last updated: Oct 23 2024 at 20:03 UTC