summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2016-09-21 11:33:05 +0000
committerkettenis <kettenis@openbsd.org>2016-09-21 11:33:05 +0000
commite1753c980dc65ce9e84318a88d810b4958a1557c (patch)
treeb2e71cc9ad6670c8e94a8c2f98821965dc40785a
parentEnter rtable (diff)
downloadwireguard-openbsd-e1753c980dc65ce9e84318a88d810b4958a1557c.tar.xz
wireguard-openbsd-e1753c980dc65ce9e84318a88d810b4958a1557c.zip
Modernize arm assembly in the kernel for clang.
Based on a similar diff in bitrig. No binary change when compiled with gcc. ok patrick@
-rw-r--r--sys/arch/arm/arm/bcopyinout.S4
-rw-r--r--sys/arch/arm/arm/bus_space_notimpl.S4
-rw-r--r--sys/arch/arm/arm/copystr.S6
-rw-r--r--sys/arch/arm/arm/cpufunc_asm.S4
-rw-r--r--sys/arch/arm/arm/exception.S10
-rw-r--r--sys/arch/arm/arm/irq_dispatch.S6
-rw-r--r--sys/arch/arm/arm/locore.S8
-rw-r--r--sys/arch/arm/arm/sigcode.S8
-rw-r--r--sys/arch/arm/arm/vectors.S6
-rw-r--r--sys/arch/arm/include/asm.h4
-rw-r--r--sys/arch/arm/include/profile.h4
11 files changed, 32 insertions, 32 deletions
diff --git a/sys/arch/arm/arm/bcopyinout.S b/sys/arch/arm/arm/bcopyinout.S
index 4a6e727f5fe..7ee27b5d9b6 100644
--- a/sys/arch/arm/arm/bcopyinout.S
+++ b/sys/arch/arm/arm/bcopyinout.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcopyinout.S,v 1.5 2016/04/25 04:46:56 jsg Exp $ */
+/* $OpenBSD: bcopyinout.S,v 1.6 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: bcopyinout.S,v 1.13 2003/10/31 16:54:05 scw Exp $ */
/*
@@ -46,7 +46,7 @@
#else
.text
- .align 0
+ .align 2
#ifdef MULTIPROCESSOR
.Lcpu_info:
diff --git a/sys/arch/arm/arm/bus_space_notimpl.S b/sys/arch/arm/arm/bus_space_notimpl.S
index 7c26ec3048a..70b0f091d43 100644
--- a/sys/arch/arm/arm/bus_space_notimpl.S
+++ b/sys/arch/arm/arm/bus_space_notimpl.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus_space_notimpl.S,v 1.2 2007/05/27 16:10:39 drahn Exp $ */
+/* $OpenBSD: bus_space_notimpl.S,v 1.3 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: bus_space_notimpl.S,v 1.2 2001/09/10 02:20:19 reinoud Exp $ */
/*
@@ -65,7 +65,7 @@ LLABEL(__C(func,_text)) ; \
.align 0 ;
bs_notimpl_message:
- .asciz __S(BUS_SPACE) "_%s: args at %p"
+ .asciz __S(BUS_SPACE), "_%s: args at %p"
.align 2
bs_notimpl_panic:
diff --git a/sys/arch/arm/arm/copystr.S b/sys/arch/arm/arm/copystr.S
index e5004e2e61d..3c26de37bf5 100644
--- a/sys/arch/arm/arm/copystr.S
+++ b/sys/arch/arm/arm/copystr.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: copystr.S,v 1.6 2016/04/25 04:46:56 jsg Exp $ */
+/* $OpenBSD: copystr.S,v 1.7 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: copystr.S,v 1.8 2002/10/13 14:54:48 bjh21 Exp $ */
/*
@@ -45,7 +45,7 @@
#include <sys/errno.h>
.text
- .align 0
+ .align 2
#ifdef MULTIPROCESSOR
.Lcpu_info:
.word _C_LABEL(cpu_info)
@@ -210,5 +210,5 @@ ENTRY(copyoutstr)
Lcopystrpcbfaulttext:
.asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n"
- .align 0
+ .align 2
#endif
diff --git a/sys/arch/arm/arm/cpufunc_asm.S b/sys/arch/arm/arm/cpufunc_asm.S
index ba74c69699b..109e105efe4 100644
--- a/sys/arch/arm/arm/cpufunc_asm.S
+++ b/sys/arch/arm/arm/cpufunc_asm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc_asm.S,v 1.4 2016/04/25 04:46:56 jsg Exp $ */
+/* $OpenBSD: cpufunc_asm.S,v 1.5 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: cpufunc_asm.S,v 1.12 2003/09/06 09:14:52 rearnsha Exp $ */
/*
@@ -47,7 +47,7 @@
#include <arm/sysreg.h>
.text
- .align 0
+ .align 2
ENTRY(cpufunc_nullop)
mov pc, lr
diff --git a/sys/arch/arm/arm/exception.S b/sys/arch/arm/arm/exception.S
index 539a481e98a..f1bceac6864 100644
--- a/sys/arch/arm/arm/exception.S
+++ b/sys/arch/arm/arm/exception.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: exception.S,v 1.5 2015/01/18 12:03:11 jsg Exp $ */
+/* $OpenBSD: exception.S,v 1.6 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: exception.S,v 1.13 2003/10/31 16:30:15 scw Exp $ */
/*
@@ -52,7 +52,7 @@
#include "assym.h"
.text
- .align 0
+ .align 2
AST_LOCALS
@@ -120,7 +120,7 @@ abortprefetch:
abortprefetchmsg:
.asciz "abortprefetch"
- .align 0
+ .align 2
/*
* data_abort_entry:
@@ -157,7 +157,7 @@ abortdata:
abortdatamsg:
.asciz "abortdata"
- .align 0
+ .align 2
/*
* address_exception_entry:
@@ -231,7 +231,7 @@ ENTRY_NP(undefinedinstruction_bounce)
b _C_LABEL(undefinedinstruction)
.data
- .align 0
+ .align 2
/*
* Indirection data
diff --git a/sys/arch/arm/arm/irq_dispatch.S b/sys/arch/arm/arm/irq_dispatch.S
index bdcb08b824b..44068760c15 100644
--- a/sys/arch/arm/arm/irq_dispatch.S
+++ b/sys/arch/arm/arm/irq_dispatch.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: irq_dispatch.S,v 1.11 2016/04/25 04:46:56 jsg Exp $ */
+/* $OpenBSD: irq_dispatch.S,v 1.12 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: irq_dispatch.S,v 1.5 2003/10/30 08:57:24 scw Exp $ */
/*
@@ -86,7 +86,7 @@
* which can be used by different platforms.
*/
.text
- .align 0
+ .align 2
.Lcpu_info_primary:
.word _C_LABEL(cpu_info_primary)
@@ -129,7 +129,7 @@ ASENTRY_NP(irq_entry)
movs pc, lr /* Exit */
.bss
- .align 0
+ .align 2
.global _C_LABEL(astpending)
_C_LABEL(astpending):
diff --git a/sys/arch/arm/arm/locore.S b/sys/arch/arm/arm/locore.S
index 213479b8b0e..a1532f63d6d 100644
--- a/sys/arch/arm/arm/locore.S
+++ b/sys/arch/arm/arm/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.10 2016/04/25 04:46:56 jsg Exp $ */
+/* $OpenBSD: locore.S,v 1.11 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */
/*
@@ -49,7 +49,7 @@
*/
.text
- .align 0
+ .align 2
ENTRY_NP(kernel_text)
@@ -98,14 +98,14 @@ ASENTRY_NP(start)
.Lmainreturned:
.asciz "main() returned"
- .align 0
+ .align 2
.bss
svcstk:
.space INIT_ARM_STACK_SIZE
.text
- .align 0
+ .align 2
#ifndef OFW
/* OFW based systems will use OF_boot() */
diff --git a/sys/arch/arm/arm/sigcode.S b/sys/arch/arm/arm/sigcode.S
index 2e0cfef9aa7..ba701882a51 100644
--- a/sys/arch/arm/arm/sigcode.S
+++ b/sys/arch/arm/arm/sigcode.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigcode.S,v 1.4 2016/05/23 20:11:49 deraadt Exp $ */
+/* $OpenBSD: sigcode.S,v 1.5 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: sigcode.S,v 1.6 2003/10/05 19:44:58 matt Exp $ */
/*
@@ -42,7 +42,7 @@
*/
.section .rodata
- .align 0
+ .align 2
.globl sigcode
.type x,_ASM_TYPE_FUNCTION
sigcode:
@@ -54,7 +54,7 @@ sigcode:
*/
/* mov r0, sp */
add r0, sp, #SIGF_SC
- ldr r12, =SYS_sigreturn
+ mov r12, #SYS_sigreturn
swi SYS_sigreturn
.globl _C_LABEL(sigcoderet)
_C_LABEL(sigcoderet):
@@ -64,7 +64,7 @@ _C_LABEL(sigcoderet):
swi SYS_exit
b . - 8
- .align 0
+ .align 2
.global _C_LABEL(esigcode)
_C_LABEL(esigcode):
diff --git a/sys/arch/arm/arm/vectors.S b/sys/arch/arm/arm/vectors.S
index 41d5deb1879..608335d719d 100644
--- a/sys/arch/arm/arm/vectors.S
+++ b/sys/arch/arm/arm/vectors.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: vectors.S,v 1.1 2004/02/01 05:09:48 drahn Exp $ */
+/* $OpenBSD: vectors.S,v 1.2 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: vectors.S,v 1.4 2002/08/17 16:36:32 thorpej Exp $ */
/*
@@ -44,7 +44,7 @@
*/
.text
- .align 0
+ .align 2
.global _C_LABEL(page0), _C_LABEL(page0_data), _C_LABEL(page0_end)
.global _C_LABEL(fiqvector)
@@ -97,7 +97,7 @@ _C_LABEL(page0_end):
#ifdef __ARM_FIQ_INDIRECT
.data
- .align 0
+ .align 2
_C_LABEL(fiqvector):
subs pc, lr, #4
.org _C_LABEL(fiqvector) + 0x100
diff --git a/sys/arch/arm/include/asm.h b/sys/arch/arm/include/asm.h
index e9963628fc7..339564c1e18 100644
--- a/sys/arch/arm/include/asm.h
+++ b/sys/arch/arm/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.6 2016/05/27 16:32:38 deraadt Exp $ */
+/* $OpenBSD: asm.h,v 1.7 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: asm.h,v 1.4 2001/07/16 05:43:32 matt Exp $ */
/*
@@ -50,7 +50,7 @@
#endif
#ifndef _ALIGN_TEXT
-# define _ALIGN_TEXT .align 0
+# define _ALIGN_TEXT .align 2
#endif
/*
diff --git a/sys/arch/arm/include/profile.h b/sys/arch/arm/include/profile.h
index ecb61a95d89..93b324c213c 100644
--- a/sys/arch/arm/include/profile.h
+++ b/sys/arch/arm/include/profile.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: profile.h,v 1.4 2016/05/27 16:32:38 deraadt Exp $ */
+/* $OpenBSD: profile.h,v 1.5 2016/09/21 11:33:05 kettenis Exp $ */
/* $NetBSD: profile.h,v 1.5 2002/03/24 15:49:40 bjh21 Exp $ */
/*
@@ -50,7 +50,7 @@
#define MCOUNT \
__asm__(".text"); \
- __asm__(".align 0"); \
+ __asm__(".align 2"); \
__asm__(".type " MCOUNT_ASM_NAME ",%function"); \
__asm__(".global " MCOUNT_ASM_NAME); \
__asm__(MCOUNT_ASM_NAME ":"); \