1 /* SPDX-License-Identifier: GPL-2.0 */ 2 // Copyright (C) 2005-2017 Andes Technology Corporation 3 4 #ifndef __NDS32_ASSEMBLER_H__ 5 #define __NDS32_ASSEMBLER_H__ 6 7 .macro gie_disable 8 setgie.d 9 dsb 10 .endm 11 12 .macro gie_enable 13 setgie.e 14 dsb 15 .endm 16 17 .macro gie_save oldpsw 18 mfsr \oldpsw, $ir0 19 setgie.d 20 dsb 21 .endm 22 23 .macro gie_restore oldpsw 24 andi \oldpsw, \oldpsw, #0x1 25 beqz \oldpsw, 7001f 26 setgie.e 27 dsb 28 7001: 29 .endm 30 31 32 #define USER(insn, reg, addr, opr) \ 33 9999: insn reg, addr, opr; \ 34 .section __ex_table,"a"; \ 35 .align 3; \ 36 .long 9999b, 9001f; \ 37 .previous 38 39 #endif /* __NDS32_ASSEMBLER_H__ */ 40