[Bug 207325] projects/clang380-import for TARGET_ARCH=powerpc : c++ exceptions cause SEGV (9 line program); powerpc64 __builtin_dwarf_cfa() issue as well

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Feb 28 01:21:42 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207325

--- Comment #9 from Mark Millard <markmi at dsl-only.net> ---
I should have been explicit:

The stack frames boundary that I reference in the 2-line examples are between:

A) f's frame
and
B) f's caller's frame

(Not between f vs. g.)

(The external g function just avoided any potential optimization that might
eliminate the code I was trying to produce.)


(B) is rather implicit as I wrote comment #1. It could lead to confusion. Thus
this note.

Also: It looks like arm has the same sort of distinction vs. g++:

# clang++ -c -g -std=c++11 -Wall -pedantic builtin_dwarf_cfa.cpp
# /usr/local/bin/objdump -d --prefix-addresses builtin_dwarf_cfa.o

builtin_dwarf_cfa.o:     file format elf32-littlearm


Disassembly of section .text:
00000000 <_Z1fv> push   {fp, lr}
00000004 <_Z1fv+0x4> mov        fp, sp
00000008 <_Z1fv+0x8> mov        r0, fp
0000000c <_Z1fv+0xc> bl 00000000 <_Z1gPv>
00000010 <_Z1fv+0x10> pop       {fp, pc}
# g++5 -c -g -std=c++11 -Wall -pedantic builtin_dwarf_cfa.cpp
# /usr/local/bin/objdump -d --prefix-addresses builtin_dwarf_cfa.o

builtin_dwarf_cfa.o:     file format elf32-littlearm


Disassembly of section .text:
00000000 <_Z1fv> push   {fp, lr}
00000004 <_Z1fv+0x4> add        fp, sp, #4, 0
00000008 <_Z1fv+0x8> add        r3, fp, #4, 0
0000000c <_Z1fv+0xc> mov        r0, r3
00000010 <_Z1fv+0x10> bl        00000000 <_Z1gPv>
00000014 <_Z1fv+0x14> nop                       ; (mov r0, r0)
00000018 <_Z1fv+0x18> pop       {fp, pc}

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list