summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/lshrti3.c
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2020-08-13 10:02:46 +0000
committerjca <jca@openbsd.org>2020-08-13 10:02:46 +0000
commit49f00df61520a457c70db7bca65b2d6bc6acdd2a (patch)
treef4c7086902706850ed64fab7a1fa31c4fd0a845d /sys/lib/libkern/lshrti3.c
parentAdd a ROUTE_FLAGFILTER socket option for routing sockets, allowing (diff)
downloadwireguard-openbsd-49f00df61520a457c70db7bca65b2d6bc6acdd2a.tar.xz
wireguard-openbsd-49f00df61520a457c70db7bca65b2d6bc6acdd2a.zip
Move compiler_rt type definitions to a separate header
so that we can reuse them in other compiler_rt routines. ok kettenis@
Diffstat (limited to 'sys/lib/libkern/lshrti3.c')
-rw-r--r--sys/lib/libkern/lshrti3.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/sys/lib/libkern/lshrti3.c b/sys/lib/libkern/lshrti3.c
index 1e1009f142a..82fa63ceca6 100644
--- a/sys/lib/libkern/lshrti3.c
+++ b/sys/lib/libkern/lshrti3.c
@@ -12,42 +12,12 @@
* ===----------------------------------------------------------------------===
*/
+#include "crt_glue.h"
+
/* Returns: logical a >> b */
/* Precondition: 0 <= b < bits_in_tword */
-#include <sys/limits.h>
-#include <sys/endian.h>
-
-typedef int si_int;
-typedef unsigned int su_int;
-typedef long long di_int;
-typedef unsigned long long du_int;
-typedef int ti_int __attribute__ ((mode (TI)));
-typedef int tu_int __attribute__ ((mode (TI)));
-
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define _YUGA_LITTLE_ENDIAN 0
-#else
-#define _YUGA_LITTLE_ENDIAN 1
-#endif
-
-typedef union
-{
- tu_int all;
- struct
- {
-#if _YUGA_LITTLE_ENDIAN
- du_int low;
- du_int high;
-#else
- du_int high;
- du_int low;
-#endif /* _YUGA_LITTLE_ENDIAN */
- }s;
-} utwords;
-
-
ti_int
__lshrti3(ti_int a, si_int b)
{