Because my machine only sup****t 8-bit frame pointer offset, the offset
of local variable addressed by the frame pointer is -128~127.
Otherwise, the address is stored in another register.
This is a piece of my rule:
adr: ADDRLP4 "fp+%a" range(a, 0, 127)
adr: reg "%0+0"
reg: ADDRLP4 "add %c, fp, %a;\n" 6
This is the dumpcover infromation, b0 is one register of my machine:
ASGNI4(ADDRLP4(17), INDIRI4(VREGP(b0)))
dumpcover(613058) = stmt: ASGNI4(adr4,reg) / st32 %1, %0;
dumpcover(613010) = adr4: adr / %0
dumpcover(613010) = adr: reg / %0+0
dumpcover(613010) = reg: ADDRLP4 / add %c, fp, %a;
dumpcover(612fc8) = reg: INDIRI4(VREGP) / # read register
This is the generated code:
ld32 b0, fp+32;
add b0, fp, 152;
st32 b0, b0+0;
Clearly, the b0 register is overridden by the ADDRLP4 register.
What should i do?


|