diff options
author | jasone <jasone@FreeBSD.org> | 2000-01-20 21:58:27 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-01-20 21:58:27 +0000 |
commit | 303a1b5e43d1ba6712cacc54c1948573df74cac3 (patch) | |
tree | a136b1278296a9a9300e66b22e1c30ea04829651 /lib | |
parent | d28faf45be05bed11d5dbd509470a4449f5d1714 (diff) | |
download | FreeBSD-src-303a1b5e43d1ba6712cacc54c1948573df74cac3.zip FreeBSD-src-303a1b5e43d1ba6712cacc54c1948573df74cac3.tar.gz |
Remove unnecessary alternate entry points for *setjmp(). Make the main
entry point the standard name when not compiling libc_r (for example,
longjmp is the main entry point instead of __longjmp).
Suggested by: bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/alpha/gen/_setjmp.S | 17 | ||||
-rw-r--r-- | lib/libc/alpha/gen/setjmp.S | 17 | ||||
-rw-r--r-- | lib/libc/alpha/gen/sigsetjmp.S | 17 | ||||
-rw-r--r-- | lib/libc/amd64/gen/_setjmp.S | 11 | ||||
-rw-r--r-- | lib/libc/amd64/gen/setjmp.S | 11 | ||||
-rw-r--r-- | lib/libc/amd64/gen/sigsetjmp.S | 11 | ||||
-rw-r--r-- | lib/libc/i386/gen/_setjmp.S | 11 | ||||
-rw-r--r-- | lib/libc/i386/gen/setjmp.S | 11 | ||||
-rw-r--r-- | lib/libc/i386/gen/sigsetjmp.S | 11 |
9 files changed, 69 insertions, 48 deletions
diff --git a/lib/libc/alpha/gen/_setjmp.S b/lib/libc/alpha/gen/_setjmp.S index 0454296..0d032e7 100644 --- a/lib/libc/alpha/gen/_setjmp.S +++ b/lib/libc/alpha/gen/_setjmp.S @@ -44,8 +44,7 @@ .set noreorder -XLEAF(_setjmp, 1) -LEAF(___setjmp, 1) +LEAF(_setjmp, 1) LDGP(pv) stq ra, (2 * 8)(a0) /* sc_pc = return address */ stq s0, (( 9 + 4) * 8)(a0) /* saved bits of sc_regs */ @@ -86,12 +85,14 @@ LEAF(___setjmp, 1) mov zero, v0 /* return zero */ RET -END(___setjmp) +END(_setjmp) -#ifndef _THREAD_SAFE -XLEAF(_longjmp, 2) -#endif +#ifdef _THREAD_SAFE LEAF(___longjmp, 2) +#else +XLEAF(___longjmp, 2) +LEAF(_longjmp, 2) +#endif LDGP(pv) ldq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */ ldiq t1, 0xacedbadd @@ -126,4 +127,8 @@ botch: CALL(longjmperror) CALL(abort) RET /* "can't" get here... */ +#ifdef _THREAD_SAFE END(___longjmp) +#else +END(_longjmp) +#endif diff --git a/lib/libc/alpha/gen/setjmp.S b/lib/libc/alpha/gen/setjmp.S index dd03a1a..04202ce 100644 --- a/lib/libc/alpha/gen/setjmp.S +++ b/lib/libc/alpha/gen/setjmp.S @@ -44,8 +44,7 @@ .set noreorder -XLEAF(setjmp, 1) -LEAF(__setjmp, 1) +LEAF(setjmp, 1) LDGP(pv) stq ra, (2 * 8)(a0) /* sc_pc = return address */ stq s0, (( 9 + 4) * 8)(a0) /* saved bits of sc_regs */ @@ -114,12 +113,14 @@ LEAF(__setjmp, 1) mov zero, v0 /* return zero */ RET -END(__setjmp) +END(setjmp) -#ifndef _THREAD_SAFE -XLEAF(longjmp, 2) -#endif +#ifdef _THREAD_SAFE LEAF(__longjmp, 2) +#else +XLEAF(__longjmp, 2) +LEAF(longjmp, 2) +#endif LDGP(pv) stq a1, (( 0 + 4) * 8)(a0) /* save return value */ PCALL(sigreturn) /* use sigreturn to return */ @@ -128,4 +129,8 @@ botch: CALL(longjmperror) CALL(abort) RET /* "can't" get here... */ +#ifdef _THREAD_SAFE END(__longjmp) +#else +END(longjmp) +#endif diff --git a/lib/libc/alpha/gen/sigsetjmp.S b/lib/libc/alpha/gen/sigsetjmp.S index 6fb5085..a5acd8a 100644 --- a/lib/libc/alpha/gen/sigsetjmp.S +++ b/lib/libc/alpha/gen/sigsetjmp.S @@ -45,24 +45,29 @@ .set noreorder -XLEAF(sigsetjmp, 2) -LEAF(__sigsetjmp, 2) +LEAF(sigsetjmp, 2) LDGP(pv) stq a1, (81 * 8)(a0) /* save the mask */ bne a1, Lsavesig /* if !zero, save signals */ jmp zero, _setjmp /* else don't. */ Lsavesig: jmp zero, setjmp -END(__sigsetjmp) +END(sigsetjmp) -#ifndef _THREAD_SAFE -XLEAF(siglongjmp, 2) -#endif +#ifdef _THREAD_SAFE LEAF(__siglongjmp, 2) +#else +XLEAF(__siglongjmp, 2) +LEAF(siglongjmp, 2) +#endif LDGP(pv) ldq t0, (81 * 8)(a0) /* get the mask */ bne t0, Lrestoresig /* if !zero, restore signals */ jmp zero, _longjmp Lrestoresig: jmp zero, longjmp +#ifdef _THREAD_SAFE END(__siglongjmp) +#else +END(siglongjmp) +#endif
\ No newline at end of file diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S index 64606c5..9c66308 100644 --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -53,8 +53,7 @@ #include "DEFS.h" -ALTENTRY(_setjmp) -ENTRY(___setjmp) +ENTRY(_setjmp) movl 4(%esp),%eax movl 0(%esp),%edx movl %edx, 0(%eax) /* rta */ @@ -67,10 +66,12 @@ ENTRY(___setjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(_longjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(___longjmp) +#else +ALTENTRY(___longjmp) +ENTRY(_longjmp) +#endif movl 4(%esp),%edx movl 8(%esp),%eax movl 0(%edx),%ecx diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 211c8a5..39e9c21 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -54,8 +54,7 @@ #include "DEFS.h" #include "SYS.h" -ALTENTRY(setjmp) -ENTRY(__setjmp) +ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -81,10 +80,12 @@ ENTRY(__setjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(longjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(__longjmp) +#else +ALTENTRY(__longjmp) +ENTRY(longjmp) +#endif movl 4(%esp),%edx PIC_PROLOGUE pushl $0 /* (sigset_t*)oset */ diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index 2449094..13c0dc7 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -59,8 +59,7 @@ * use sigreturn() if sigreturn() works. */ -ALTENTRY(sigsetjmp) -ENTRY(__sigsetjmp) +ENTRY(sigsetjmp) movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -90,10 +89,12 @@ ENTRY(__sigsetjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(siglongjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(__siglongjmp) +#else +ALTENTRY(__siglongjmp) +ENTRY(siglongjmp) +#endif movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f diff --git a/lib/libc/i386/gen/_setjmp.S b/lib/libc/i386/gen/_setjmp.S index 64606c5..9c66308 100644 --- a/lib/libc/i386/gen/_setjmp.S +++ b/lib/libc/i386/gen/_setjmp.S @@ -53,8 +53,7 @@ #include "DEFS.h" -ALTENTRY(_setjmp) -ENTRY(___setjmp) +ENTRY(_setjmp) movl 4(%esp),%eax movl 0(%esp),%edx movl %edx, 0(%eax) /* rta */ @@ -67,10 +66,12 @@ ENTRY(___setjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(_longjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(___longjmp) +#else +ALTENTRY(___longjmp) +ENTRY(_longjmp) +#endif movl 4(%esp),%edx movl 8(%esp),%eax movl 0(%edx),%ecx diff --git a/lib/libc/i386/gen/setjmp.S b/lib/libc/i386/gen/setjmp.S index 211c8a5..39e9c21 100644 --- a/lib/libc/i386/gen/setjmp.S +++ b/lib/libc/i386/gen/setjmp.S @@ -54,8 +54,7 @@ #include "DEFS.h" #include "SYS.h" -ALTENTRY(setjmp) -ENTRY(__setjmp) +ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE leal 28(%ecx), %eax @@ -81,10 +80,12 @@ ENTRY(__setjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(longjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(__longjmp) +#else +ALTENTRY(__longjmp) +ENTRY(longjmp) +#endif movl 4(%esp),%edx PIC_PROLOGUE pushl $0 /* (sigset_t*)oset */ diff --git a/lib/libc/i386/gen/sigsetjmp.S b/lib/libc/i386/gen/sigsetjmp.S index 2449094..13c0dc7 100644 --- a/lib/libc/i386/gen/sigsetjmp.S +++ b/lib/libc/i386/gen/sigsetjmp.S @@ -59,8 +59,7 @@ * use sigreturn() if sigreturn() works. */ -ALTENTRY(sigsetjmp) -ENTRY(__sigsetjmp) +ENTRY(sigsetjmp) movl 8(%esp),%eax movl 4(%esp),%ecx movl %eax,44(%ecx) @@ -90,10 +89,12 @@ ENTRY(__sigsetjmp) xorl %eax,%eax ret -#ifndef _THREAD_SAFE -ALTENTRY(siglongjmp) -#endif +#ifdef _THREAD_SAFE ENTRY(__siglongjmp) +#else +ALTENTRY(__siglongjmp) +ENTRY(siglongjmp) +#endif movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f |