This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/18749] GCC fails to mark stack-popping instruction in unwind-info
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Dec 2004 00:21:12 -0000
- Subject: [Bug target/18749] GCC fails to mark stack-popping instruction in unwind-info
- References: <20041201024833.18749.davidm@hpl.hp.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-21 00:21 -------
"xgcc (GCC) 4.0.0 20041220 (experimental)" produces this:
$ ./xgcc -c -B. -O2 bug.c
$ objdump -d bug.o
bug.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <func>:
0: 48 89 5c 24 e0 mov %rbx,0xffffffffffffffe0(%rsp)
5: 48 89 6c 24 e8 mov %rbp,0xffffffffffffffe8(%rsp)
a: 89 fb mov %edi,%ebx
c: 4c 89 64 24 f0 mov %r12,0xfffffffffffffff0(%rsp)
11: 4c 89 6c 24 f8 mov %r13,0xfffffffffffffff8(%rsp)
16: 48 81 ec 28 10 00 00 sub $0x1028,%rsp
1d: 85 ff test %edi,%edi
1f: 7f 36 jg 57 <func+0x57>
21: 89 d8 mov %ebx,%eax
23: 48 8b ac 24 10 10 00 mov 0x1010(%rsp),%rbp
2a: 00
2b: 4c 8b a4 24 18 10 00 mov 0x1018(%rsp),%r12
32: 00
33: c1 e8 1f shr $0x1f,%eax
36: 4c 8b ac 24 20 10 00 mov 0x1020(%rsp),%r13
3d: 00
3e: 01 d8 add %ebx,%eax
40: 48 8b 9c 24 08 10 00 mov 0x1008(%rsp),%rbx
47: 00
48: d1 f8 sar %eax
4a: 48 98 cltq
4c: 8b 04 84 mov (%rsp,%rax,4),%eax
4f: 48 81 c4 28 10 00 00 add $0x1028,%rsp
56: c3 retq
57: 44 8d 6b ff lea 0xffffffffffffffff(%rbx),%r13d
5b: 45 31 e4 xor %r12d,%r12d
5e: 48 89 e5 mov %rsp,%rbp
61: 44 89 ef mov %r13d,%edi
64: 41 ff c4 inc %r12d
67: e8 00 00 00 00 callq 6c <func+0x6c>
6c: 89 45 00 mov %eax,0x0(%rbp)
6f: 48 83 c5 04 add $0x4,%rbp
73: 44 39 e3 cmp %r12d,%ebx
76: 7f e9 jg 61 <func+0x61>
78: eb a7 jmp 21 <func+0x21>
$ readelf -wf bug.o
The section .eh_frame contains:
00000000 00000014 00000000 CIE
Version: 1
Augmentation: ""
Code alignment factor: 1
Data alignment factor: -8
Return address column: 16
DW_CFA_def_cfa: r7 ofs 8
DW_CFA_offset: r16 at cfa-8
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
00000018 00000024 0000001c FDE cie=00000000 pc=00000000..0000007a
DW_CFA_advance_loc: 10 to 0000000a
DW_CFA_offset: r6 at cfa-32
DW_CFA_offset: r3 at cfa-40
DW_CFA_advance_loc: 19 to 0000001d
DW_CFA_def_cfa_offset: 4144
DW_CFA_offset: r13 at cfa-16
DW_CFA_offset: r12 at cfa-24
DW_CFA_nop
DW_CFA_nop
DW_CFA_nop
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.3.3 3.4.2 |3.3.3 3.4.2 4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18749