Issue with reload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I am working on a custom front-end, ran in an issue with reload. (step 277).
The GCC version is 9.2.0

a. After expand, (step 234), I get:

(insn 228 227 229 15 (set (reg:SI 186 [ x__lsm.224 ])
        (zero_extend:SI (subreg:HI (reg:SI 378) 0))) "/home/henri/blueICe/gcc/newlib/newlib/libc/stdlib/ldtoa.c":784:5 43 {zero_extendhisi2_internal}
     (nil))

b. The machine does have the instruction to do this. (zero_extendhisi2_internal). Here is the pattern description:

(define_insn "zero_extendhisi2_internal"
  [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r,r")
        (zero_extend:SI (match_operand:HI 1 "movhi_operand_0" "Z,C,r")))]

c. Then the whole code runs through reload, and there it somewhere goes wrong.    The reloader changes the target register, and the operation gets distorted.
   The subregging operation is gone !!.

 583: r990:SI=zero_extend(r378:SI#0)

d. This then leads further to error. The reloader restructures:

 583: r990:SI=zero_extend(r1056:HI)
    Inserting slow/invalid mem reload before:
 1381: r1055:SI=[sfp:SI+0x2c]
 1382: r1056:HI=r1055:SI#0

but the last operation (1382) is impossible. The reloader gets in an infinite loop, and crashes on
max. number of reloads reached.

Now, yes, obviously, I made a mistake .. But where to look ?. What did I do wrong the subreg got lost ?.

Best Regards,

Henri.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux