On Thu, Sep 24, 2009 at 3:11 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: > "Kim, Eunchan" <helpbygrace@xxxxxxxxx> writes: > >> I found reg/f means that it is frame related register. But i didn't >> understand why my sp, which is elim in this function, is (reg:SI) not >> (reg/f:SI). >> >> does anyone know why this is happened? > > Look at your ELIMINABLE_REGS macro. There is most likely something > wrong with it. Or you have defined STACK_POINTER_REGNUM and > HARD_FRAME_POINTER_REGNUM to have the same value, or something like > that. > > Ian > Thank you Ian for replying. I change ELIMINABLE_REGS to ARG -> STACK ARG -> FRAME FRAME -> STACK then i could compile with -g option. But I failed compiling with -O2 and -g. So i printed what is difference between -O2 -g and only -g. when i compiled with -g. Before i modify ELIMINABLE_REGS, elim was (reg/f:SI 10 r10) . which is actually ARG_POINTER_REGNUM. So it seems to be changed to STACK_POINTER after editing ELIMINABLE_REGS. But as i mentioned above, when i compiled with '-O2 -g', the elim was (reg:SI 12 r12) . 12 is STACK_POINTER_REGNUM). I don't know why this happened. elim should be (reg/f:SI 12 r12). Eunchan