summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2002-05-17 01:58:55 +0000
committerbenno <benno@FreeBSD.org>2002-05-17 01:58:55 +0000
commit224e5ccc850a9db1b7be27a37971e2af056ffd00 (patch)
tree9cac604ff2b2c2ce235a5a2a073ce58f1bbe7442 /lib
parentbcb6745c5f776e7a80c53966ee39f33ede1b419c (diff)
downloadFreeBSD-src-224e5ccc850a9db1b7be27a37971e2af056ffd00.zip
FreeBSD-src-224e5ccc850a9db1b7be27a37971e2af056ffd00.tar.gz
Flesh this out, based on the NetBSD version.
Reviewed by: obrien
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/powerpc/SYS.h51
1 files changed, 41 insertions, 10 deletions
diff --git a/lib/libc/powerpc/SYS.h b/lib/libc/powerpc/SYS.h
index dc0cd02..cda37cd 100644
--- a/lib/libc/powerpc/SYS.h
+++ b/lib/libc/powerpc/SYS.h
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 2002 David E. O'Brien. All rights reserved.
+ * Copyright (c) 2002 Benno Rice. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,18 +31,48 @@
*/
#include <sys/syscall.h>
+
#include <machine/asm.h>
+#define __CONCAT(x,y) x ## y
+
+#define _SYSCALL(x) \
+ .text; \
+ .align 2; \
+ li 0,(__CONCAT(SYS_,x)); \
+ sc
-#define SYSCALL(x) \
- .text ; \
- .align 2 ; \
-2: b PIC_PLT(_C_LABEL(__cerror)) ; \
-ENTRY(__CONCAT(__sys_,x)) ; \
- li 0,(SYS_ ## x) ; \
- sc ; \
+#define SYSCALL(x) \
+ .text; \
+ .align 2; \
+2: b PIC_PLT(_C_LABEL(HIDENAME(cerror))); \
+ENTRY(__CONCAT(__sys_,x)); \
+ .weak _C_LABEL(x); \
+ .set _C_LABEL(x),_C_LABEL(__CONCAT(__sys_,x)); \
+ .weak _C_LABEL(__CONCAT(_,x)); \
+ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \
+ _SYSCALL(x); \
bso 2b
-#define RSYSCALL(x) \
- SYSCALL(x) ; \
- blr
+#define PSEUDO(x) \
+ .text; \
+ .align 2; \
+ENTRY(__CONCAT(__sys_,x)); \
+ .weak _C_LABEL(__CONCAT(_,x)); \
+ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \
+ _SYSCALL(x); \
+ bnslr; \
+ b PIC_PLT(_C_LABEL(HIDENAME(cerror)))
+
+#define RSYSCALL(x) \
+ .text; \
+ .align 2; \
+2: b PIC_PLT(_C_LABEL(HIDENAME(cerror))); \
+ENTRY(__CONCAT(__sys_,x)); \
+ .weak _C_LABEL(x); \
+ .set _C_LABEL(x),_C_LABEL(__CONCAT(__sys_,x)); \
+ .weak _C_LABEL(__CONCAT(_,x)); \
+ .set _C_LABEL(__CONCAT(_,x)),_C_LABEL(__CONCAT(__sys_,x)); \
+ _SYSCALL(x); \
+ bnslr; \
+ b PIC_PLT(_C_LABEL(HIDENAME(cerror)))
OpenPOWER on IntegriCloud