diff options
-rw-r--r-- | sys/arm/arm/bcopyinout.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/bcopyinout_xscale.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/copystr.S | 4 | ||||
-rw-r--r-- | sys/arm/arm/cpufunc_asm.S | 4 | ||||
-rw-r--r-- | sys/arm/arm/cpufunc_asm_arm10.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/cpufunc_asm_arm9.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/cpufunc_asm_armv5.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/exception.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/fusu.S | 2 | ||||
-rw-r--r-- | sys/arm/arm/locore-v4.S | 10 | ||||
-rw-r--r-- | sys/arm/arm/locore-v6.S | 12 | ||||
-rw-r--r-- | sys/arm/include/asm.h | 6 | ||||
-rw-r--r-- | sys/arm/include/profile.h | 2 | ||||
-rw-r--r-- | sys/conf/kmod.mk | 5 |
14 files changed, 31 insertions, 26 deletions
diff --git a/sys/arm/arm/bcopyinout.S b/sys/arm/arm/bcopyinout.S index ce6a430..3624f92 100644 --- a/sys/arm/arm/bcopyinout.S +++ b/sys/arm/arm/bcopyinout.S @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #else .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ diff --git a/sys/arm/arm/bcopyinout_xscale.S b/sys/arm/arm/bcopyinout_xscale.S index 5c1026f..487737e 100644 --- a/sys/arm/arm/bcopyinout_xscale.S +++ b/sys/arm/arm/bcopyinout_xscale.S @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); .syntax unified .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ diff --git a/sys/arm/arm/copystr.S b/sys/arm/arm/copystr.S index 0b95686..57c9e70 100644 --- a/sys/arm/arm/copystr.S +++ b/sys/arm/arm/copystr.S @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include <sys/errno.h> .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ @@ -210,5 +210,5 @@ END(copyoutstr) Lcopystrpcbfaulttext: .asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n" - .align 0 + .align 2 #endif diff --git a/sys/arm/arm/cpufunc_asm.S b/sys/arm/arm/cpufunc_asm.S index eeff722..12f5840 100644 --- a/sys/arm/arm/cpufunc_asm.S +++ b/sys/arm/arm/cpufunc_asm.S @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 ENTRY(cpufunc_nullop) RET @@ -138,7 +138,7 @@ ENTRY(cpufunc_control) RET .Lglou: .asciz "plop %p\n" - .align 0 + .align 2 END(cpufunc_control) /* diff --git a/sys/arm/arm/cpufunc_asm_arm10.S b/sys/arm/arm/cpufunc_asm_arm10.S index 9ef3115..97af69d 100644 --- a/sys/arm/arm/cpufunc_asm_arm10.S +++ b/sys/arm/arm/cpufunc_asm_arm10.S @@ -265,7 +265,7 @@ END(arm10_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm10_dcache_sets_max) .space 4 C_OBJECT(arm10_dcache_index_max) diff --git a/sys/arm/arm/cpufunc_asm_arm9.S b/sys/arm/arm/cpufunc_asm_arm9.S index bae7f71..24a3142 100644 --- a/sys/arm/arm/cpufunc_asm_arm9.S +++ b/sys/arm/arm/cpufunc_asm_arm9.S @@ -252,7 +252,7 @@ END(arm9_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm9_dcache_sets_max) .space 4 C_OBJECT(arm9_dcache_index_max) diff --git a/sys/arm/arm/cpufunc_asm_armv5.S b/sys/arm/arm/cpufunc_asm_armv5.S index 582ea50..c38d036 100644 --- a/sys/arm/arm/cpufunc_asm_armv5.S +++ b/sys/arm/arm/cpufunc_asm_armv5.S @@ -236,7 +236,7 @@ END(armv5_idcache_wbinv_all) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(armv5_dcache_sets_max) .space 4 C_OBJECT(armv5_dcache_index_max) diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S index 3886968..17172f8 100644 --- a/sys/arm/arm/exception.S +++ b/sys/arm/arm/exception.S @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 /* * ASM macros for pushing and pulling trapframes from the stack diff --git a/sys/arm/arm/fusu.S b/sys/arm/arm/fusu.S index 3d2716a..dec49ed 100644 --- a/sys/arm/arm/fusu.S +++ b/sys/arm/arm/fusu.S @@ -204,7 +204,7 @@ Lblock_userspace_access: .word _C_LABEL(block_userspace_access) .data - .align 0 + .align 2 .global _C_LABEL(block_userspace_access) _C_LABEL(block_userspace_access): .word 0 diff --git a/sys/arm/arm/locore-v4.S b/sys/arm/arm/locore-v4.S index 0c32cb7..6c20b68 100644 --- a/sys/arm/arm/locore-v4.S +++ b/sys/arm/arm/locore-v4.S @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); * the running kernel. */ .text - .align 0 + .align 2 #ifdef PHYSADDR .globl kernbase .set kernbase,KERNBASE @@ -373,7 +373,7 @@ Lend: .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -389,7 +389,7 @@ pagetable: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -476,7 +476,7 @@ mpvirt_done: .Lmpreturned: .asciz "init_secondary() returned" - .align 0 + .align 2 END(mpentry) #endif @@ -584,7 +584,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): diff --git a/sys/arm/arm/locore-v6.S b/sys/arm/arm/locore-v6.S index 1e29545..e690108 100644 --- a/sys/arm/arm/locore-v6.S +++ b/sys/arm/arm/locore-v6.S @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define INIT_ARM_STACK_SIZE 2048 .text - .align 0 + .align 2 /* * On entry for FreeBSD boot ABI: @@ -373,7 +373,7 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -390,7 +390,7 @@ boot_pt1: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -443,11 +443,11 @@ ASENTRY_NP(mpentry) adr r0, .Lmpreturned b _C_LABEL(panic) /* NOTREACHED */ +END(mpentry) .Lmpreturned: .asciz "init_secondary() returned" - .align 0 -END(mpentry) + .align 2 #endif ENTRY_NP(cpu_halt) @@ -525,7 +525,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h index a182863..53453d9 100644 --- a/sys/arm/include/asm.h +++ b/sys/arm/include/asm.h @@ -46,7 +46,7 @@ #define _ASM_LABEL(x) x #ifndef _ALIGN_TEXT -# define _ALIGN_TEXT .align 0 +# define _ALIGN_TEXT .align 2 #endif #if defined(__ARM_EABI__) && !defined(_STANDALONE) @@ -129,11 +129,11 @@ pclabel: add got, got, pc #ifdef __thumb__ #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4) #else #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8) #endif diff --git a/sys/arm/include/profile.h b/sys/arm/include/profile.h index 0c5a767..c465ba6 100644 --- a/sys/arm/include/profile.h +++ b/sys/arm/include/profile.h @@ -60,7 +60,7 @@ typedef u_long fptrdiff_t; #define MCOUNT \ __asm__(".text"); \ - __asm__(".align 0"); \ + __asm__(".align 2"); \ __asm__(".type __mcount ,%function"); \ __asm__(".global __mcount"); \ __asm__("__mcount:"); \ diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 0d688ef..8370e51 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -125,6 +125,11 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +# Temporary workaround for PR 196407, which contains the fascinating details. +.if ${MACHINE_CPUARCH} == arm +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.endif + .if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif |