summaryrefslogtreecommitdiffstats
path: root/sys/libkern/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sys/libkern/alpha')
-rw-r--r--sys/libkern/alpha/byte_swap_2.S5
-rw-r--r--sys/libkern/alpha/byte_swap_4.S5
-rw-r--r--sys/libkern/alpha/htonl.S3
-rw-r--r--sys/libkern/alpha/htons.S3
-rw-r--r--sys/libkern/alpha/ntohl.S3
-rw-r--r--sys/libkern/alpha/ntohs.S3
6 files changed, 14 insertions, 8 deletions
diff --git a/sys/libkern/alpha/byte_swap_2.S b/sys/libkern/alpha/byte_swap_2.S
index a9d70a9..8111918 100644
--- a/sys/libkern/alpha/byte_swap_2.S
+++ b/sys/libkern/alpha/byte_swap_2.S
@@ -30,8 +30,8 @@
#include <machine/asm.h>
-#ifndef NAME
-#define NAME byte_swap_2
+#if !defined(ALIAS) || !defined(NAME)
+#error ALIAS or NAME not defined
#endif
/*
@@ -39,6 +39,7 @@
*
* Argument is an unsigned 2-byte integer (u_int16_t).
*/
+XLEAF(ALIAS, 1)
LEAF(NAME, 1) /* a0 contains 0x0123 */
extbl a0, 0, t0 /* t0 = 0x 23 */
extbl a0, 1, t1 /* t1 = 0x 01 */
diff --git a/sys/libkern/alpha/byte_swap_4.S b/sys/libkern/alpha/byte_swap_4.S
index 9f6df34..d31bbe8 100644
--- a/sys/libkern/alpha/byte_swap_4.S
+++ b/sys/libkern/alpha/byte_swap_4.S
@@ -30,8 +30,8 @@
#include <machine/asm.h>
-#ifndef NAME
-#define NAME byte_swap_4
+#if !defined(ALIAS) || !defined(NAME)
+#error ALIAS or NAME not defined
#endif
/*
@@ -39,6 +39,7 @@
*
* Argument is an unsigned 4-byte integer (u_int32_t).
*/
+XLEAF(ALIAS, 1)
LEAF(NAME, 1) /* a0 contains 0x01234567 */
extbl a0, 0, t0 /* t0 = 0x 67 */
extbl a0, 1, t1 /* t1 = 0x 45 */
diff --git a/sys/libkern/alpha/htonl.S b/sys/libkern/alpha/htonl.S
index b5ebaa5..2604034 100644
--- a/sys/libkern/alpha/htonl.S
+++ b/sys/libkern/alpha/htonl.S
@@ -28,6 +28,7 @@
* rights to redistribute these changes.
*/
-#define NAME htonl
+#define ALIAS htonl
+#define NAME __htonl
#include <libkern/alpha/byte_swap_4.S>
diff --git a/sys/libkern/alpha/htons.S b/sys/libkern/alpha/htons.S
index 9ffabf4..6b8ea16 100644
--- a/sys/libkern/alpha/htons.S
+++ b/sys/libkern/alpha/htons.S
@@ -28,6 +28,7 @@
* rights to redistribute these changes.
*/
-#define NAME htons
+#define ALIAS htons
+#define NAME __htons
#include <libkern/alpha/byte_swap_2.S>
diff --git a/sys/libkern/alpha/ntohl.S b/sys/libkern/alpha/ntohl.S
index f86a404..590203a 100644
--- a/sys/libkern/alpha/ntohl.S
+++ b/sys/libkern/alpha/ntohl.S
@@ -28,6 +28,7 @@
* rights to redistribute these changes.
*/
-#define NAME ntohl
+#define ALIAS ntohl
+#define NAME __ntohl
#include <libkern/alpha/byte_swap_4.S>
diff --git a/sys/libkern/alpha/ntohs.S b/sys/libkern/alpha/ntohs.S
index 496f75c..9306881 100644
--- a/sys/libkern/alpha/ntohs.S
+++ b/sys/libkern/alpha/ntohs.S
@@ -28,6 +28,7 @@
* rights to redistribute these changes.
*/
-#define NAME ntohs
+#define ALIAS ntohs
+#define NAME __ntohs
#include <libkern/alpha/byte_swap_2.S>
OpenPOWER on IntegriCloud