Re: Bad offset to struct member in generated code

2007-12-04 Thread Ian Lance Taylor
"Paul Zimmerman" <[EMAIL PROTECTED]> writes: > For the second line, gcc will reuse the same address register, and > generate an indirect 32-bit load with an offset of -5 to fetch the > value of 'testme.a'. But on our custom processor, the offsets of > indirect load instructions are scaled by the s

Bad offset to struct member in generated code

2007-12-04 Thread Paul Zimmerman
Hi, I have a problem while porting gcc to a custom processor. Here is a simplified example: struct big_struct { ... int a; char b; char c; ... } testme; char char_tmp; int int_tmp; int testit(void) { char_tmp = testme.c; int_tmp = testme.a