2 * linux/asm-arm/proc-armo/assembler.h
4 * Copyright (C) 1996 Russell King
6 * This file contains arm architecture specific defines
7 * for the different processors
9 #define MODE_USR USR26_MODE
10 #define MODE_FIQ FIQ26_MODE
11 #define MODE_IRQ IRQ26_MODE
12 #define MODE_SVC SVC26_MODE
14 #define DEFAULT_FIQ MODE_FIQ
17 #define LOADREGS(cond, base, reglist...)\
18 ldm##cond base,reglist^
20 #define RETINSTR(instr, regs...)\
23 #define LOADREGS(cond, base, reglist...)\
24 ldm/**/cond base,reglist^
26 #define RETINSTR(instr, regs...)\
33 #define MODE(savereg,tmpreg,mode) \
35 bic tmpreg, savereg, $0x0c000003; \
36 orr tmpreg, tmpreg, $mode; \
39 #define RESTOREMODE(savereg) \
42 #define SAVEIRQS(tmpreg)
44 #define RESTOREIRQS(tmpreg)
46 #define DISABLEIRQS(tmpreg)\
49 #define ENABLEIRQS(tmpreg)\
52 #define USERMODE(tmpreg)\
53 teqp pc, $0x00000000;\
56 #define SVCMODE(tmpreg)\
57 teqp pc, $0x00000003;\
62 * Save the current IRQ state and disable IRQs
63 * Note that this macro assumes FIQs are enabled, and
64 * that the processor is in SVC mode.
66 .macro save_and_disable_irqs
, oldcpsr
, temp
68 orr
\temp
, \oldcpsr
, #0x08000000
73 * Restore interrupt state previously stored in
75 * ** Actually do nothing on Arc - hope that the caller uses a MOVS PC soon
78 .macro restore_irqs
, oldcpsr
79 @ This be restore_irqs
83 * These two are used to save LR/restore PC over a user-based access.
84 * The old 26-bit architecture requires that we do. On 32-bit
85 * architecture, we can safely ignore this requirement.
97 .section __ex_table,"a"; \