mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 10:20:15 +00:00
* sysdeps/sh/sysdep.h: Add cfi instrumentation to asm fragments.
* sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/sh/_mcount.S: Add cfi instrumentation. * sysdeps/unix/sh/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/sh/makecontext.S: Adjust cfi_startproc. * sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: Remove now duplicate cfi_startproc and cfi_endproc. * sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/sh/socket.S: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.S: Add cfi_endproc.
This commit is contained in:
parent
5ad7714494
commit
3ddf7149f0
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||||
|
|
||||||
|
* sysdeps/sh/sysdep.h: Add cfi instrumentation to asm fragments.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise.
|
||||||
|
* sysdeps/sh/_mcount.S: Add cfi instrumentation.
|
||||||
|
* sysdeps/unix/sh/sysdep.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/makecontext.S: Adjust cfi_startproc.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh4/getcontext.S: Remove now duplicate
|
||||||
|
cfi_startproc and cfi_endproc.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh4/setcontext.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh4/swapcontext.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh3/getcontext.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh3/setcontext.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sh3/swapcontext.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/socket.S: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/sh/sysdep.S: Add cfi_endproc.
|
||||||
|
|
||||||
2005-12-30 Ulrich Drepper <drepper@redhat.com>
|
2005-12-30 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard
|
* sysdeps/powerpc/powerpc64/setjmp-common.S: Make sure pointer guard
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Assembler macros for SH.
|
/* Assembler macros for SH.
|
||||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000, 2005 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -52,10 +52,12 @@
|
|||||||
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
|
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
|
||||||
.align ALIGNARG(5); \
|
.align ALIGNARG(5); \
|
||||||
C_LABEL(name) \
|
C_LABEL(name) \
|
||||||
|
cfi_startproc; \
|
||||||
CALL_MCOUNT
|
CALL_MCOUNT
|
||||||
|
|
||||||
#undef END
|
#undef END
|
||||||
#define END(name) \
|
#define END(name) \
|
||||||
|
cfi_endproc; \
|
||||||
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
|
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
|
||||||
|
|
||||||
/* If compiled for profiling, call `mcount' at the start of each function. */
|
/* If compiled for profiling, call `mcount' at the start of each function. */
|
||||||
@ -63,12 +65,17 @@
|
|||||||
#define CALL_MCOUNT \
|
#define CALL_MCOUNT \
|
||||||
mov.l 1f,r1; \
|
mov.l 1f,r1; \
|
||||||
sts.l pr,@-r15; \
|
sts.l pr,@-r15; \
|
||||||
|
cfi_adjust_cfa_offset (4); \
|
||||||
|
cfi_rel_offset (pr, 0); \
|
||||||
mova 2f,r0; \
|
mova 2f,r0; \
|
||||||
jmp @r1; \
|
jmp @r1; \
|
||||||
lds r0,pr; \
|
lds r0,pr; \
|
||||||
.align 2; \
|
.align 2; \
|
||||||
1: .long mcount; \
|
1: .long mcount; \
|
||||||
2: lds.l @r15+,pr
|
2: lds.l @r15+,pr; \
|
||||||
|
cfi_adjust_cfa_offset (-4); \
|
||||||
|
cfi_restore (pr)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define CALL_MCOUNT /* Do nothing. */
|
#define CALL_MCOUNT /* Do nothing. */
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__makecontext)
|
ENTRY(__makecontext)
|
||||||
mov #4, r3
|
mov #4, r3
|
||||||
mov.l @(oSS_SP,r4), r1
|
mov.l @(oSS_SP,r4), r1
|
||||||
@ -140,6 +139,7 @@ ENTRY(__makecontext)
|
|||||||
.L4:
|
.L4:
|
||||||
.long HIDDEN_JUMPTARGET(exit)
|
.long HIDDEN_JUMPTARGET(exit)
|
||||||
#endif
|
#endif
|
||||||
|
cfi_startproc
|
||||||
PSEUDO_END(__makecontext)
|
PSEUDO_END(__makecontext)
|
||||||
|
|
||||||
weak_alias (__makecontext, makecontext)
|
weak_alias (__makecontext, makecontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__getcontext)
|
ENTRY(__getcontext)
|
||||||
|
|
||||||
/* Return value of getcontext. R0 is the only register whose
|
/* Return value of getcontext. R0 is the only register whose
|
||||||
@ -84,7 +83,6 @@ ENTRY(__getcontext)
|
|||||||
rts
|
rts
|
||||||
nop
|
nop
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__getcontext)
|
PSEUDO_END(__getcontext)
|
||||||
|
|
||||||
weak_alias (__getcontext, getcontext)
|
weak_alias (__getcontext, getcontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__setcontext)
|
ENTRY(__setcontext)
|
||||||
|
|
||||||
mov r4, r8
|
mov r4, r8
|
||||||
@ -95,7 +94,6 @@ ENTRY(__setcontext)
|
|||||||
jmp @r0
|
jmp @r0
|
||||||
mov.l @r15+, r0
|
mov.l @r15+, r0
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__setcontext)
|
PSEUDO_END(__setcontext)
|
||||||
|
|
||||||
weak_alias (__setcontext, setcontext)
|
weak_alias (__setcontext, setcontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__swapcontext)
|
ENTRY(__swapcontext)
|
||||||
|
|
||||||
/* Return value of getcontext. R0 is the only register whose
|
/* Return value of getcontext. R0 is the only register whose
|
||||||
@ -128,7 +127,6 @@ ENTRY(__swapcontext)
|
|||||||
jmp @r0
|
jmp @r0
|
||||||
mov.l @r15+, r0
|
mov.l @r15+, r0
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__swapcontext)
|
PSEUDO_END(__swapcontext)
|
||||||
|
|
||||||
weak_alias (__swapcontext, swapcontext)
|
weak_alias (__swapcontext, swapcontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__getcontext)
|
ENTRY(__getcontext)
|
||||||
|
|
||||||
/* Return value of getcontext. R0 is the only register whose
|
/* Return value of getcontext. R0 is the only register whose
|
||||||
@ -127,7 +126,6 @@ ENTRY(__getcontext)
|
|||||||
rts
|
rts
|
||||||
nop
|
nop
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__getcontext)
|
PSEUDO_END(__getcontext)
|
||||||
|
|
||||||
weak_alias (__getcontext, getcontext)
|
weak_alias (__getcontext, getcontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__setcontext)
|
ENTRY(__setcontext)
|
||||||
|
|
||||||
mov r4, r8
|
mov r4, r8
|
||||||
@ -135,7 +134,6 @@ ENTRY(__setcontext)
|
|||||||
jmp @r0
|
jmp @r0
|
||||||
mov.l @r15+, r0
|
mov.l @r15+, r0
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__setcontext)
|
PSEUDO_END(__setcontext)
|
||||||
|
|
||||||
weak_alias (__setcontext, setcontext)
|
weak_alias (__setcontext, setcontext)
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
.align 5
|
.align 5
|
||||||
cfi_startproc
|
|
||||||
ENTRY(__swapcontext)
|
ENTRY(__swapcontext)
|
||||||
|
|
||||||
/* Return value of getcontext. R0 is the only register whose
|
/* Return value of getcontext. R0 is the only register whose
|
||||||
@ -210,7 +209,6 @@ ENTRY(__swapcontext)
|
|||||||
jmp @r0
|
jmp @r0
|
||||||
mov.l @r15+, r0
|
mov.l @r15+, r0
|
||||||
|
|
||||||
cfi_endproc
|
|
||||||
PSEUDO_END(__swapcontext)
|
PSEUDO_END(__swapcontext)
|
||||||
|
|
||||||
weak_alias (__swapcontext, swapcontext)
|
weak_alias (__swapcontext, swapcontext)
|
||||||
|
@ -88,7 +88,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
.globl __socket
|
.globl __socket
|
||||||
cfi_startproc
|
|
||||||
ENTRY (__socket)
|
ENTRY (__socket)
|
||||||
/* This will not work in the case of a socket call being interrupted
|
/* This will not work in the case of a socket call being interrupted
|
||||||
by a signal. If the signal handler uses any stack the arguments
|
by a signal. If the signal handler uses any stack the arguments
|
||||||
@ -169,7 +168,6 @@ ENTRY (__socket)
|
|||||||
bra .Lsyscall_error
|
bra .Lsyscall_error
|
||||||
nop
|
nop
|
||||||
#endif
|
#endif
|
||||||
cfi_endproc
|
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
.L1:
|
.L1:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2005
|
||||||
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -27,6 +28,7 @@
|
|||||||
|
|
||||||
ENTRY (__syscall_error)
|
ENTRY (__syscall_error)
|
||||||
neg r4, r0
|
neg r4, r0
|
||||||
|
cfi_endproc
|
||||||
|
|
||||||
#define __syscall_error __syscall_error_1
|
#define __syscall_error __syscall_error_1
|
||||||
#include <sysdeps/unix/sh/sysdep.S>
|
#include <sysdeps/unix/sh/sysdep.S>
|
||||||
|
@ -141,13 +141,22 @@
|
|||||||
# define SYSCALL_ERROR_HANDLER \
|
# define SYSCALL_ERROR_HANDLER \
|
||||||
neg r0,r1; \
|
neg r0,r1; \
|
||||||
mov.l r14,@-r15; \
|
mov.l r14,@-r15; \
|
||||||
|
cfi_adjust_cfa_offset (4); \
|
||||||
|
cfi_rel_offset (r14, 0); \
|
||||||
mov.l r12,@-r15; \
|
mov.l r12,@-r15; \
|
||||||
|
cfi_adjust_cfa_offset (4); \
|
||||||
|
cfi_rel_offset (r12, 0); \
|
||||||
mov.l r1,@-r15; \
|
mov.l r1,@-r15; \
|
||||||
|
cfi_adjust_cfa_offset (4); \
|
||||||
|
cfi_rel_offset (r1, 0); \
|
||||||
mov.l 0f,r12; \
|
mov.l 0f,r12; \
|
||||||
mova 0f,r0; \
|
mova 0f,r0; \
|
||||||
add r0,r12; \
|
add r0,r12; \
|
||||||
sts.l pr,@-r15; \
|
sts.l pr,@-r15; \
|
||||||
|
cfi_adjust_cfa_offset (4); \
|
||||||
|
cfi_rel_offset (pr, 0); \
|
||||||
mov r15,r14; \
|
mov r15,r14; \
|
||||||
|
cfi_def_cfa_register (r14); \
|
||||||
mov.l 1f,r1; \
|
mov.l 1f,r1; \
|
||||||
bsrf r1; \
|
bsrf r1; \
|
||||||
nop; \
|
nop; \
|
||||||
|
Loading…
Reference in New Issue
Block a user