summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-11-08 17:06:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-11-08 17:06:52 +0000
commit3d9ff1cf0f9bd38227713a2bd2392398d6466126 (patch)
treee072bb32217eb6be0a8a13e13cf34fa3822759d8 /sys
parent30340faab7bf25f8514bb36508138d02de8dbe7c (diff)
remove support for big endian; ok drahn
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/cpufunc.c30
-rw-r--r--sys/arch/arm/arm/in_cksum_arm.S35
-rw-r--r--sys/arch/arm/include/endian.h6
-rw-r--r--sys/arch/arm/include/exec.h6
-rw-r--r--sys/arch/arm/include/ieee.h9
5 files changed, 5 insertions, 81 deletions
diff --git a/sys/arch/arm/arm/cpufunc.c b/sys/arch/arm/arm/cpufunc.c
index fd1dc115d31..bfaf97f001b 100644
--- a/sys/arch/arm/arm/cpufunc.c
+++ b/sys/arch/arm/arm/cpufunc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.c,v 1.15 2011/11/06 13:47:57 miod Exp $ */
+/* $OpenBSD: cpufunc.c,v 1.16 2011/11/08 17:06:51 deraadt Exp $ */
/* $NetBSD: cpufunc.c,v 1.65 2003/11/05 12:53:15 scw Exp $ */
/*
@@ -1185,10 +1185,6 @@ arm8_setup()
| CPU_CONTROL_BPRD_ENABLE | CPU_CONTROL_ROM_ENABLE
| CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
/* Get clock configuration */
clocktest = arm8_clock_config(0, 0) & 0x0f;
@@ -1223,10 +1219,6 @@ arm9_setup()
| CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_VECRELOC
| CPU_CONTROL_ROUNDROBIN;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
@@ -1257,10 +1249,6 @@ arm10_setup()
| CPU_CONTROL_BPRD_ENABLE
| CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
@@ -1297,10 +1285,6 @@ arm11_setup()
| CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE
| CPU_CONTROL_ROUNDROBIN | CPU_CONTROL_CPCLK;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
/* Clear out the cache */
cpu_idcache_wbinv_all();
@@ -1372,10 +1356,6 @@ sa11x0_setup()
| CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE
| CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
@@ -1403,10 +1383,6 @@ ixp12x0_setup()
| CPU_CONTROL_ROM_ENABLE | CPU_CONTROL_IC_ENABLE
| CPU_CONTROL_VECRELOC;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
@@ -1447,10 +1423,6 @@ xscale_setup()
| CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE
| CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC;
-#ifdef __ARMEB__
- cpuctrl |= CPU_CONTROL_BEND_ENABLE;
-#endif
-
if (vector_page == ARM_VECTORS_HIGH)
cpuctrl |= CPU_CONTROL_VECRELOC;
diff --git a/sys/arch/arm/arm/in_cksum_arm.S b/sys/arch/arm/arm/in_cksum_arm.S
index aa79b930a3c..f706c3c9922 100644
--- a/sys/arch/arm/arm/in_cksum_arm.S
+++ b/sys/arch/arm/arm/in_cksum_arm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum_arm.S,v 1.2 2005/05/10 21:32:20 brad Exp $ */
+/* $OpenBSD: in_cksum_arm.S,v 1.3 2011/11/08 17:06:51 deraadt Exp $ */
/* $NetBSD: in_cksum_arm.S,v 1.3 2003/11/26 10:31:53 rearnsha Exp $ */
/*
@@ -133,19 +133,11 @@ ENTRY(in4_cksum)
ldr r4, [r6, #(IP_SRC - 1)] /* BE:r4 = x012 LE:r4 = 210x */
ldr r5, [r6, #(IP_SRC + 3)] /* BE:r5 = 3456 LE:r5 = 6543 */
ldrb r7, [r6, #(IP_SRC + 7)] /* r7 = ...7 */
-#ifdef __ARMEB__
- mov r4, r4, lsl #8 /* r4 = 012. */
- orr r4, r4, r5, lsr #24 /* r4 = 0123 */
- orr r5, r7, r5, lsl #8 /* r5 = 4567 */
- b .Lin4_cksum_add_ips
- nop
-#else
mov r4, r4, lsr #8 /* r4 = .210 */
orr r4, r4, r5, lsl #24 /* r4 = 3210 */
mov r5, r5, lsr #8 /* r5 = .654 */
orr r5, r5, r7, lsl #24 /* r5 = 7654 */
b .Lin4_cksum_add_ips
-#endif
/* 0x02: Data 16-bit aligned */
#ifdef __XSCALE__
@@ -172,25 +164,14 @@ ENTRY(in4_cksum)
ldrb r4, [r6, #(IP_SRC)] /* r4 = ...0 */
ldr r5, [r6, #(IP_SRC + 1)] /* BE:r5 = 1234 LE:r5 = 4321 */
ldr r7, [r6, #(IP_SRC + 5)] /* BE:r7 = 567x LE:r7 = x765 */
-#ifdef __ARMEB__
- mov r4, r4, lsl #24 /* r4 = 0... */
- orr r4, r4, r5, lsr #8 /* r4 = 0123 */
- mov r5, r5, lsl #24 /* r5 = 4... */
- orr r5, r5, r7, lsr #8 /* r5 = 4567 */
-#else
orr r4, r4, r5, lsl #8 /* r4 = 3210 */
mov r5, r5, lsr #24 /* r4 = ...4 */
orr r5, r5, r7, lsl #8 /* r5 = 7654 */
-#endif
/* FALLTHROUGH */
.Lin4_cksum_add_ips:
adds r5, r5, r4
-#ifndef __ARMEB__
adcs r8, r5, r8, lsl #8
-#else
- adcs r8, r5, r8
-#endif
adc r8, r8, #0x00
mov r1, #0x00
b .Lin4_cksum_skip_entry
@@ -257,17 +238,10 @@ ASENTRY_NP(L_cksumdata)
ldrgtb r6, [r0], #0x01 /* Fetch 3rd byte */
movle r6, #0x00
/* Combine the three bytes depending on endianness and alignment */
-#ifdef __ARMEB__
- orreq r2, r5, r4, lsl #8
- orreq r2, r2, r6, lsl #24
- orrne r2, r4, r5, lsl #8
- orrne r2, r2, r6, lsl #16
-#else
orreq r2, r4, r5, lsl #8
orreq r2, r2, r6, lsl #16
orrne r2, r5, r4, lsl #8
orrne r2, r2, r6, lsl #24
-#endif
subs r1, r1, r7 /* Update length */
moveq pc, lr /* All done? */
@@ -449,17 +423,10 @@ ASENTRY_NP(L_cksumdata)
movle r5, #0x00
/* Combine the three bytes depending on endianness and alignment */
tst r0, #0x01
-#ifdef __ARMEB__
- orreq r3, r4, r3, lsl #8
- orreq r3, r3, r5, lsl #24
- orrne r3, r3, r4, lsl #8
- orrne r3, r3, r5, lsl #16
-#else
orreq r3, r3, r4, lsl #8
orreq r3, r3, r5, lsl #16
orrne r3, r4, r3, lsl #8
orrne r3, r3, r5, lsl #24
-#endif
adds r2, r2, r3
adc r2, r2, #0x00
mov pc, lr
diff --git a/sys/arch/arm/include/endian.h b/sys/arch/arm/include/endian.h
index b5221b6cb5f..1c370350a02 100644
--- a/sys/arch/arm/include/endian.h
+++ b/sys/arch/arm/include/endian.h
@@ -1,13 +1,9 @@
-/* $OpenBSD: endian.h,v 1.5 2011/03/23 16:54:34 pirofti Exp $ */
+/* $OpenBSD: endian.h,v 1.6 2011/11/08 17:06:51 deraadt Exp $ */
#ifndef _ARM_ENDIAN_H_
#define _ARM_ENDIAN_H_
-#ifdef __ARMEB__
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
#define __STRICT_ALIGNMENT
#include <sys/endian.h>
diff --git a/sys/arch/arm/include/exec.h b/sys/arch/arm/include/exec.h
index bfc0f939471..d2ff44a438d 100644
--- a/sys/arch/arm/include/exec.h
+++ b/sys/arch/arm/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.1 2006/10/02 17:45:30 miod Exp $ */
+/* $OpenBSD: exec.h,v 1.2 2011/11/08 17:06:51 deraadt Exp $ */
/* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */
/*
@@ -38,11 +38,7 @@
#define ARCH_ELFSIZE 32
#define ELF_TARG_CLASS ELFCLASS32
-#ifdef __ARMEB__
-#define ELF_TARG_DATA ELFDATA2MSB
-#else
#define ELF_TARG_DATA ELFDATA2LSB
-#endif
#define ELF_TARG_MACH EM_ARM
#define _NLIST_DO_ELF
diff --git a/sys/arch/arm/include/ieee.h b/sys/arch/arm/include/ieee.h
index c0ef9ca2fbd..cf06580e3ef 100644
--- a/sys/arch/arm/include/ieee.h
+++ b/sys/arch/arm/include/ieee.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee.h,v 1.3 2008/09/07 20:36:06 martynas Exp $ */
+/* $OpenBSD: ieee.h,v 1.4 2011/11/08 17:06:51 deraadt Exp $ */
/* $NetBSD: ieee.h,v 1.2 2001/02/21 17:43:50 bjh21 Exp $ */
/*
@@ -118,17 +118,10 @@ struct ieee_single {
#ifdef __VFP_FP__
struct ieee_double {
-#ifdef __ARMEB__
- u_int dbl_sign:1;
- u_int dbl_exp:11;
- u_int dbl_frach:20;
- u_int dbl_fracl;
-#else /* !__ARMEB__ */
u_int dbl_fracl;
u_int dbl_frach:20;
u_int dbl_exp:11;
u_int dbl_sign:1;
-#endif /* !__ARMEB__ */
};
#else /* !__VFP_FP__ */
struct ieee_double {