This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30290] left-shift by 16 + int to double conversion broken in optimized code
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Dec 2006 05:22:44 -0000
- Subject: [Bug target/30290] left-shift by 16 + int to double conversion broken in optimized code
- References: <bug-30290-3402@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pluto at agmk dot net 2006-12-26 05:22 -------
v8:
00000000 <SampleDepthOf()>:
0: 81 c3 e0 08 retl
4: 90 10 20 10 mov 0x10, %o0
8: 81 c3 e0 08 retl
c: ae 03 c0 17 add %o7, %l7, %l7
00000010 <pow2test()>:
10: 9d e3 bf 88 save %sp, -120, %sp
14: 2f 00 00 00 sethi %hi(0), %l7
18: 7f ff ff fc call 8 <SampleDepthOf()+0x8>
1c: ae 05 e0 00 add %l7, 0, %l7 ! 0 <SampleDepthOf()>
20: 40 00 00 00 call 20 <pow2test()+0x10>
24: 01 00 00 00 nop
28: 82 10 20 01 mov 1, %g1 ! 1 <SampleDepthOf()+0x1>
2c: 90 02 20 1f add %o0, 0x1f, %o0
30: 83 28 40 08 sll %g1, %o0, %g1
34: c2 27 bf ec st %g1, [ %fp + -20 ]
38: 80 a0 60 00 cmp %g1, 0
3c: d1 07 bf ec ld [ %fp + -20 ], %f8
40: 16 80 00 07 bge 5c <pow2test()+0x4c>
44: 81 a0 19 08 fitod %f8, %f0
48: 03 00 00 00 sethi %hi(0), %g1
4c: 82 10 60 00 mov %g1, %g1 ! 0 <SampleDepthOf()>
50: c4 05 c0 01 ld [ %l7 + %g1 ], %g2
54: d1 18 80 00 ldd [ %g2 ], %f8
58: 81 a0 08 48 faddd %f0, %f8, %f0
5c: 81 c7 e0 08 ret
60: 81 e8 00 00 restore
00000064 <main>:
64: 9d e3 bf 88 save %sp, -120, %sp
68: 2f 00 00 00 sethi %hi(0), %l7
6c: 7f ff ff e7 call 8 <SampleDepthOf()+0x8>
70: ae 05 e0 00 add %l7, 0, %l7 ! 0 <SampleDepthOf()>
74: 40 00 00 00 call 74 <main+0x10>
78: b0 10 20 00 clr %i0
7c: 03 00 00 00 sethi %hi(0), %g1
80: 82 10 60 00 mov %g1, %g1 ! 0 <SampleDepthOf()>
84: c1 3f bf e8 std %f0, [ %fp + -24 ]
88: d0 05 c0 01 ld [ %l7 + %g1 ], %o0
8c: c4 1f bf e8 ldd [ %fp + -24 ], %g2
90: 92 10 00 02 mov %g2, %o1
94: 40 00 00 00 call 94 <main+0x30>
98: 94 10 00 03 mov %g3, %o2
9c: 81 c7 e0 08 ret
a0: 81 e8 00 00 restore
v9:
00000000 <SampleDepthOf()>:
0: 81 c3 e0 08 retl
4: 90 10 20 10 mov 0x10, %o0
00000008 <pow2test()>:
8: 9d e3 bf 88 save %sp, -120, %sp
c: 40 00 00 00 call c <pow2test()+0x4>
10: 01 00 00 00 nop
14: 84 10 20 01 mov 1, %g2 ! 1 <SampleDepthOf()+0x1>
18: 90 02 20 1f add %o0, 0x1f, %o0
1c: 85 28 80 08 sll %g2, %o0, %g2
20: 86 10 00 02 mov %g2, %g3
24: 84 10 20 00 clr %g2
28: c4 3f bf e8 std %g2, [ %fp + -24 ]
2c: d1 1f bf e8 ldd [ %fp + -24 ], %f8
30: 81 cf e0 08 rett %i7 + 8
34: 81 a0 11 08 fxtod %f8, %f0
38: 81 c3 e0 08 retl
3c: ae 03 c0 17 add %o7, %l7, %l7
00000040 <main>:
40: 9d e3 bf 88 save %sp, -120, %sp
44: 2f 00 00 00 sethi %hi(0), %l7
48: 7f ff ff fc call 38 <pow2test()+0x30>
4c: ae 05 e0 00 add %l7, 0, %l7 ! 0 <SampleDepthOf()>
50: 40 00 00 00 call 50 <main+0x10>
54: b0 10 20 00 clr %i0
58: 03 00 00 00 sethi %hi(0), %g1
5c: 82 10 60 00 mov %g1, %g1 ! 0 <SampleDepthOf()>
60: c1 3f bf e8 std %f0, [ %fp + -24 ]
64: d0 05 c0 01 ld [ %l7 + %g1 ], %o0
68: c4 1f bf e8 ldd [ %fp + -24 ], %g2
6c: 92 10 00 02 mov %g2, %o1
70: 40 00 00 00 call 70 <main+0x30>
74: 94 10 00 03 mov %g3, %o2
78: 81 cf e0 08 rett %i7 + 8
7c: 01 00 00 00 nop
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30290