Stream: git-wasmtime

Topic: wasmtime / PR #2426 Carry `MemFlag`s on loads/stores in M...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 19:09):

cfallin requested julian-seward1 for a review on PR #2426.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 19:09):

cfallin opened PR #2426 from machinst-trap-info to main:

x64 and aarch64: carry MemFlags on loads/stores; don't emit trap info unless an op can trap.

This end result was previously enacted by carrying a `SourceLoc` on
every load/store, which was somewhat cumbersome, and only indirectly
encoded metadata about a memory reference (can it trap) by its presence
or absence. We have a type for this -- `MemFlags` -- that tells us
everything we might want to know about a load or store, and we should
plumb it through to code emission instead.

This PR attaches a `MemFlags` to an `Amode` on x64, and puts it on load
and store `Inst` variants on aarch64. These two choices seem to factor
things out in the nicest way: there are relatively few load/store insts
on aarch64 but many addressing modes, while the opposite is true on x64.

Includes #2389 as prerequisite; will rebase out that commit once #2389 lands.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 19:10):

cfallin edited PR #2426 from machinst-trap-info to main:

x64 and aarch64: carry MemFlags on loads/stores; don't emit trap info unless an op can trap.

This end result was previously enacted by carrying a SourceLoc on
every load/store, which was somewhat cumbersome, and only indirectly
encoded metadata about a memory reference (can it trap) by its presence
or absence. We have a type for this -- MemFlags -- that tells us
everything we might want to know about a load or store, and we should
plumb it through to code emission instead.

This PR attaches a MemFlags to an Amode on x64, and puts it on load
and store Inst variants on aarch64. These two choices seem to factor
things out in the nicest way: there are relatively few load/store insts
on aarch64 but many addressing modes, while the opposite is true on x64.

Includes #2389 as prerequisite; will rebase out that commit once #2389 lands.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 19:11):

cfallin updated PR #2426 from machinst-trap-info to main:

x64 and aarch64: carry MemFlags on loads/stores; don't emit trap info unless an op can trap.

This end result was previously enacted by carrying a SourceLoc on
every load/store, which was somewhat cumbersome, and only indirectly
encoded metadata about a memory reference (can it trap) by its presence
or absence. We have a type for this -- MemFlags -- that tells us
everything we might want to know about a load or store, and we should
plumb it through to code emission instead.

This PR attaches a MemFlags to an Amode on x64, and puts it on load
and store Inst variants on aarch64. These two choices seem to factor
things out in the nicest way: there are relatively few load/store insts
on aarch64 but many addressing modes, while the opposite is true on x64.

Includes #2389 as prerequisite; will rebase out that commit once #2389 lands.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 17 2020 at 19:43):

cfallin updated PR #2426 from machinst-trap-info to main:

x64 and aarch64: carry MemFlags on loads/stores; don't emit trap info unless an op can trap.

This end result was previously enacted by carrying a SourceLoc on
every load/store, which was somewhat cumbersome, and only indirectly
encoded metadata about a memory reference (can it trap) by its presence
or absence. We have a type for this -- MemFlags -- that tells us
everything we might want to know about a load or store, and we should
plumb it through to code emission instead.

This PR attaches a MemFlags to an Amode on x64, and puts it on load
and store Inst variants on aarch64. These two choices seem to factor
things out in the nicest way: there are relatively few load/store insts
on aarch64 but many addressing modes, while the opposite is true on x64.

Includes #2389 as prerequisite; will rebase out that commit once #2389 lands.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2020 at 09:48):

julian-seward1 submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 18 2020 at 16:23):

cfallin merged PR #2426.


Last updated: Dec 23 2024 at 12:05 UTC