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

Problem with GP on IA64

When compiling the GNAT file make.adb with -gnatpga -O2, the following is 
in .sibling:

(call_insn 2695 2694 2697 (parallel[ 
            (set (reg:TI 8 r8)
                (call (mem:DI (symbol_ref/v:DI ("osint__read_library_info")) [0 S8 A64])
                    (const_int 2 [0x2])))
            (use (unspec[ 
                        (reg:DI 1 r1)
                    ]  9))
            (clobber (reg:DI 320 b0))
        ] ) -1 (nil)
    (expr_list (use (reg:QI 121 out1))
        (expr_list (use (reg:SI 120 out0))

(insn 2697 2695 2699 (set (reg:DI 1 r1)
        (reg:DI 458)) -1 (nil)


(insn 2705 2702 2707 (parallel[ 
            (set (reg/f:DI 1160)
                (symbol_ref:DI ("opt__check_object_consistency")))
            (clobber (reg:DI 1161))
            (use (reg:DI 1 r1))
        ] ) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:DI ("opt__check_object_consistency"))

(insn 2707 2705 2708 (set (mem/f:QI (reg/f:DI 1160) [2 opt__check_object_consistency+0 S1 A8])
        (subreg/s/u:QI (reg/v:SI 1133) 0)) -1 (nil)

After CSE, that last insn is:

(insn 2707 2702 2708 (set (mem/f:QI (reg/f:DI 1134) [2 opt__check_object_consistency+0 S1 A8])
        (subreg/s/u:QI (reg/v:SI 1133) 0)) 2 {*movqi_internal} (nil)

Later, it gets a REG_EQUIV note for the MEM and is scheduled before 2697
since there is no reason to do otherwise.

Now reg 1134 doesn't get a pseudo, so reload tries to do the reload
for it by loading the address via GP.  But GP hasn't been restored yet!

So it blows up.

How is this supposed to work?

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