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

[PING][PATCH, ARM] Fix PR63718, Thumb1 bootstrap -- disable fuse-caller-save for Thumb1


On 20-11-14 12:54, Tom de Vries wrote:
Richard,

This patch fixes PR63718, which currently breaks Thumb1 bootstrap.

The problem is that in Thumb1 mode, we emit the epilogue in RTL, but the last
insn - epilogue_insns - does not accurately model the corresponding insns
emitted in the asm file. F.i., the asm file may contain an insn:
...
   pop     {r0}
....
while the corresponding RTL pattern looks like this:
...
(jump_insn (unspec_volatile [
             (return)
          ] VUNSPEC_EPILOGUE))
...

As a consequence, the epilogue may clobber registers without fuse-caller-save
being able to analyze that.

Adding the missing clobbers to epilogue_insns is not trivial, and probably not a
good idea for stage3. The patch works around the problem by disabling
fuse-caller-save in Thumb1 mode.

Build and reg-tested on arm-none-eabi.

OK for stage3?


Ping.

Thanks,
- Tom


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