[Bug other/20670] New: IA-64 exception mechanism erase $f29

ochem at gnat dot com gcc-bugzilla@gcc.gnu.org
Mon Mar 28 18:15:00 GMT 2005


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



More information about the Gcc-bugs mailing list