You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Store not just the start but also the end of the load instructions in the custom section.
Load instructions are usually 3 bytes in x64 but extend to 4 if loading from R12 or RSP. We pack the distinction into an array of bits to save perhaps several K of rather hot cache.
.expect(".wasmtime.epochchecks section should be long enough to contain a length bit for each epoch check");
42
48
43
49
// The emitted machine code is nailed down by the
44
50
// epoch-interruption-mmu-compile-loop.wat disas test. As long as that keeps
45
-
// passing, these offsets remain valid.
51
+
// passing, these values remain valid.
52
+
assert_eq!(
53
+
starts,
54
+
vec![12,15],
55
+
"There should be 2 epoch checks (function prologue & loop backedge). The offset of the prologue's dead load should be 12, and that of the loop's backedge should be 15."
56
+
);
46
57
assert_eq!(
47
-
offsets,
48
-
vec![15,18],
49
-
"There should be 2 epoch checks (function prologue & loop backedge). The offset after the prologue's dead load should be 15, and the one after the loop's backedge should be 18."
58
+
length_bits,
59
+
vec![0],
60
+
"Neither check's load instruction uses R12 of RSP as its source, so all length bits should be 0."
0 commit comments