This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

loading registers before shift operations


hello,

the following c code:

long i;
long j;
  i = 64;
  j = 1;
  i = i<<j;
 
produces the following rtl to load the value of j:
(insn 27 25 29 (set (reg:SI 44)
        (symbol_ref:SI ("j"))) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:SI ("j"))
        (nil)))

(insn 29 27 31 (set (reg:SI 45)
        (sign_extend:SI (mem/f:HI (reg:SI 44) 0))) -1
(nil)
    (nil))

I donot understand why does it sign extend while
loading? why doesnt it use the define_expand movsi
pattern to load the value? I have defined long
variables to be 32 bit. please respond

regards,
danish  

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]