This is the mail archive of the gcc-bugs@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]

[Bug target/38941] CX isn't preserved with shift



------- Comment #8 from hjl dot tools at gmail dot com  2009-01-24 00:08 -------
Reload can't deal with:

[hjl@gnu-6 reg-1]$ cat f.i
int
bar (int g)
{
    register int x __asm__("ecx");
    x = 8;
    if ((1 << g) != x)
      return 0;
    return x;
}
[hjl@gnu-6 reg-1]$ /export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -m32 -O0  f.i -S -o f.s
f.i: In function ?bar?:
f.i:9: error: unable to find a register to spill in class ?CREG?
f.i:9: error: this is the insn:
(insn 8 7 9 2 f.i:6 (parallel [
            (set (reg:SI 1 dx [orig:60 D.1249 ] [60])
                (ashift:SI (reg:SI 1 dx [63])
                    (subreg:QI (reg:SI 0 ax [62]) 0)))
            (clobber (reg:CC 17 flags))
        ]) 495 {*ashlsi3_1} (expr_list:REG_DEAD (reg:SI 1 dx [63])
        (expr_list:REG_DEAD (reg:SI 0 ax [62])
            (expr_list:REG_UNUSED (reg:CC 17 flags)
                (nil)))))
f.i:9: internal compiler error: in spill_failure, at reload1.c:2093
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 reg-1]$ 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38941


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