A tagged instruction pointer built by scheduled code is a proved reference #659
Loading…
Reference in a new issue
No description provided.
Delete branch "rpg-9-ax-scheduled-pointer-20261029"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A tagged instruction pointer built by scheduled code is a proved reference
The constant area holds tagged instruction pointers that the code builds:
addi A, r28, D; li T, 0xa2; rldicr P, T, 56, 7; settag; stq Pwith P evenand A = P + 1.
constant_references.constructorproves a pointer only fromthat exact, contiguous sequence. In programs with file I/O the compiler
schedules the steps among unrelated loads and stores and orders them as the
data allows (shared-io-full:
li r3,0xa2; addi r27,r28,0x10; lwz; rldicr r26,r3; settag; stw; extsw; stw; stq r26, andsettagbeforerldicrelsewhere). Those pointers stayed unproved: their bytes were compared as they
are, and a relocated twin differed in
constant_area(17 unproved pointers inshared-io-full, 0 after this change; the counts of the previous change).
scheduledproves the same steps by a forward data flow over the procedure:per register it knows
li 0xa2, the tag (rldicrof that), a copy of it(
ori P, Q, 0), or an addressr28 + D, met over the decoded branches; a callclears the volatile registers (r0, r3 to r12) and the settag; the code
addresses that the constant area's instruction pointers name (the computed
return points) and every instruction without p-code but
settagand thetraps know nothing. A
stq Pof a pair with the tag in P,r28 + Din P + 1and a settag before it proves the pointer at D;
instructionPointerstillchecks its 16 bytes. The tag kept in a register from an earlier pointer
(
addi r27, r28, 0x308; stq r26) is proved the same way.The owner check of a computed return is scheduled the same way:
ld r3,0(r27); ld r4,0x3e0(r28); ld r0,8(r27); tdne r4,r0; mtctr r3; bctrputs the targetload first.
ownerCheckReorderedaccepts the three loads in any order whenthey are exactly the three instructions before the trap. shared-io-full has no
unproved pointer left (17 before).
Gates