diff options
author | Carlos O'Donell <carlos@systemhalted.org> | 2012-10-29 23:31:55 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@systemhalted.org> | 2012-10-29 23:36:41 -0400 |
commit | 236bb0623dba86582ded9f89b8d79f362404f7a1 (patch) | |
tree | f17b0e484a41aea3a298dfbd77d8d55024e0f41c /ports | |
parent | e22f413005ccb0080ef1f13e59a1bc8aa36105cb (diff) | |
download | glibc-236bb0623dba86582ded9f89b8d79f362404f7a1.zip glibc-236bb0623dba86582ded9f89b8d79f362404f7a1.tar.gz glibc-236bb0623dba86582ded9f89b8d79f362404f7a1.tar.bz2 |
hppa: Add cfi direcvtives.
We add cfi directives to the syscall assembly.
Diffstat (limited to 'ports')
-rw-r--r-- | ports/ChangeLog.hppa | 6 | ||||
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/hppa/sysdep.h | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa index b30a61c..41b594c 100644 --- a/ports/ChangeLog.hppa +++ b/ports/ChangeLog.hppa @@ -1,5 +1,11 @@ 2012-10-29 Carlos O'Donell <carlos@systemhalted.org> + * sysdeps/unix/sysv/linux/hppa/sysdep.h (ENTRY): Add cfi_startproc. + Use .cfi_offset for rp store. + (ENTRY_LEAF): Likewise. + (END) Add cfi_Endproc. + (DO_CALL): Add cfi directives. + * sysdeps/unix/sysv/linux/hppa/sysdep.h: Document register clobbering. [PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Move... diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h index daf2eaf..1825d31 100644 --- a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h @@ -120,12 +120,14 @@ .align ALIGNARG(4) ASM_LINE_SEP \ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ + cfi_startproc ASM_LINE_SEP \ C_LABEL(name) ASM_LINE_SEP \ .PROC ASM_LINE_SEP \ .CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \ .ENTRY ASM_LINE_SEP \ /* SAVE_RP says we do */ ASM_LINE_SEP \ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 2, -20 ASM_LINE_SEP \ /*FIXME: Call mcount? (carefull with stack!) */ /* Some syscall wrappers do not call other functions, and @@ -135,18 +137,21 @@ .align ALIGNARG(4) ASM_LINE_SEP \ .export C_SYMBOL_NAME(name) ASM_LINE_SEP \ .type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \ + cfi_startproc ASM_LINE_SEP \ C_LABEL(name) ASM_LINE_SEP \ .PROC ASM_LINE_SEP \ .CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \ .ENTRY ASM_LINE_SEP \ /* SAVE_RP says we do */ ASM_LINE_SEP \ stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \ + .cfi_offset 2, -20 ASM_LINE_SEP \ /*FIXME: Call mcount? (carefull with stack!) */ #undef END #define END(name) \ .EXIT ASM_LINE_SEP \ .PROCEND ASM_LINE_SEP \ + cfi_endproc ASM_LINE_SEP \ .size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP /* If compiled for profiling, call `mcount' at the start @@ -278,8 +283,12 @@ #define DO_CALL(syscall_name, args) \ /* Create a frame */ ASM_LINE_SEP \ stwm TREG, 64(%sp) ASM_LINE_SEP \ + .cfi_offset TREG, 0 ASM_LINE_SEP \ + .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \ stw %sp, -4(%sp) ASM_LINE_SEP \ + .cfi_offset 30, -4 ASM_LINE_SEP \ stw %r19, -32(%sp) ASM_LINE_SEP \ + .cfi_offset 19, -32 ASM_LINE_SEP \ /* Save r19 */ ASM_LINE_SEP \ SAVE_PIC(TREG) ASM_LINE_SEP \ /* Do syscall, delay loads # */ ASM_LINE_SEP \ @@ -302,8 +311,10 @@ L(pre_end): ASM_LINE_SEP \ /* Restore our frame, restoring TREG */ ASM_LINE_SEP \ ldwm -64(%sp), TREG ASM_LINE_SEP \ + .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \ /* Restore return pointer */ ASM_LINE_SEP \ - ldw -20(%sp),%rp ASM_LINE_SEP + ldw -20(%sp),%rp ASM_LINE_SEP \ + .cfi_restore 2 ASM_LINE_SEP /* We do nothing with the return, except hand it back to someone else */ #undef DO_CALL_NOERRNO |