Fix alignment directives in arm asm code after clang 3.5 import.
The ancient gas we've been using interprets .align 0 as align to the minimum required alignment for the current section. Clang's integrated assembler interprets it as align to a byte boundary. Fortunately both assemblers interpret a non-zero value as align to 2^N so just make sure we have appropriate non-zero values everywhere.
This commit is contained in:
parent
17dfd895ce
commit
301e1601ad
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
#else
|
||||
|
||||
.text
|
||||
.align 0
|
||||
.align 2
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
#define GET_PCB(tmp) \
|
||||
|
@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
.syntax unified
|
||||
.text
|
||||
.align 0
|
||||
.align 2
|
||||
|
||||
#ifdef _ARM_ARCH_6
|
||||
#define GET_PCB(tmp) \
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
/*
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -54,7 +54,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
.text
|
||||
.align 0
|
||||
.align 2
|
||||
|
||||
/*
|
||||
* ASM macros for pushing and pulling trapframes from the stack
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
||||
|
@ -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):
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:"); \
|
||||
|
Loading…
Reference in New Issue
Block a user