summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorandreast <andreast@FreeBSD.org>2012-02-05 20:04:43 +0000
committerandreast <andreast@FreeBSD.org>2012-02-05 20:04:43 +0000
commitbf13243b5345c5abdffc9c8dc62eff84ee0de428 (patch)
tree67cc4601a5bcc521ca92310b4c26b139b0f62239 /lib
parentac5dbeb938d63729dd227236f6de4aadd73c0b41 (diff)
downloadFreeBSD-src-bf13243b5345c5abdffc9c8dc62eff84ee0de428.zip
FreeBSD-src-bf13243b5345c5abdffc9c8dc62eff84ee0de428.tar.gz
Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE which
has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful name. Tested on 32- and 64-bit PowerMac. Reviewed by: bde
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/powerpc/SYS.h32
-rw-r--r--lib/libc/powerpc/gen/setjmp.S2
-rw-r--r--lib/libc/powerpc64/SYS.h32
-rw-r--r--lib/libc/powerpc64/gen/setjmp.S2
4 files changed, 34 insertions, 34 deletions
diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h
index f775f37..0bd793f 100644
--- a/lib/libc/powerpc/SYS.h
+++ b/lib/libc/powerpc/SYS.h
@@ -33,38 +33,38 @@
#include <sys/syscall.h>
#include <machine/asm.h>
-#define _SYSCALL(x) \
+#define _SYSCALL(name) \
.text; \
.align 2; \
- li 0,(__CONCAT(SYS_,x)); \
+ li 0,(__CONCAT(SYS_, name)); \
sc
-#define SYSCALL(x) \
+#define SYSCALL(name) \
.text; \
.align 2; \
2: b PIC_PLT(CNAME(HIDENAME(cerror))); \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), name); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+ _SYSCALL(name); \
bso 2b
-#define PSEUDO(x) \
+#define PSEUDO(name) \
.text; \
.align 2; \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+ _SYSCALL(name); \
bnslr; \
b PIC_PLT(CNAME(HIDENAME(cerror)))
-#define RSYSCALL(x) \
+#define RSYSCALL(name) \
.text; \
.align 2; \
2: b PIC_PLT(CNAME(HIDENAME(cerror))); \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), name); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+ _SYSCALL(name); \
bnslr; \
b PIC_PLT(CNAME(HIDENAME(cerror)))
diff --git a/lib/libc/powerpc/gen/setjmp.S b/lib/libc/powerpc/gen/setjmp.S
index 27567ff..447ba57 100644
--- a/lib/libc/powerpc/gen/setjmp.S
+++ b/lib/libc/powerpc/gen/setjmp.S
@@ -69,7 +69,7 @@ ENTRY(setjmp)
li %r3,0 /* return (0) */
blr
- WEAK_ALIAS(longjmp, __longjmp)
+ WEAK_REFERENCE(CNAME(__longjmp), longjmp)
ENTRY(__longjmp)
lmw %r9,20(%r3) /* restore regs */
mr %r6,%r4 /* save val param */
diff --git a/lib/libc/powerpc64/SYS.h b/lib/libc/powerpc64/SYS.h
index 80a6b1b..8b3281f 100644
--- a/lib/libc/powerpc64/SYS.h
+++ b/lib/libc/powerpc64/SYS.h
@@ -33,13 +33,13 @@
#include <sys/syscall.h>
#include <machine/asm.h>
-#define _SYSCALL(x) \
+#define _SYSCALL(name) \
.text; \
.align 2; \
- li 0,(__CONCAT(SYS_,x)); \
+ li 0,(__CONCAT(SYS_, name)); \
sc
-#define SYSCALL(x) \
+#define SYSCALL(name) \
.text; \
.align 2; \
2: mflr %r0; \
@@ -51,18 +51,18 @@
ld %r0,16(%r1); \
mtlr %r0; \
blr; \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), name); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name)); \
+ _SYSCALL(name); \
bso 2b
-#define PSEUDO(x) \
+#define PSEUDO(name) \
.text; \
.align 2; \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x),__CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name)); \
+ _SYSCALL(name); \
bnslr; \
mflr %r0; \
std %r0,16(%r1); \
@@ -74,13 +74,13 @@ ENTRY(__CONCAT(__sys_,x)); \
mtlr %r0; \
blr;
-#define RSYSCALL(x) \
+#define RSYSCALL(name) \
.text; \
.align 2; \
-ENTRY(__CONCAT(__sys_,x)); \
- WEAK_ALIAS(x,__CONCAT(__sys_,x)); \
- WEAK_ALIAS(__CONCAT(_,x), __CONCAT(__sys_,x)); \
- _SYSCALL(x); \
+ENTRY(__CONCAT(__sys_, name)); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), name); \
+ WEAK_REFERENCE(__CONCAT(__sys_, name), __CONCAT(_, name));\
+ _SYSCALL(name); \
bnslr; \
\
mflr %r0; \
diff --git a/lib/libc/powerpc64/gen/setjmp.S b/lib/libc/powerpc64/gen/setjmp.S
index 23002ab..deda7c5 100644
--- a/lib/libc/powerpc64/gen/setjmp.S
+++ b/lib/libc/powerpc64/gen/setjmp.S
@@ -93,7 +93,7 @@ ENTRY(setjmp)
li %r3,0 /* return (0) */
blr
- WEAK_ALIAS(longjmp, __longjmp)
+ WEAK_REFERENCE(__longjmp, longjmp)
ENTRY(__longjmp)
ld %r9,40 + 0*8(%r3)
ld %r10,40 + 1*8(%r3)
OpenPOWER on IntegriCloud