public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/20670] New: IA-64 exception mechanism erase $f29
@ 2005-03-28 18:15 ochem at gnat dot com
  2005-03-28 18:31 ` [Bug other/20670] " ochem at gnat dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: ochem at gnat dot com @ 2005-03-28 18:15 UTC (permalink / raw)
  To: gcc-bugs

There is some strange behavihour about the register f29 (and may be the next 
floating registers) when an exception is raised. Its value is not properly 
loaded. Going into the sources of gcc, I found sth interresting there : 
 
unwind-ia64.c:2298:"(p7) ldf.fill f29 = [r27]              \n\t" 
 
before this assingment, $f29 has the right value. Since it hasn't be used (ie 
it wasn't saved by anything), as far as I understand, it shouldn't be modified 
here, but it is. My belief is that there is sth wrong with r27. Here is a 
little extract of the few lines above : 
 
2258: "ld8 r22 = [r20], 8                     \n\t" 
2259: "(p6) ldf.fill f18 = [r24]              \n\t" 
2260: "cmp.ne p7, p0 = r0, r25                \n\t" 
2261: ";;                                     \n\t" 
2262: "ld8 r23 = [r20], 8                     \n\t" 
2263: "(p7) ldf.fill f19 = [r25]              \n\t" 
2264: "cmp.ne p6, p0 = r0, r26                \n\t" 
2265: ";;                                     \n\t" 
2266: "ld8 r24 = [r20], 8                     \n\t" 
2267: "(p6) ldf.fill f20 = [r26]              \n\t" 
2268: "cmp.ne p7, p0 = r0, r27                \n\t" 
2269: ";;                                     \n\t" 
2270: "ld8 r25 = [r20], 8                     \n\t" 
2271: "(p7) ldf.fill f21 = [r27]              \n\t" 
2272: "cmp.ne p6, p0 = r0, r28                \n\t" 
2273: ";;                                     \n\t" 
2274: "ld8 r26 = [r20], 8                     \n\t" 
2275: "(p6) ldf.fill f22 = [r28]              \n\t" 
2276: "cmp.ne p7, p0 = r0, r29                \n\t" 
2277: ";;                                     \n\t" 
2278: "ld8 r28 = [r20], 8                     \n\t" 
2279: "(p7) ldf.fill f23 = [r29]              \n\t" 
2280: "cmp.ne p6, p0 = r0, r22                \n\t" 
2281: ";;                                     \n\t" 
2282: "ld8 r29 = [r20], 8                     \n\t" 
2283: "(p6) ldf.fill f24 = [r22]              \n\t" 
2284: "cmp.ne p7, p0 = r0, r23                \n\t" 
2285: ";;                                     \n\t" 
2286: "(p7) ldf.fill f25 = [r23]              \n\t" 
2287: "cmp.ne p6, p0 = r0, r24                \n\t" 
2288: "cmp.ne p7, p0 = r0, r25                \n\t" 
2289: ";;                                     \n\t" 
2290: "(p6) ldf.fill f26 = [r24]              \n\t" 
2291: "(p7) ldf.fill f27 = [r25]              \n\t" 
2292: "cmp.ne p6, p0 = r0, r26                \n\t" 
2293: ";;                                     \n\t" 
2294: "(p6) ldf.fill f28 = [r26]              \n\t" 
2295: "cmp.ne p7, p0 = r0, r27                \n\t" 
2296: "cmp.ne p6, p0 = r0, r28                \n\t" 
2297: ";;                                     \n\t" 
2298: "(p7) ldf.fill f29 = [r27]              \n\t" 
 
As you see, r27 is used to fill the value of f21. Like r26 for f20, r25 for f19 
etc. But, while r25, r26, r28 and so are reloaded before filling the last float 
registers, r27 seems to be missing, so its value for f29 is the same as the one 
used for f21. The fix seems to be quite light, just add the proper load for r27 
at the right place.

-- 
           Summary: IA-64 exception mechanism erase $f29
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ochem at gnat dot com
                CC: gcc-bugs at gcc dot gnu dot org,ochem at gnat dot com
 GCC build triplet: 3.4.4
  GCC host triplet: 3.4.4
GCC target triplet: 3.4.4


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug other/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
@ 2005-03-28 18:31 ` ochem at gnat dot com
  2005-03-28 19:06 ` [Bug target/20670] " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ochem at gnat dot com @ 2005-03-28 18:31 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|3.4.4                       |ia-64


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
  2005-03-28 18:31 ` [Bug other/20670] " ochem at gnat dot com
@ 2005-03-28 19:06 ` pinskia at gcc dot gnu dot org
  2005-03-30  3:40 ` wilson at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-28 19:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
          Component|other                       |target
           Keywords|                            |wrong-code


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
  2005-03-28 18:31 ` [Bug other/20670] " ochem at gnat dot com
  2005-03-28 19:06 ` [Bug target/20670] " pinskia at gcc dot gnu dot org
@ 2005-03-30  3:40 ` wilson at gcc dot gnu dot org
  2005-03-30 20:13 ` ochem at gnat dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-03-30  3:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2005-03-30 03:40 -------
Egads.  Register corruption when unwinding.  This looks like a serious problem.
 Not a regression, but I'm tempted to try to fix it in every current release.

A work around is to use the libunwind package instead.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-30 03:40:37
               date|                            |


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (2 preceding siblings ...)
  2005-03-30  3:40 ` wilson at gcc dot gnu dot org
@ 2005-03-30 20:13 ` ochem at gnat dot com
  2005-04-05  4:22 ` wilson at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ochem at gnat dot com @ 2005-03-30 20:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ochem at gnat dot com  2005-03-30 20:13 -------
The test case is ok, I get an abort if I compile it with -O2 option on a 3.4 
compiler. 

-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (3 preceding siblings ...)
  2005-03-30 20:13 ` ochem at gnat dot com
