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]

[3.3/3.4/4.0/4.1] IA-64 FP register file corruption on unwind


This is for PR 20670, which reports a problem that turned up in Ada
code.  When installing an unwind context, the FP registers from f29 to
f31 get reloaded with the wrong values.  This was reported without a
testcase, but I managed to write a C++ one that shows the problem.

The fix is fairly simple.  There is some hand written assembly code in
the unwind-ia64.c file for restoring registers that accidentally missed
one instruction to load the address register r27 before using it to
reload f29.  This is turn causes the later FP registers to also get the
wrong value.

I consider this a serious problem with no easy workaround, and would
like to install it in as many places as possible.  Since this has always
been broken, this is not a regression, and thus does not qualify under
the normal rules for branches.  I believe I can self approve it for the
gcc-4.0 branch, but I believe I need permission for the gcc-3.4 and
gcc-3.3 branches.

This patch has been tested on ia64-linux with gcc-3.4 and gcc-4.0
bootstraps and make checks, with no regressions.  gcc-3.3 testing is in
progress, and mainline testing will follow.

I am not very familiar with the C++ testsuite, but I assume I can just
drop it into g++.dg/eh/fp-regs.C with some appropriate dg comments.  I
haven't tried to do this yet.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

Attachment: patch.unwind.r27
Description: Text document


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