1 #ifndef _ASM_M32R_ASSEMBLER_H
2 #define _ASM_M32R_ASSEMBLER_H
19 #define __STR(x) __stringify(x)
23 #define M32R_LOCK __STR(lock)
24 #define M32R_UNLOCK __STR(unlock)
26 #define M32R_LOCK __STR(ld)
27 #define M32R_UNLOCK __STR(st)
32 #define ENTRY(name) ENTRY_M name
49 #define LDIMM(reg,x) LDIMM reg x
52 or3 \
reg, \reg,
#low(\x)
55 #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104))
56 #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg
57 .macro ENABLE_INTERRUPTS reg
59 ; WORKAROUND:
"-> nop" is a workaround
for the M32700(
TS1).
62 #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg
63 .macro DISABLE_INTERRUPTS reg
65 ; WORKAROUND:
"-> nop" is a workaround
for the M32700(
TS1).
68 #define ENABLE_INTERRUPTS(reg) ENABLE_INTERRUPTS reg
69 .macro ENABLE_INTERRUPTS reg
75 #define DISABLE_INTERRUPTS(reg) DISABLE_INTERRUPTS reg
76 .macro DISABLE_INTERRUPTS reg
98 #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
107 #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
116 #error unknown isa configuration
119 push r13 ; syscall_nr (
default: -1)
130 addi sp,
#-4 ; room for implicit pt_regs parameter
152 #if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
161 #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
169 #error unknown isa configuration
175 addi
sp, #8 ; Skip bbpsw, bbpc
181 addi sp,
#4 ; Skip orig_r0
193 #define GET_CURRENT(reg) get_current reg
199 #if !(defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_M32104))
200 .macro SWITCH_TO_KERNEL_STACK
205 .macro SWITCH_TO_KERNEL_STACK
206 push r0 ; save r0
for working
208 and3
r0,
r0, #0x00ff7f
222 ld r0, @(-4,
r0) ; retrieve r0