@ 2005-04-05  4:22 ` wilson at gcc dot gnu dot org
  2005-04-06  3:48 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-04-05  4:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2005-04-05 04:22 -------
Yes, that is the same patch I independently wrote and started testing over the
weekend.  It has already passed testing for the gcc-3.4 and gcc-4.0 branches.  I
have yet to do mainline and gcc-3.3 testing.  Also, I have yet to seek approval
for older branches, which I will be doing shortly.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |wilson at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-03-30 03:40:37         |2005-04-05 04:22:47
               date|                            |


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (4 preceding siblings ...)
  2005-04-05  4:22 ` wilson at gcc dot gnu dot org
@ 2005-04-06  3:48 ` cvs-commit at gcc dot gnu dot org
  2005-04-06  3:50 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-06  3:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-06 03:48 -------
Subject: Bug 20670

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	wilson@gcc.gnu.org	2005-04-06 03:48:34

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: unwind-ia64.c 

Log message:
	Fix problem with reg f29 being corrupted when unwinding stack.
	PR target/20670
	* unwind-ia64.c (uw_intall_context): Add missing load of r27.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.832&r2=2.2326.2.833
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/unwind-ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.21.4.2&r2=1.21.4.3



-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (5 preceding siblings ...)
  2005-04-06  3:48 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-06  3:50 ` cvs-commit at gcc dot gnu dot org
  2005-04-06 19:11 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-06  3:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-06 03:50 -------
Subject: Bug 20670

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	wilson@gcc.gnu.org	2005-04-06 03:50:37

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: unwind-ia64.c 

Log message:
	Fix problem with reg f29 being corrupted when unwinding stack.
	PR target/20670
	* unwind-ia64.c (uw_intall_context): Add missing load of r27.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.135&r2=2.7592.2.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/unwind-ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.28.28.1&r2=1.28.28.2



-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (6 preceding siblings ...)
  2005-04-06  3:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-06 19:11 ` cvs-commit at gcc dot gnu dot org
  2005-04-13  0:50 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-06 19:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-06 19:11 -------
Subject: Bug 20670

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	wilson@gcc.gnu.org	2005-04-06 19:11:36

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: unwind-ia64.c 

Log message:
	Fix problem with reg f29 being corrupted when unwinding stack.
	PR target/20670
	* unwind-ia64.c (uw_intall_context): Add missing load of r27.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.1063&r2=1.16114.2.1064
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/unwind-ia64.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.13.2.4&r2=1.13.2.5



-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (7 preceding siblings ...)
  2005-04-06 19:11 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-13  0:50 ` cvs-commit at gcc dot gnu dot org
  2005-04-13  0:58 ` wilson at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-13  0:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-13 00:50 -------
Subject: Bug 20670

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	wilson@gcc.gnu.org	2005-04-13 00:50:34

Modified files:
	gcc            : ChangeLog 
	gcc/config/ia64: unwind-ia64.c 

Log message:
	Fix problem with FP reg r29 being corrupted on stack unwind.
	PR target/20670
	* unwind-ia64.c (uw_intall_context): Add missing load of r27.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8258&r2=2.8259
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/ia64/unwind-ia64.c.diff?cvsroot=gcc&r1=1.30&r2=1.31



-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (8 preceding siblings ...)
  2005-04-13  0:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-13  0:58 ` wilson at gcc dot gnu dot org
  2005-04-20  1:45 ` cvs-commit at gcc dot gnu dot org
  2005-04-20  2:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-04-13  0:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wilson at gcc dot gnu dot org  2005-04-13 00:58 -------
Fixed on all active release branches and mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |3.3.6 3.4.4 4.0.0
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (9 preceding siblings ...)
  2005-04-13  0:58 ` wilson at gcc dot gnu dot org
@ 2005-04-20  1:45 ` cvs-commit at gcc dot gnu dot org
  2005-04-20  2:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-20  1:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-20 01:45 -------
Subject: Bug 20670

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	wilson@gcc.gnu.org	2005-04-20 01:44:58

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/eh: fp-regs.C 

Log message:
	Testcase to verify that FP regs are properly saved/restored across unwind.
	PR target/20670
	* g++.dg/eh/fp-regs.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5371&r2=1.5372
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/eh/fp-regs.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/20670] IA-64 exception mechanism erase $f29
  2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
                   ` (10 preceding siblings ...)
  2005-04-20  1:45 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-20  2:08 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-20  2:08 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.3.6


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-04-20  2:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-28 18:15 [Bug other/20670] New: IA-64 exception mechanism erase $f29 ochem at gnat dot com
2005-03-28 18:31 ` [Bug other/20670] " ochem at gnat dot com
2005-03-28 19:06 ` [Bug target/20670] " pinskia at gcc dot gnu dot org
2005-03-30  3:40 ` wilson at gcc dot gnu dot org
2005-03-30 20:13 ` ochem at gnat dot com
2005-04-05  4:22 ` wilson at gcc dot gnu dot org
2005-04-06  3:48 ` cvs-commit at gcc dot gnu dot org
2005-04-06  3:50 ` cvs-commit at gcc dot gnu dot org
2005-04-06 19:11 ` cvs-commit at gcc dot gnu dot org
2005-04-13  0:50 ` cvs-commit at gcc dot gnu dot org
2005-04-13  0:58 ` wilson at gcc dot gnu dot org
2005-04-20  1:45 ` cvs-commit at gcc dot gnu dot org
2005-04-20  2:08 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).