THE FOLD / RESPAWN / EVENT HORIZON / THE REACH OF A BRANCH
THE REACH OF A BRANCH
how far a call can see
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A branch instruction has to fit its destination inside itself. ARM64 gives an unconditional call 26 bits of signed displacement, scaled by four; a conditional branch gets only 19. That is not a detail of encoding — it is a hard ceiling on how far apart two pieces of a program can sit before the call between them stops being a single instruction and becomes a detour through a trampoline.
LIT verified live from the field widths. A
LIT verified live from the field widths. A
BL reaches +134,217,724 bytes forward and −134,217,728 backward — exactly ±128 MiB, because 225 words × 4 = 227 bytes. A conditional branch reaches only ±1 MiB, 128× less. The boundary is exact rather than approximate: 227−4 fits in one instruction and 227 does not.2 HOW IT WAS WEAVED · AI + HUMAN
David (human) built the linker that makes this concrete.
AVAN (AI) should keep the scale honest. i13’s whole image is 127 words — 508 bytes — so nothing in this program is remotely near the ceiling; the limit is real but this compiler will never meet it. What makes it worth a sphere is that the ceiling is a property of the instruction, not of the program: it was fixed in 2011 when the encoding was frozen, and every ARM64 binary ever written has been laid out inside it.
link.js lays each region out, computes a displacement per call site, and — crucially — reports anything it cannot resolve rather than leaving it at zero. A displacement that will not fit is the same class of problem as a symbol that is not there: something the linker must refuse rather than approximate.AVAN (AI) should keep the scale honest. i13’s whole image is 127 words — 508 bytes — so nothing in this program is remotely near the ceiling; the limit is real but this compiler will never meet it. What makes it worth a sphere is that the ceiling is a property of the instruction, not of the program: it was fixed in 2011 when the encoding was frozen, and every ARM64 binary ever written has been laid out inside it.
3 ONE DIMENSION
How far each kind of branch can see, on one line.
4 TWO DIMENSIONS · INTERACTIVE
Move the target further away until one instruction stops being enough.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the sphere of everything one call can reach.
AVAN’s addition (the inverse-companion): the forward reading is “the field width limits how far you can call.” The inverse is that the limit is what makes the instruction one word long. A call that could reach anywhere would need a full 64-bit address, which does not fit beside an opcode — so it would take several instructions, or a load from memory, and every call in every program would pay for a distance almost none of them travel. Read backwards, 26 bits is not a shortage but a bet: that code which calls tends to sit near the code it calls. It is a claim about how programs are shaped, frozen into silicon, and it has held for fifteen years.
LIT derived from the field widths, a BL reaches +134,217,724 bytes forward and -134,217,728 backward - exactly plus or minus 128 MiB, because 2^25 words times 4 is 2^27 bytes; a conditional branch carries only imm19 and reaches plus or minus 1 MiB, 128 times less; and the boundary is exact rather than approximate, since 2^27-4 fits in one instruction and 2^27 does not
FIG David built the linker that makes this concrete: link.js lays each region out, computes a displacement per call site, and REPORTS anything it cannot resolve rather than leaving it at zero - a displacement that will not fit being the same class of problem as a symbol that is not there. AVAN keeps the scale honest: i13's whole image is 127 words, 508 bytes, so nothing in this program comes remotely near the ceiling. What makes it worth a sphere is that the ceiling belongs to the INSTRUCTION rather than the program - fixed in 2011 when the encoding was frozen, and every ARM64 binary since has been laid out inside it.
FIG David built the linker that makes this concrete: link.js lays each region out, computes a displacement per call site, and REPORTS anything it cannot resolve rather than leaving it at zero - a displacement that will not fit being the same class of problem as a symbol that is not there. AVAN keeps the scale honest: i13's whole image is 127 words, 508 bytes, so nothing in this program comes remotely near the ceiling. What makes it worth a sphere is that the ceiling belongs to the INSTRUCTION rather than the program - fixed in 2011 when the encoding was frozen, and every ARM64 binary since has been laid out inside it.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of EVENT HORIZON · David Lee Wise (ROOT0), with AVAN