[Openmcl-cvs-notifications] r12673 - /trunk/source/lisp-kernel/ppc-spentry.s
gb at clozure.com
gb at clozure.com
Tue Aug 25 03:53:10 EDT 2009
Author: gb
Date: Tue Aug 25 03:53:10 2009
New Revision: 12673
Log:
Finally (knock wood) get the DWARF exception info right for
PPC64 Darwin. A large part of what's been wrong is that
Frame Description Entries (FDEs) need to be a multiple of =
8 bytes long, and the label defining the end of the first
FDE (the one that describes _SPffall) preceded rather than
followed a ".align 3" directive.) I suspect that the first
FDE was incidentally a multiple of 8 bytes in size, but any
changes to the Call Frame Info (CFI) entries in that FDE
caused the size to be incorrect (and caused the second FDE
to not be found.)
Changed the CFI entries in the FDEs (which had been cut-and-pasted
from the x86-64 version) to be a little more plausible for ppc64
(the old entries caused crashes in _Unwind_Backtrace(), which
is called at runtime by something called objc_addExceptionHandler().
(Some people have found that objc_addExceptionHandler() accounts
for a high percentage of their program's execution time.) I don't
think that the "plausible" CFI entries will crash, but I don't
know how to describe the size of the stack frame of something
like _SPffcall (it depends on the number of outgoing args), and
I doubt if it'd possible for the C++-style exception code to
ever unwind past something like _SPffcall (and it wouldn't
be meaningful, since there's lisp code on the other side ...)
Modified:
trunk/source/lisp-kernel/ppc-spentry.s
Modified: trunk/source/lisp-kernel/ppc-spentry.s
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/ppc-spentry.s (original)
+++ trunk/source/lisp-kernel/ppc-spentry.s Tue Aug 25 03:53:10 2009
@@ -1633,7 +1633,6 @@
LocalLabelPrefix[]ffcall_end: =
=
.section __DATA,__gcc_except_tab
-GCC_except_table0:
.align 3
LLSDA1:
.byte 0xff /* @LPStart format (omit) */
@@ -1857,7 +1856,6 @@
__(b LocalLabelPrefix[]ffcall_return_registers_call_end)
LocalLabelPrefix[]ffcall_return_registers_end:
.section __DATA,__gcc_except_tab
-GCC_except_table1:
.align 3
LLSDA2:
.byte 0xff /* @LPStart format (omit) */
@@ -6973,7 +6971,7 @@
__(mr arg_z,arg_y)
__(b _SPbind_interrupt_level)
=
- =
+ .if 1
__ifdef([DARWIN])
__ifdef([PPC64])
L_lisp_objc2_personality: =
@@ -7016,22 +7014,20 @@
.quad Lffcall_end-Lffcall /* FDE address range */
.byte 8 /* uleb128 0x8; Augmentation size */
.quad LLSDA1-. /* Language Specific Data Area */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_def_cfa_offset =
+ .byte 0xc0,0x1 /* uleb128 0xc0. A lie: the frame is variable-length */
+ .byte DW_CFA_offset_extended_sf
+ .byte 0x41 =
+ .byte 0x7e /* sleb128 -2 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_setup-Lffcall
- .byte 0xe /* DW_CFA_def_cfa_offset */
- .byte 0x10 /* uleb128 0x10 */
- .byte 0x86 /* DW_CFA_offset, column 0x6 */
- .byte 0x2 /* uleb128 0x2 */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_setup_end-Lffcall_setup
- .byte 0xd /* DW_CFA_def_cfa_register */
- .byte 0x6 /* uleb128 0x6 */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_call_end-Lffcall_call
- .byte 0x83 /* DW_CFA_offset, column 0x3 */
- .byte 0x3 /* uleb128 0x3 */
+ .align 3
LEFDEffcall:
- .align 3
+ =
.globl _SPffcall_return_registers.eh
_SPffcall_return_registers.eh:
.set Lfmh,LEFDEffcall_return_registers-LSFDEffcall_return_registers
@@ -7042,26 +7038,23 @@
.quad Lffcall_return_registers_end-Lffcall_return_registers /* FDE=
address range */
.byte 8 /* uleb128 0x8; Augmentation size */
.quad LLSDA2-. /* Language Specific Data Area */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_def_cfa_offset =
+ .byte 0xc0,0x1 /* uleb128 0xc0. A lie: the frame is variable-length */
+ .byte DW_CFA_offset_extended_sf
+ .byte 0x41 =
+ .byte 0x7e /* sleb128 -2 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_return_registers_setup-Lffcall_return_registers
- .byte 0xe /* DW_CFA_def_cfa_offset */
- .byte 0x10 /* uleb128 0x10 */
- .byte 0x86 /* DW_CFA_offset, column 0x6 */
- .byte 0x2 /* uleb128 0x2 */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_return_registers_setup_end-Lffcall_return_registers_setup
- .byte 0xd /* DW_CFA_def_cfa_register */
- .byte 0x6 /* uleb128 0x6 */
- .byte 0x4 /* DW_CFA_advance_loc4 */
+ .byte DW_CFA_advance_loc4
.long Lffcall_return_registers_call_end-Lffcall_return_registers_call
- .byte 0x83 /* DW_CFA_offset, column 0x3 */
- .byte 0x3 /* uleb128 0x3 */
.align 3
LEFDEffcall_return_registers:
.text
__endif
__endif
-
+ .endif
=
=
/* EOF, basically */
More information about the Openmcl-cvs-notifications
mailing list