This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
loading registers before shift operations
- From: Danish Samad <danishsamad at yahoo dot com>
- To: gcc at gcc dot gnu dot org, syed_rauf_ul_hassan at hotmail dot com
- Date: Thu, 14 Mar 2002 05:05:59 -0800 (PST)
- Subject: 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/