aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/rt.zc
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/rt.zc')
-rw-r--r--src/runtime/rt.zc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/rt.zc b/src/runtime/rt.zc
index 7089e26..f1414e4 100644
--- a/src/runtime/rt.zc
+++ b/src/runtime/rt.zc
@@ -87,6 +87,10 @@ enhance ishl(a, b) micro "a = shl a b";
enhance lfa(k) micro "r1 = ld 589824; k = add r1 k";
// 1 when i is outside 0..n-1 (the unsigned compare also catches negative i), else 0.
enhance outside(i, n) micro "i = ltu i n; i = xor i 1";
+//: the block length has exactly two definitions, which must agree: the r7 lines of this
+//: recipe (the inline check on every backend; the x86-64 and arm64 jits lower it to
+//: registers, with nothing pointer-specific of their own) and paylen below (bchk's report).
+//: an exact-size check or a new header layout changes those two places and nothing else.
// the index check of a pointer, as one instruction: 1 when p is the start of a heap
// block (its check word p[-3] is p ^ MAGIC) and the byte or word offset i * m is not
// inside the block's payload (q units per word: 1 for word elements, 8 for packed