1d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 24baa9922SRussell King /* 34baa9922SRussell King * arch/arm/include/asm/assembler.h 44baa9922SRussell King * 54baa9922SRussell King * Copyright (C) 1996-2000 Russell King 64baa9922SRussell King * 74baa9922SRussell King * This file contains arm architecture specific defines 84baa9922SRussell King * for the different processors. 94baa9922SRussell King * 104baa9922SRussell King * Do not include any C declarations in this file - it is included by 114baa9922SRussell King * assembler source. 124baa9922SRussell King */ 132bc58a6fSMagnus Damm #ifndef __ASM_ASSEMBLER_H__ 142bc58a6fSMagnus Damm #define __ASM_ASSEMBLER_H__ 152bc58a6fSMagnus Damm 164baa9922SRussell King #ifndef __ASSEMBLY__ 174baa9922SRussell King #error "Only include this from assembly code" 184baa9922SRussell King #endif 194baa9922SRussell King 204baa9922SRussell King #include <asm/ptrace.h> 2180c59dafSDave Martin #include <asm/opcodes-virt.h> 220b1f68e8SCatalin Marinas #include <asm/asm-offsets.h> 239a2b51b6SAndrey Ryabinin #include <asm/page.h> 249a2b51b6SAndrey Ryabinin #include <asm/thread_info.h> 25747ffc2fSRussell King #include <asm/uaccess-asm.h> 264baa9922SRussell King 276f6f6a70SRob Herring #define IOMEM(x) (x) 286f6f6a70SRob Herring 294baa9922SRussell King /* 304baa9922SRussell King * Endian independent macros for shifting bytes within registers. 314baa9922SRussell King */ 324baa9922SRussell King #ifndef __ARMEB__ 33d98b90eaSVictor Kamensky #define lspull lsr 34d98b90eaSVictor Kamensky #define lspush lsl 354baa9922SRussell King #define get_byte_0 lsl #0 364baa9922SRussell King #define get_byte_1 lsr #8 374baa9922SRussell King #define get_byte_2 lsr #16 384baa9922SRussell King #define get_byte_3 lsr #24 394baa9922SRussell King #define put_byte_0 lsl #0 404baa9922SRussell King #define put_byte_1 lsl #8 414baa9922SRussell King #define put_byte_2 lsl #16 424baa9922SRussell King #define put_byte_3 lsl #24 434baa9922SRussell King #else 44d98b90eaSVictor Kamensky #define lspull lsl 45d98b90eaSVictor Kamensky #define lspush lsr 464baa9922SRussell King #define get_byte_0 lsr #24 474baa9922SRussell King #define get_byte_1 lsr #16 484baa9922SRussell King #define get_byte_2 lsr #8 494baa9922SRussell King #define get_byte_3 lsl #0 504baa9922SRussell King #define put_byte_0 lsl #24 514baa9922SRussell King #define put_byte_1 lsl #16 524baa9922SRussell King #define put_byte_2 lsl #8 534baa9922SRussell King #define put_byte_3 lsl #0 544baa9922SRussell King #endif 554baa9922SRussell King 56457c2403SBen Dooks /* Select code for any configuration running in BE8 mode */ 57457c2403SBen Dooks #ifdef CONFIG_CPU_ENDIAN_BE8 58457c2403SBen Dooks #define ARM_BE8(code...) code 59457c2403SBen Dooks #else 60457c2403SBen Dooks #define ARM_BE8(code...) 61457c2403SBen Dooks #endif 62457c2403SBen Dooks 634baa9922SRussell King /* 644baa9922SRussell King * Data preload for architectures that support it 654baa9922SRussell King */ 664baa9922SRussell King #if __LINUX_ARM_ARCH__ >= 5 674baa9922SRussell King #define PLD(code...) code 684baa9922SRussell King #else 694baa9922SRussell King #define PLD(code...) 704baa9922SRussell King #endif 714baa9922SRussell King 724baa9922SRussell King /* 734baa9922SRussell King * This can be used to enable code to cacheline align the destination 744baa9922SRussell King * pointer when bulk writing to memory. Experiments on StrongARM and 754baa9922SRussell King * XScale didn't show this a worthwhile thing to do when the cache is not 764baa9922SRussell King * set to write-allocate (this would need further testing on XScale when WA 774baa9922SRussell King * is used). 784baa9922SRussell King * 794baa9922SRussell King * On Feroceon there is much to gain however, regardless of cache mode. 804baa9922SRussell King */ 814baa9922SRussell King #ifdef CONFIG_CPU_FEROCEON 824baa9922SRussell King #define CALGN(code...) code 834baa9922SRussell King #else 844baa9922SRussell King #define CALGN(code...) 854baa9922SRussell King #endif 864baa9922SRussell King 87ffa47aa6SArnd Bergmann #define IMM12_MASK 0xfff 88ffa47aa6SArnd Bergmann 89d4664b6cSArd Biesheuvel /* the frame pointer used for stack unwinding */ 90d4664b6cSArd Biesheuvel ARM( fpreg .req r11 ) 91d4664b6cSArd Biesheuvel THUMB( fpreg .req r7 ) 92d4664b6cSArd Biesheuvel 934baa9922SRussell King /* 944baa9922SRussell King * Enable and disable interrupts 954baa9922SRussell King */ 964baa9922SRussell King #if __LINUX_ARM_ARCH__ >= 6 970d928b0bSUwe Kleine-König .macro disable_irq_notrace 984baa9922SRussell King cpsid i 994baa9922SRussell King .endm 1004baa9922SRussell King 1010d928b0bSUwe Kleine-König .macro enable_irq_notrace 1024baa9922SRussell King cpsie i 1034baa9922SRussell King .endm 1044baa9922SRussell King #else 1050d928b0bSUwe Kleine-König .macro disable_irq_notrace 1064baa9922SRussell King msr cpsr_c, #PSR_I_BIT | SVC_MODE 1074baa9922SRussell King .endm 1084baa9922SRussell King 1090d928b0bSUwe Kleine-König .macro enable_irq_notrace 1104baa9922SRussell King msr cpsr_c, #SVC_MODE 1114baa9922SRussell King .endm 1124baa9922SRussell King #endif 1134baa9922SRussell King 114b9baf5c8SRussell King (Oracle) #if __LINUX_ARM_ARCH__ < 7 115b9baf5c8SRussell King (Oracle) .macro dsb, args 116b9baf5c8SRussell King (Oracle) mcr p15, 0, r0, c7, c10, 4 117b9baf5c8SRussell King (Oracle) .endm 118b9baf5c8SRussell King (Oracle) 119b9baf5c8SRussell King (Oracle) .macro isb, args 12033970b03SRussell King (Oracle) mcr p15, 0, r0, c7, c5, 4 121b9baf5c8SRussell King (Oracle) .endm 122b9baf5c8SRussell King (Oracle) #endif 123b9baf5c8SRussell King (Oracle) 1243302caddSRussell King .macro asm_trace_hardirqs_off, save=1 1250d928b0bSUwe Kleine-König #if defined(CONFIG_TRACE_IRQFLAGS) 1263302caddSRussell King .if \save 1270d928b0bSUwe Kleine-König stmdb sp!, {r0-r3, ip, lr} 1283302caddSRussell King .endif 1290d928b0bSUwe Kleine-König bl trace_hardirqs_off 1303302caddSRussell King .if \save 1310d928b0bSUwe Kleine-König ldmia sp!, {r0-r3, ip, lr} 1323302caddSRussell King .endif 1330d928b0bSUwe Kleine-König #endif 1340d928b0bSUwe Kleine-König .endm 1350d928b0bSUwe Kleine-König 1363302caddSRussell King .macro asm_trace_hardirqs_on, cond=al, save=1 1370d928b0bSUwe Kleine-König #if defined(CONFIG_TRACE_IRQFLAGS) 1380d928b0bSUwe Kleine-König /* 1390d928b0bSUwe Kleine-König * actually the registers should be pushed and pop'd conditionally, but 1400d928b0bSUwe Kleine-König * after bl the flags are certainly clobbered 1410d928b0bSUwe Kleine-König */ 1423302caddSRussell King .if \save 1430d928b0bSUwe Kleine-König stmdb sp!, {r0-r3, ip, lr} 1443302caddSRussell King .endif 1450d928b0bSUwe Kleine-König bl\cond trace_hardirqs_on 1463302caddSRussell King .if \save 1470d928b0bSUwe Kleine-König ldmia sp!, {r0-r3, ip, lr} 1483302caddSRussell King .endif 1490d928b0bSUwe Kleine-König #endif 1500d928b0bSUwe Kleine-König .endm 1510d928b0bSUwe Kleine-König 1523302caddSRussell King .macro disable_irq, save=1 1530d928b0bSUwe Kleine-König disable_irq_notrace 1543302caddSRussell King asm_trace_hardirqs_off \save 1550d928b0bSUwe Kleine-König .endm 1560d928b0bSUwe Kleine-König 1570d928b0bSUwe Kleine-König .macro enable_irq 1580d928b0bSUwe Kleine-König asm_trace_hardirqs_on 1590d928b0bSUwe Kleine-König enable_irq_notrace 1600d928b0bSUwe Kleine-König .endm 1614baa9922SRussell King /* 1624baa9922SRussell King * Save the current IRQ state and disable IRQs. Note that this macro 1634baa9922SRussell King * assumes FIQs are enabled, and that the processor is in SVC mode. 1644baa9922SRussell King */ 1654baa9922SRussell King .macro save_and_disable_irqs, oldcpsr 16655bdd694SCatalin Marinas #ifdef CONFIG_CPU_V7M 16755bdd694SCatalin Marinas mrs \oldcpsr, primask 16855bdd694SCatalin Marinas #else 1694baa9922SRussell King mrs \oldcpsr, cpsr 17055bdd694SCatalin Marinas #endif 1714baa9922SRussell King disable_irq 1724baa9922SRussell King .endm 1734baa9922SRussell King 1748e43a905SRabin Vincent .macro save_and_disable_irqs_notrace, oldcpsr 175b2bf482aSVladimir Murzin #ifdef CONFIG_CPU_V7M 176b2bf482aSVladimir Murzin mrs \oldcpsr, primask 177b2bf482aSVladimir Murzin #else 1788e43a905SRabin Vincent mrs \oldcpsr, cpsr 179b2bf482aSVladimir Murzin #endif 1808e43a905SRabin Vincent disable_irq_notrace 1818e43a905SRabin Vincent .endm 1828e43a905SRabin Vincent 1834baa9922SRussell King /* 1844baa9922SRussell King * Restore interrupt state previously stored in a register. We don't 1854baa9922SRussell King * guarantee that this will preserve the flags. 1864baa9922SRussell King */ 1870d928b0bSUwe Kleine-König .macro restore_irqs_notrace, oldcpsr 18855bdd694SCatalin Marinas #ifdef CONFIG_CPU_V7M 18955bdd694SCatalin Marinas msr primask, \oldcpsr 19055bdd694SCatalin Marinas #else 1914baa9922SRussell King msr cpsr_c, \oldcpsr 19255bdd694SCatalin Marinas #endif 1934baa9922SRussell King .endm 1944baa9922SRussell King 1950d928b0bSUwe Kleine-König .macro restore_irqs, oldcpsr 1960d928b0bSUwe Kleine-König tst \oldcpsr, #PSR_I_BIT 19701e09a28SRussell King asm_trace_hardirqs_on cond=eq 1980d928b0bSUwe Kleine-König restore_irqs_notrace \oldcpsr 1990d928b0bSUwe Kleine-König .endm 2000d928b0bSUwe Kleine-König 20139ad04ccSCatalin Marinas /* 20214327c66SRussell King * Assembly version of "adr rd, BSYM(sym)". This should only be used to 20314327c66SRussell King * reference local symbols in the same assembly file which are to be 20414327c66SRussell King * resolved by the assembler. Other usage is undefined. 20514327c66SRussell King */ 20614327c66SRussell King .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo 20714327c66SRussell King .macro badr\c, rd, sym 20814327c66SRussell King #ifdef CONFIG_THUMB2_KERNEL 20914327c66SRussell King adr\c \rd, \sym + 1 21014327c66SRussell King #else 21114327c66SRussell King adr\c \rd, \sym 21214327c66SRussell King #endif 21314327c66SRussell King .endm 21414327c66SRussell King .endr 21514327c66SRussell King 21614327c66SRussell King /* 21739ad04ccSCatalin Marinas * Get current thread_info. 21839ad04ccSCatalin Marinas */ 21939ad04ccSCatalin Marinas .macro get_thread_info, rd 22018ed1c01SArd Biesheuvel /* thread_info is the first member of struct task_struct */ 22118ed1c01SArd Biesheuvel get_current \rd 22239ad04ccSCatalin Marinas .endm 22339ad04ccSCatalin Marinas 2240b1f68e8SCatalin Marinas /* 2250b1f68e8SCatalin Marinas * Increment/decrement the preempt count. 2260b1f68e8SCatalin Marinas */ 2270b1f68e8SCatalin Marinas #ifdef CONFIG_PREEMPT_COUNT 2280b1f68e8SCatalin Marinas .macro inc_preempt_count, ti, tmp 2290b1f68e8SCatalin Marinas ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count 2300b1f68e8SCatalin Marinas add \tmp, \tmp, #1 @ increment it 2310b1f68e8SCatalin Marinas str \tmp, [\ti, #TI_PREEMPT] 2320b1f68e8SCatalin Marinas .endm 2330b1f68e8SCatalin Marinas 2340b1f68e8SCatalin Marinas .macro dec_preempt_count, ti, tmp 2350b1f68e8SCatalin Marinas ldr \tmp, [\ti, #TI_PREEMPT] @ get preempt count 2360b1f68e8SCatalin Marinas sub \tmp, \tmp, #1 @ decrement it 2370b1f68e8SCatalin Marinas str \tmp, [\ti, #TI_PREEMPT] 2380b1f68e8SCatalin Marinas .endm 2390b1f68e8SCatalin Marinas 2400b1f68e8SCatalin Marinas .macro dec_preempt_count_ti, ti, tmp 2410b1f68e8SCatalin Marinas get_thread_info \ti 2420b1f68e8SCatalin Marinas dec_preempt_count \ti, \tmp 2430b1f68e8SCatalin Marinas .endm 2440b1f68e8SCatalin Marinas #else 2450b1f68e8SCatalin Marinas .macro inc_preempt_count, ti, tmp 2460b1f68e8SCatalin Marinas .endm 2470b1f68e8SCatalin Marinas 2480b1f68e8SCatalin Marinas .macro dec_preempt_count, ti, tmp 2490b1f68e8SCatalin Marinas .endm 2500b1f68e8SCatalin Marinas 2510b1f68e8SCatalin Marinas .macro dec_preempt_count_ti, ti, tmp 2520b1f68e8SCatalin Marinas .endm 2530b1f68e8SCatalin Marinas #endif 2540b1f68e8SCatalin Marinas 255f441882aSVincent Whitchurch #define USERL(l, x...) \ 2564baa9922SRussell King 9999: x; \ 2574260415fSRussell King .pushsection __ex_table,"a"; \ 2584baa9922SRussell King .align 3; \ 259f441882aSVincent Whitchurch .long 9999b,l; \ 2604260415fSRussell King .popsection 261bac4e960SRussell King 262f441882aSVincent Whitchurch #define USER(x...) USERL(9001f, x) 263f441882aSVincent Whitchurch 264f00ec48fSRussell King #ifdef CONFIG_SMP 265f00ec48fSRussell King #define ALT_SMP(instr...) \ 266f00ec48fSRussell King 9998: instr 267ed3768a8SDave Martin /* 268ed3768a8SDave Martin * Note: if you get assembler errors from ALT_UP() when building with 269ed3768a8SDave Martin * CONFIG_THUMB2_KERNEL, you almost certainly need to use 270ed3768a8SDave Martin * ALT_SMP( W(instr) ... ) 271ed3768a8SDave Martin */ 272f00ec48fSRussell King #define ALT_UP(instr...) \ 273f00ec48fSRussell King .pushsection ".alt.smp.init", "a" ;\ 2749f80ccdaSArd Biesheuvel .align 2 ;\ 275450abd38SArd Biesheuvel .long 9998b - . ;\ 276ed3768a8SDave Martin 9997: instr ;\ 27789c6bc58SRussell King .if . - 9997b == 2 ;\ 27889c6bc58SRussell King nop ;\ 27989c6bc58SRussell King .endif ;\ 280ed3768a8SDave Martin .if . - 9997b != 4 ;\ 281ed3768a8SDave Martin .error "ALT_UP() content must assemble to exactly 4 bytes";\ 282ed3768a8SDave Martin .endif ;\ 283f00ec48fSRussell King .popsection 284f00ec48fSRussell King #define ALT_UP_B(label) \ 285f00ec48fSRussell King .pushsection ".alt.smp.init", "a" ;\ 2869f80ccdaSArd Biesheuvel .align 2 ;\ 287450abd38SArd Biesheuvel .long 9998b - . ;\ 288a780e485SJian Cai W(b) . + (label - 9998b) ;\ 289f00ec48fSRussell King .popsection 290f00ec48fSRussell King #else 291f00ec48fSRussell King #define ALT_SMP(instr...) 292f00ec48fSRussell King #define ALT_UP(instr...) instr 293f00ec48fSRussell King #define ALT_UP_B(label) b label 294f00ec48fSRussell King #endif 295f00ec48fSRussell King 296bac4e960SRussell King /* 2977b9896c3SArd Biesheuvel * this_cpu_offset - load the per-CPU offset of this CPU into 2987b9896c3SArd Biesheuvel * register 'rd' 2997b9896c3SArd Biesheuvel */ 3007b9896c3SArd Biesheuvel .macro this_cpu_offset, rd:req 3017b9896c3SArd Biesheuvel #ifdef CONFIG_SMP 3027b9896c3SArd Biesheuvel ALT_SMP(mrc p15, 0, \rd, c13, c0, 4) 3037b9896c3SArd Biesheuvel #ifdef CONFIG_CPU_V6 3047b9896c3SArd Biesheuvel ALT_UP_B(.L1_\@) 3057b9896c3SArd Biesheuvel .L0_\@: 3067b9896c3SArd Biesheuvel .subsection 1 3077b9896c3SArd Biesheuvel .L1_\@: ldr_va \rd, __per_cpu_offset 3087b9896c3SArd Biesheuvel b .L0_\@ 3097b9896c3SArd Biesheuvel .previous 3107b9896c3SArd Biesheuvel #endif 3117b9896c3SArd Biesheuvel #else 3127b9896c3SArd Biesheuvel mov \rd, #0 3137b9896c3SArd Biesheuvel #endif 3147b9896c3SArd Biesheuvel .endm 3157b9896c3SArd Biesheuvel 3167b9896c3SArd Biesheuvel /* 3179c46929eSArd Biesheuvel * set_current - store the task pointer of this CPU's current task 3189c46929eSArd Biesheuvel */ 3199c46929eSArd Biesheuvel .macro set_current, rn:req, tmp:req 3209c46929eSArd Biesheuvel #if defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) || defined(CONFIG_SMP) 3219c46929eSArd Biesheuvel 9998: mcr p15, 0, \rn, c13, c0, 3 @ set TPIDRURO register 3229c46929eSArd Biesheuvel #ifdef CONFIG_CPU_V6 3239c46929eSArd Biesheuvel ALT_UP_B(.L0_\@) 3249c46929eSArd Biesheuvel .subsection 1 3259c46929eSArd Biesheuvel .L0_\@: str_va \rn, __current, \tmp 3269c46929eSArd Biesheuvel b .L1_\@ 3279c46929eSArd Biesheuvel .previous 3289c46929eSArd Biesheuvel .L1_\@: 3299c46929eSArd Biesheuvel #endif 3309c46929eSArd Biesheuvel #else 3319c46929eSArd Biesheuvel str_va \rn, __current, \tmp 3329c46929eSArd Biesheuvel #endif 3339c46929eSArd Biesheuvel .endm 3349c46929eSArd Biesheuvel 3359c46929eSArd Biesheuvel /* 3369c46929eSArd Biesheuvel * get_current - load the task pointer of this CPU's current task 3379c46929eSArd Biesheuvel */ 3389c46929eSArd Biesheuvel .macro get_current, rd:req 3399c46929eSArd Biesheuvel #if defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) || defined(CONFIG_SMP) 3409c46929eSArd Biesheuvel 9998: mrc p15, 0, \rd, c13, c0, 3 @ get TPIDRURO register 3419c46929eSArd Biesheuvel #ifdef CONFIG_CPU_V6 3429c46929eSArd Biesheuvel ALT_UP_B(.L0_\@) 3439c46929eSArd Biesheuvel .subsection 1 3449c46929eSArd Biesheuvel .L0_\@: ldr_va \rd, __current 3459c46929eSArd Biesheuvel b .L1_\@ 3469c46929eSArd Biesheuvel .previous 3479c46929eSArd Biesheuvel .L1_\@: 3489c46929eSArd Biesheuvel #endif 3499c46929eSArd Biesheuvel #else 3509c46929eSArd Biesheuvel ldr_va \rd, __current 3519c46929eSArd Biesheuvel #endif 3529c46929eSArd Biesheuvel .endm 3539c46929eSArd Biesheuvel 3549c46929eSArd Biesheuvel /* 3559c46929eSArd Biesheuvel * reload_current - reload the task pointer of this CPU's current task 3569c46929eSArd Biesheuvel * into the TLS register 3579c46929eSArd Biesheuvel */ 3589c46929eSArd Biesheuvel .macro reload_current, t1:req, t2:req 3599c46929eSArd Biesheuvel #if defined(CONFIG_CURRENT_POINTER_IN_TPIDRURO) || defined(CONFIG_SMP) 3609c46929eSArd Biesheuvel #ifdef CONFIG_CPU_V6 3619c46929eSArd Biesheuvel ALT_SMP(nop) 3629c46929eSArd Biesheuvel ALT_UP_B(.L0_\@) 3639c46929eSArd Biesheuvel #endif 3649c46929eSArd Biesheuvel ldr_this_cpu \t1, __entry_task, \t1, \t2 3659c46929eSArd Biesheuvel mcr p15, 0, \t1, c13, c0, 3 @ store in TPIDRURO 3669c46929eSArd Biesheuvel .L0_\@: 3679c46929eSArd Biesheuvel #endif 3689c46929eSArd Biesheuvel .endm 3699c46929eSArd Biesheuvel 3709c46929eSArd Biesheuvel /* 371d675d0bcSWill Deacon * Instruction barrier 372d675d0bcSWill Deacon */ 373d675d0bcSWill Deacon .macro instr_sync 374d675d0bcSWill Deacon #if __LINUX_ARM_ARCH__ >= 7 375d675d0bcSWill Deacon isb 376d675d0bcSWill Deacon #elif __LINUX_ARM_ARCH__ == 6 377d675d0bcSWill Deacon mcr p15, 0, r0, c7, c5, 4 378d675d0bcSWill Deacon #endif 379d675d0bcSWill Deacon .endm 380d675d0bcSWill Deacon 381d675d0bcSWill Deacon /* 382bac4e960SRussell King * SMP data memory barrier 383bac4e960SRussell King */ 384ed3768a8SDave Martin .macro smp_dmb mode 385bac4e960SRussell King #ifdef CONFIG_SMP 386bac4e960SRussell King #if __LINUX_ARM_ARCH__ >= 7 387ed3768a8SDave Martin .ifeqs "\mode","arm" 3883ea12806SWill Deacon ALT_SMP(dmb ish) 389ed3768a8SDave Martin .else 3903ea12806SWill Deacon ALT_SMP(W(dmb) ish) 391ed3768a8SDave Martin .endif 392bac4e960SRussell King #elif __LINUX_ARM_ARCH__ == 6 393f00ec48fSRussell King ALT_SMP(mcr p15, 0, r0, c7, c10, 5) @ dmb 394f00ec48fSRussell King #else 395f00ec48fSRussell King #error Incompatible SMP platform 396bac4e960SRussell King #endif 397ed3768a8SDave Martin .ifeqs "\mode","arm" 398f00ec48fSRussell King ALT_UP(nop) 399ed3768a8SDave Martin .else 400ed3768a8SDave Martin ALT_UP(W(nop)) 401ed3768a8SDave Martin .endif 402bac4e960SRussell King #endif 403bac4e960SRussell King .endm 404b86040a5SCatalin Marinas 40555bdd694SCatalin Marinas #if defined(CONFIG_CPU_V7M) 40655bdd694SCatalin Marinas /* 40755bdd694SCatalin Marinas * setmode is used to assert to be in svc mode during boot. For v7-M 40855bdd694SCatalin Marinas * this is done in __v7m_setup, so setmode can be empty here. 40955bdd694SCatalin Marinas */ 41055bdd694SCatalin Marinas .macro setmode, mode, reg 41155bdd694SCatalin Marinas .endm 41255bdd694SCatalin Marinas #elif defined(CONFIG_THUMB2_KERNEL) 413b86040a5SCatalin Marinas .macro setmode, mode, reg 414b86040a5SCatalin Marinas mov \reg, #\mode 415b86040a5SCatalin Marinas msr cpsr_c, \reg 416b86040a5SCatalin Marinas .endm 417b86040a5SCatalin Marinas #else 418b86040a5SCatalin Marinas .macro setmode, mode, reg 419b86040a5SCatalin Marinas msr cpsr_c, #\mode 420b86040a5SCatalin Marinas .endm 421b86040a5SCatalin Marinas #endif 4228b592783SCatalin Marinas 4238b592783SCatalin Marinas /* 42480c59dafSDave Martin * Helper macro to enter SVC mode cleanly and mask interrupts. reg is 42580c59dafSDave Martin * a scratch register for the macro to overwrite. 42680c59dafSDave Martin * 42780c59dafSDave Martin * This macro is intended for forcing the CPU into SVC mode at boot time. 42880c59dafSDave Martin * you cannot return to the original mode. 42980c59dafSDave Martin */ 43080c59dafSDave Martin .macro safe_svcmode_maskall reg:req 4310e0779daSLorenzo Pieralisi #if __LINUX_ARM_ARCH__ >= 6 && !defined(CONFIG_CPU_V7M) 43280c59dafSDave Martin mrs \reg , cpsr 4338e9c24a2SRussell King eor \reg, \reg, #HYP_MODE 4348e9c24a2SRussell King tst \reg, #MODE_MASK 43580c59dafSDave Martin bic \reg , \reg , #MODE_MASK 4368e9c24a2SRussell King orr \reg , \reg , #PSR_I_BIT | PSR_F_BIT | SVC_MODE 43780c59dafSDave Martin THUMB( orr \reg , \reg , #PSR_T_BIT ) 43880c59dafSDave Martin bne 1f 4392a552d5eSMarc Zyngier orr \reg, \reg, #PSR_A_BIT 44014327c66SRussell King badr lr, 2f 4412a552d5eSMarc Zyngier msr spsr_cxsf, \reg 44280c59dafSDave Martin __MSR_ELR_HYP(14) 44380c59dafSDave Martin __ERET 4442a552d5eSMarc Zyngier 1: msr cpsr_c, \reg 44580c59dafSDave Martin 2: 4461ecec696SDave Martin #else 4471ecec696SDave Martin /* 4481ecec696SDave Martin * workaround for possibly broken pre-v6 hardware 4491ecec696SDave Martin * (akita, Sharp Zaurus C-1000, PXA270-based) 4501ecec696SDave Martin */ 4511ecec696SDave Martin setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, \reg 4521ecec696SDave Martin #endif 45380c59dafSDave Martin .endm 45480c59dafSDave Martin 45580c59dafSDave Martin /* 4568b592783SCatalin Marinas * STRT/LDRT access macros with ARM and Thumb-2 variants 4578b592783SCatalin Marinas */ 4588b592783SCatalin Marinas #ifdef CONFIG_THUMB2_KERNEL 4598b592783SCatalin Marinas 4604e7682d0SCatalin Marinas .macro usraccoff, instr, reg, ptr, inc, off, cond, abort, t=TUSER() 4618b592783SCatalin Marinas 9999: 4628b592783SCatalin Marinas .if \inc == 1 463c001899aSStefan Agner \instr\()b\t\cond\().w \reg, [\ptr, #\off] 4648b592783SCatalin Marinas .elseif \inc == 4 465c001899aSStefan Agner \instr\t\cond\().w \reg, [\ptr, #\off] 4668b592783SCatalin Marinas .else 4678b592783SCatalin Marinas .error "Unsupported inc macro argument" 4688b592783SCatalin Marinas .endif 4698b592783SCatalin Marinas 4704260415fSRussell King .pushsection __ex_table,"a" 4718b592783SCatalin Marinas .align 3 4728b592783SCatalin Marinas .long 9999b, \abort 4734260415fSRussell King .popsection 4748b592783SCatalin Marinas .endm 4758b592783SCatalin Marinas 4768b592783SCatalin Marinas .macro usracc, instr, reg, ptr, inc, cond, rept, abort 4778b592783SCatalin Marinas @ explicit IT instruction needed because of the label 4788b592783SCatalin Marinas @ introduced by the USER macro 4798b592783SCatalin Marinas .ifnc \cond,al 4808b592783SCatalin Marinas .if \rept == 1 4818b592783SCatalin Marinas itt \cond 4828b592783SCatalin Marinas .elseif \rept == 2 4838b592783SCatalin Marinas ittt \cond 4848b592783SCatalin Marinas .else 4858b592783SCatalin Marinas .error "Unsupported rept macro argument" 4868b592783SCatalin Marinas .endif 4878b592783SCatalin Marinas .endif 4888b592783SCatalin Marinas 4898b592783SCatalin Marinas @ Slightly optimised to avoid incrementing the pointer twice 4908b592783SCatalin Marinas usraccoff \instr, \reg, \ptr, \inc, 0, \cond, \abort 4918b592783SCatalin Marinas .if \rept == 2 4921142b71dSWill Deacon usraccoff \instr, \reg, \ptr, \inc, \inc, \cond, \abort 4938b592783SCatalin Marinas .endif 4948b592783SCatalin Marinas 4958b592783SCatalin Marinas add\cond \ptr, #\rept * \inc 4968b592783SCatalin Marinas .endm 4978b592783SCatalin Marinas 4988b592783SCatalin Marinas #else /* !CONFIG_THUMB2_KERNEL */ 4998b592783SCatalin Marinas 5004e7682d0SCatalin Marinas .macro usracc, instr, reg, ptr, inc, cond, rept, abort, t=TUSER() 5018b592783SCatalin Marinas .rept \rept 5028b592783SCatalin Marinas 9999: 5038b592783SCatalin Marinas .if \inc == 1 504c001899aSStefan Agner \instr\()b\t\cond \reg, [\ptr], #\inc 5058b592783SCatalin Marinas .elseif \inc == 4 506c001899aSStefan Agner \instr\t\cond \reg, [\ptr], #\inc 5078b592783SCatalin Marinas .else 5088b592783SCatalin Marinas .error "Unsupported inc macro argument" 5098b592783SCatalin Marinas .endif 5108b592783SCatalin Marinas 5114260415fSRussell King .pushsection __ex_table,"a" 5128b592783SCatalin Marinas .align 3 5138b592783SCatalin Marinas .long 9999b, \abort 5144260415fSRussell King .popsection 5158b592783SCatalin Marinas .endr 5168b592783SCatalin Marinas .endm 5178b592783SCatalin Marinas 5188b592783SCatalin Marinas #endif /* CONFIG_THUMB2_KERNEL */ 5198b592783SCatalin Marinas 5208b592783SCatalin Marinas .macro strusr, reg, ptr, inc, cond=al, rept=1, abort=9001f 5218b592783SCatalin Marinas usracc str, \reg, \ptr, \inc, \cond, \rept, \abort 5228b592783SCatalin Marinas .endm 5238b592783SCatalin Marinas 5248b592783SCatalin Marinas .macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f 5258b592783SCatalin Marinas usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort 5268b592783SCatalin Marinas .endm 5278f51965eSDave Martin 5288f51965eSDave Martin /* Utility macro for declaring string literals */ 5298f51965eSDave Martin .macro string name:req, string 5308f51965eSDave Martin .type \name , #object 5318f51965eSDave Martin \name: 5328f51965eSDave Martin .asciz "\string" 5338f51965eSDave Martin .size \name , . - \name 5348f51965eSDave Martin .endm 5358f51965eSDave Martin 5366ebbf2ceSRussell King .irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo 5376ebbf2ceSRussell King .macro ret\c, reg 5386ebbf2ceSRussell King #if __LINUX_ARM_ARCH__ < 6 5396ebbf2ceSRussell King mov\c pc, \reg 5406ebbf2ceSRussell King #else 5416ebbf2ceSRussell King .ifeqs "\reg", "lr" 5426ebbf2ceSRussell King bx\c \reg 5436ebbf2ceSRussell King .else 5446ebbf2ceSRussell King mov\c pc, \reg 5456ebbf2ceSRussell King .endif 5466ebbf2ceSRussell King #endif 5476ebbf2ceSRussell King .endm 5486ebbf2ceSRussell King .endr 5496ebbf2ceSRussell King 5506ebbf2ceSRussell King .macro ret.w, reg 5516ebbf2ceSRussell King ret \reg 5526ebbf2ceSRussell King #ifdef CONFIG_THUMB2_KERNEL 5536ebbf2ceSRussell King nop 5546ebbf2ceSRussell King #endif 5556ebbf2ceSRussell King .endm 5566ebbf2ceSRussell King 5578bafae20SRussell King .macro bug, msg, line 5588bafae20SRussell King #ifdef CONFIG_THUMB2_KERNEL 5598bafae20SRussell King 1: .inst 0xde02 5608bafae20SRussell King #else 5618bafae20SRussell King 1: .inst 0xe7f001f2 5628bafae20SRussell King #endif 5638bafae20SRussell King #ifdef CONFIG_DEBUG_BUGVERBOSE 5648bafae20SRussell King .pushsection .rodata.str, "aMS", %progbits, 1 5658bafae20SRussell King 2: .asciz "\msg" 5668bafae20SRussell King .popsection 5678bafae20SRussell King .pushsection __bug_table, "aw" 5688bafae20SRussell King .align 2 5698bafae20SRussell King .word 1b, 2b 5708bafae20SRussell King .hword \line 5718bafae20SRussell King .popsection 5728bafae20SRussell King #endif 5738bafae20SRussell King .endm 5748bafae20SRussell King 5750d73c3f8SMasami Hiramatsu #ifdef CONFIG_KPROBES 5760d73c3f8SMasami Hiramatsu #define _ASM_NOKPROBE(entry) \ 5770d73c3f8SMasami Hiramatsu .pushsection "_kprobe_blacklist", "aw" ; \ 5780d73c3f8SMasami Hiramatsu .balign 4 ; \ 5790d73c3f8SMasami Hiramatsu .long entry; \ 5800d73c3f8SMasami Hiramatsu .popsection 5810d73c3f8SMasami Hiramatsu #else 5820d73c3f8SMasami Hiramatsu #define _ASM_NOKPROBE(entry) 5830d73c3f8SMasami Hiramatsu #endif 5840d73c3f8SMasami Hiramatsu 5850b167463SArd Biesheuvel .macro __adldst_l, op, reg, sym, tmp, c 5860b167463SArd Biesheuvel .if __LINUX_ARM_ARCH__ < 7 5870b167463SArd Biesheuvel ldr\c \tmp, .La\@ 5880b167463SArd Biesheuvel .subsection 1 5890b167463SArd Biesheuvel .align 2 5900b167463SArd Biesheuvel .La\@: .long \sym - .Lpc\@ 5910b167463SArd Biesheuvel .previous 5920b167463SArd Biesheuvel .else 5930b167463SArd Biesheuvel .ifnb \c 5940b167463SArd Biesheuvel THUMB( ittt \c ) 5950b167463SArd Biesheuvel .endif 5960b167463SArd Biesheuvel movw\c \tmp, #:lower16:\sym - .Lpc\@ 5970b167463SArd Biesheuvel movt\c \tmp, #:upper16:\sym - .Lpc\@ 5980b167463SArd Biesheuvel .endif 5990b167463SArd Biesheuvel 6000b167463SArd Biesheuvel #ifndef CONFIG_THUMB2_KERNEL 6010b167463SArd Biesheuvel .set .Lpc\@, . + 8 // PC bias 6020b167463SArd Biesheuvel .ifc \op, add 6030b167463SArd Biesheuvel add\c \reg, \tmp, pc 6040b167463SArd Biesheuvel .else 6050b167463SArd Biesheuvel \op\c \reg, [pc, \tmp] 6060b167463SArd Biesheuvel .endif 6070b167463SArd Biesheuvel #else 6080b167463SArd Biesheuvel .Lb\@: add\c \tmp, \tmp, pc 6090b167463SArd Biesheuvel /* 6100b167463SArd Biesheuvel * In Thumb-2 builds, the PC bias depends on whether we are currently 6110b167463SArd Biesheuvel * emitting into a .arm or a .thumb section. The size of the add opcode 6120b167463SArd Biesheuvel * above will be 2 bytes when emitting in Thumb mode and 4 bytes when 6130b167463SArd Biesheuvel * emitting in ARM mode, so let's use this to account for the bias. 6140b167463SArd Biesheuvel */ 6150b167463SArd Biesheuvel .set .Lpc\@, . + (. - .Lb\@) 6160b167463SArd Biesheuvel 6170b167463SArd Biesheuvel .ifnc \op, add 6180b167463SArd Biesheuvel \op\c \reg, [\tmp] 6190b167463SArd Biesheuvel .endif 6200b167463SArd Biesheuvel #endif 6210b167463SArd Biesheuvel .endm 6220b167463SArd Biesheuvel 6230b167463SArd Biesheuvel /* 6240b167463SArd Biesheuvel * mov_l - move a constant value or [relocated] address into a register 6250b167463SArd Biesheuvel */ 6264e918ab1SArd Biesheuvel .macro mov_l, dst:req, imm:req, cond 6270b167463SArd Biesheuvel .if __LINUX_ARM_ARCH__ < 7 6284e918ab1SArd Biesheuvel ldr\cond \dst, =\imm 6290b167463SArd Biesheuvel .else 6304e918ab1SArd Biesheuvel movw\cond \dst, #:lower16:\imm 6314e918ab1SArd Biesheuvel movt\cond \dst, #:upper16:\imm 6320b167463SArd Biesheuvel .endif 6330b167463SArd Biesheuvel .endm 6340b167463SArd Biesheuvel 6350b167463SArd Biesheuvel /* 6360b167463SArd Biesheuvel * adr_l - adr pseudo-op with unlimited range 6370b167463SArd Biesheuvel * 6380b167463SArd Biesheuvel * @dst: destination register 6390b167463SArd Biesheuvel * @sym: name of the symbol 6400b167463SArd Biesheuvel * @cond: conditional opcode suffix 6410b167463SArd Biesheuvel */ 6420b167463SArd Biesheuvel .macro adr_l, dst:req, sym:req, cond 6430b167463SArd Biesheuvel __adldst_l add, \dst, \sym, \dst, \cond 6440b167463SArd Biesheuvel .endm 6450b167463SArd Biesheuvel 6460b167463SArd Biesheuvel /* 6470b167463SArd Biesheuvel * ldr_l - ldr <literal> pseudo-op with unlimited range 6480b167463SArd Biesheuvel * 6490b167463SArd Biesheuvel * @dst: destination register 6500b167463SArd Biesheuvel * @sym: name of the symbol 6510b167463SArd Biesheuvel * @cond: conditional opcode suffix 6520b167463SArd Biesheuvel */ 6530b167463SArd Biesheuvel .macro ldr_l, dst:req, sym:req, cond 6540b167463SArd Biesheuvel __adldst_l ldr, \dst, \sym, \dst, \cond 6550b167463SArd Biesheuvel .endm 6560b167463SArd Biesheuvel 6570b167463SArd Biesheuvel /* 6580b167463SArd Biesheuvel * str_l - str <literal> pseudo-op with unlimited range 6590b167463SArd Biesheuvel * 6600b167463SArd Biesheuvel * @src: source register 6610b167463SArd Biesheuvel * @sym: name of the symbol 6620b167463SArd Biesheuvel * @tmp: mandatory scratch register 6630b167463SArd Biesheuvel * @cond: conditional opcode suffix 6640b167463SArd Biesheuvel */ 6650b167463SArd Biesheuvel .macro str_l, src:req, sym:req, tmp:req, cond 6660b167463SArd Biesheuvel __adldst_l str, \src, \sym, \tmp, \cond 6670b167463SArd Biesheuvel .endm 6680b167463SArd Biesheuvel 66950807460SArd Biesheuvel .macro __ldst_va, op, reg, tmp, sym, cond, offset 6704e918ab1SArd Biesheuvel #if __LINUX_ARM_ARCH__ >= 7 || \ 671d6905849SArd Biesheuvel !defined(CONFIG_ARM_HAS_GROUP_RELOCS) || \ 672d6905849SArd Biesheuvel (defined(MODULE) && defined(CONFIG_ARM_MODULE_PLTS)) 6734e918ab1SArd Biesheuvel mov_l \tmp, \sym, \cond 6744e918ab1SArd Biesheuvel #else 6754e918ab1SArd Biesheuvel /* 6764e918ab1SArd Biesheuvel * Avoid a literal load, by emitting a sequence of ADD/LDR instructions 6774e918ab1SArd Biesheuvel * with the appropriate relocations. The combined sequence has a range 6784e918ab1SArd Biesheuvel * of -/+ 256 MiB, which should be sufficient for the core kernel and 6794e918ab1SArd Biesheuvel * for modules loaded into the module region. 6804e918ab1SArd Biesheuvel */ 6814e918ab1SArd Biesheuvel .globl \sym 6824e918ab1SArd Biesheuvel .reloc .L0_\@, R_ARM_ALU_PC_G0_NC, \sym 6834e918ab1SArd Biesheuvel .reloc .L1_\@, R_ARM_ALU_PC_G1_NC, \sym 6844e918ab1SArd Biesheuvel .reloc .L2_\@, R_ARM_LDR_PC_G2, \sym 68550807460SArd Biesheuvel .L0_\@: sub\cond \tmp, pc, #8 - \offset 68650807460SArd Biesheuvel .L1_\@: sub\cond \tmp, \tmp, #4 - \offset 68750807460SArd Biesheuvel .L2_\@: 6884e918ab1SArd Biesheuvel #endif 68950807460SArd Biesheuvel \op\cond \reg, [\tmp, #\offset] 6904e918ab1SArd Biesheuvel .endm 6914e918ab1SArd Biesheuvel 6924e918ab1SArd Biesheuvel /* 6934e918ab1SArd Biesheuvel * ldr_va - load a 32-bit word from the virtual address of \sym 6944e918ab1SArd Biesheuvel */ 69550807460SArd Biesheuvel .macro ldr_va, rd:req, sym:req, cond, tmp, offset=0 696952f0331SArd Biesheuvel .ifnb \tmp 69750807460SArd Biesheuvel __ldst_va ldr, \rd, \tmp, \sym, \cond, \offset 698952f0331SArd Biesheuvel .else 69950807460SArd Biesheuvel __ldst_va ldr, \rd, \rd, \sym, \cond, \offset 700952f0331SArd Biesheuvel .endif 7014e918ab1SArd Biesheuvel .endm 7024e918ab1SArd Biesheuvel 7034e918ab1SArd Biesheuvel /* 7044e918ab1SArd Biesheuvel * str_va - store a 32-bit word to the virtual address of \sym 7054e918ab1SArd Biesheuvel */ 7064e918ab1SArd Biesheuvel .macro str_va, rn:req, sym:req, tmp:req, cond 70750807460SArd Biesheuvel __ldst_va str, \rn, \tmp, \sym, \cond, 0 7084e918ab1SArd Biesheuvel .endm 7094e918ab1SArd Biesheuvel 7106468e898SArd Biesheuvel /* 7117b9896c3SArd Biesheuvel * ldr_this_cpu_armv6 - Load a 32-bit word from the per-CPU variable 'sym', 7127b9896c3SArd Biesheuvel * without using a temp register. Supported in ARM mode 7137b9896c3SArd Biesheuvel * only. 7147b9896c3SArd Biesheuvel */ 7157b9896c3SArd Biesheuvel .macro ldr_this_cpu_armv6, rd:req, sym:req 7167b9896c3SArd Biesheuvel this_cpu_offset \rd 7177b9896c3SArd Biesheuvel .globl \sym 7187b9896c3SArd Biesheuvel .reloc .L0_\@, R_ARM_ALU_PC_G0_NC, \sym 7197b9896c3SArd Biesheuvel .reloc .L1_\@, R_ARM_ALU_PC_G1_NC, \sym 7207b9896c3SArd Biesheuvel .reloc .L2_\@, R_ARM_LDR_PC_G2, \sym 7217b9896c3SArd Biesheuvel add \rd, \rd, pc 7227b9896c3SArd Biesheuvel .L0_\@: sub \rd, \rd, #4 7237b9896c3SArd Biesheuvel .L1_\@: sub \rd, \rd, #0 7247b9896c3SArd Biesheuvel .L2_\@: ldr \rd, [\rd, #4] 7257b9896c3SArd Biesheuvel .endm 7267b9896c3SArd Biesheuvel 7277b9896c3SArd Biesheuvel /* 7287b9896c3SArd Biesheuvel * ldr_this_cpu - Load a 32-bit word from the per-CPU variable 'sym' 7297b9896c3SArd Biesheuvel * into register 'rd', which may be the stack pointer, 7307b9896c3SArd Biesheuvel * using 't1' and 't2' as general temp registers. These 7317b9896c3SArd Biesheuvel * are permitted to overlap with 'rd' if != sp 7327b9896c3SArd Biesheuvel */ 7337b9896c3SArd Biesheuvel .macro ldr_this_cpu, rd:req, sym:req, t1:req, t2:req 734952f0331SArd Biesheuvel #ifndef CONFIG_SMP 735952f0331SArd Biesheuvel ldr_va \rd, \sym, tmp=\t1 736952f0331SArd Biesheuvel #elif __LINUX_ARM_ARCH__ >= 7 || \ 737d6905849SArd Biesheuvel !defined(CONFIG_ARM_HAS_GROUP_RELOCS) || \ 738d6905849SArd Biesheuvel (defined(MODULE) && defined(CONFIG_ARM_MODULE_PLTS)) 7397b9896c3SArd Biesheuvel this_cpu_offset \t1 7407b9896c3SArd Biesheuvel mov_l \t2, \sym 7417b9896c3SArd Biesheuvel ldr \rd, [\t1, \t2] 7427b9896c3SArd Biesheuvel #else 7437b9896c3SArd Biesheuvel ldr_this_cpu_armv6 \rd, \sym 7447b9896c3SArd Biesheuvel #endif 7457b9896c3SArd Biesheuvel .endm 7467b9896c3SArd Biesheuvel 7476468e898SArd Biesheuvel /* 7486468e898SArd Biesheuvel * rev_l - byte-swap a 32-bit value 7496468e898SArd Biesheuvel * 7506468e898SArd Biesheuvel * @val: source/destination register 7516468e898SArd Biesheuvel * @tmp: scratch register 7526468e898SArd Biesheuvel */ 7536468e898SArd Biesheuvel .macro rev_l, val:req, tmp:req 7546468e898SArd Biesheuvel .if __LINUX_ARM_ARCH__ < 6 7556468e898SArd Biesheuvel eor \tmp, \val, \val, ror #16 7566468e898SArd Biesheuvel bic \tmp, \tmp, #0x00ff0000 7576468e898SArd Biesheuvel mov \val, \val, ror #8 7586468e898SArd Biesheuvel eor \val, \val, \tmp, lsr #8 7596468e898SArd Biesheuvel .else 7606468e898SArd Biesheuvel rev \val, \val 7616468e898SArd Biesheuvel .endif 7626468e898SArd Biesheuvel .endm 7636468e898SArd Biesheuvel 764*2511d032SRussell King (Oracle) .if __LINUX_ARM_ARCH__ < 6 765*2511d032SRussell King (Oracle) .set .Lrev_l_uses_tmp, 1 766*2511d032SRussell King (Oracle) .else 767*2511d032SRussell King (Oracle) .set .Lrev_l_uses_tmp, 0 768*2511d032SRussell King (Oracle) .endif 769*2511d032SRussell King (Oracle) 770b3ab60b1SArd Biesheuvel /* 771b3ab60b1SArd Biesheuvel * bl_r - branch and link to register 772b3ab60b1SArd Biesheuvel * 773b3ab60b1SArd Biesheuvel * @dst: target to branch to 774b3ab60b1SArd Biesheuvel * @c: conditional opcode suffix 775b3ab60b1SArd Biesheuvel */ 776b3ab60b1SArd Biesheuvel .macro bl_r, dst:req, c 777b3ab60b1SArd Biesheuvel .if __LINUX_ARM_ARCH__ < 6 778b3ab60b1SArd Biesheuvel mov\c lr, pc 779b3ab60b1SArd Biesheuvel mov\c pc, \dst 780b3ab60b1SArd Biesheuvel .else 781b3ab60b1SArd Biesheuvel blx\c \dst 782b3ab60b1SArd Biesheuvel .endif 783b3ab60b1SArd Biesheuvel .endm 784b3ab60b1SArd Biesheuvel 7852bc58a6fSMagnus Damm #endif /* __ASM_ASSEMBLER_H__ */ 786