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 c/12978] New: problem with -fweb and c4x target


The c4x target fails to compile the
gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c with -O3.
The problem is that since -fweb is enabled the memcpy call that is used in the
trampoline function is not working anymore.
Before the web pass the memcpy looks like:

(insn 51 50 52 0 (parallel [
            (set (mem:BLK (reg/f:QI 47) [0 A32])
                (mem:BLK (reg/f:QI 48) [0 A32]))
            (use (const_int 10 [0xa]))
            (use (const_int 1 [0x1]))
            (clobber (reg:QI 49))
            (clobber (reg/f:QI 47))
            (clobber (reg/f:QI 48))
            (clobber (reg:QI rs)) 
            (clobber (reg:QI re))
            (clobber (reg:QI rc))
        ]) 212 {movstrqi_large} (nil)
    (expr_list:REG_EQUAL (mem:BLK (symbol_ref:QI ("*LTRAMP0") [flags 0x2]) [0 A32])
        (nil)))

After the web pass hass run the mempcy looks like:
(insn 51 50 52 0 (parallel [
            (set (mem:BLK (reg/f:QI 47) [0 A32])
                (mem:BLK (reg/f:QI 48) [0 A32]))
            (use (const_int 10 [0xa]))
            (use (const_int 1 [0x1]))
            (clobber (reg:QI 49))
            (clobber (reg/f:QI 54))
            (clobber (reg/f:QI 53))
            (clobber (reg:QI rs))
            (clobber (reg:QI re))
            (clobber (reg:QI rc))
        ]) 212 {movstrqi_large} (nil)
    (expr_list:REG_EQUAL (mem:BLK (symbol_ref:QI ("*LTRAMP0") [flags 0x2]) [0 A32])
        (nil)))

The web pass has created new registers for the clobbers that are present here.
This means the code after this memcpy call asumes now that the registers are
not modified! The must be a bug in the web pass.

-- 
           Summary: problem with -fweb and c4x target
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hermantenbrugge at home dot nl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: c4x
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: c4x


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


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