Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers LCC > local variable ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 974 of 1062
Post > Topic >>

local variable problem

by zhongho <zhonghochen@[EMAIL PROTECTED] > Aug 27, 2007 at 10:02 AM

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?
 




 1 Posts in Topic:
local variable problem
zhongho <zhonghochen@[  2007-08-27 10:02:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 23:54:49 CDT 2008.