File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333#include <asm/irqflags-compact.h>
3434#include <asm/thread_info.h> /* For THREAD_SIZE */
3535
36+ /* Note on the LD/ST addr modes with addr reg wback
37+ *
38+ * LD.a same as LD.aw
39+ *
40+ * LD.a reg1, [reg2, x] => Pre Incr
41+ * Eff Addr for load = [reg2 + x]
42+ *
43+ * LD.ab reg1, [reg2, x] => Post Incr
44+ * Eff Addr for load = [reg2]
45+ */
46+
47+ .macro PUSHAX aux
48+ lr r9 , [\aux ]
49+ push r9
50+ .endm
51+
52+ .macro POPAX aux
53+ pop r9
54+ sr r9 , [\aux ]
55+ .endm
56+
57+ .macro SAVE_R0_TO_R12
58+ push r0
59+ push r1
60+ push r2
61+ push r3
62+ push r4
63+ push r5
64+ push r6
65+ push r7
66+ push r8
67+ push r9
68+ push r10
69+ push r11
70+ push r12
71+ .endm
72+
73+ .macro RESTORE_R12_TO_R0
74+ pop r12
75+ pop r11
76+ pop r10
77+ pop r9
78+ pop r8
79+ pop r7
80+ pop r6
81+ pop r5
82+ pop r4
83+ pop r3
84+ pop r2
85+ pop r1
86+ pop r0
87+ .endm
88+
3689.macro SAVE_ABI_CALLEE_REGS
3790 push r13
3891 push r14
267320 SWITCH_TO_KERNEL_STK
268321
269322
270- PUSH 0x003 \LVL \()abcd /* Dummy ECR */
323+ st . a 0x003 \LVL \()abcd , [ sp , - 4 ] /* Dummy ECR */
271324 sub sp , sp , 8 /* skip orig_r0 (not needed)
272325 skip pt_regs->sp, already saved above */
273326
Original file line number Diff line number Diff line change 2121#include <asm/entry-arcv2.h>
2222#endif
2323
24- /* Note on the LD/ST addr modes with addr reg wback
25- *
26- * LD.a same as LD.aw
27- *
28- * LD.a reg1, [reg2, x] => Pre Incr
29- * Eff Addr for load = [reg2 + x]
30- *
31- * LD.ab reg1, [reg2, x] => Post Incr
32- * Eff Addr for load = [reg2]
33- */
34-
35- .macro PUSH reg
36- st .a \reg , [sp , - 4 ]
37- .endm
38-
39- .macro PUSHAX aux
40- lr r9 , [\aux ]
41- PUSH r9
42- .endm
43-
44- .macro POP reg
45- ld .ab \reg , [sp , 4 ]
46- .endm
47-
48- .macro POPAX aux
49- POP r9
50- sr r9 , [\aux ]
51- .endm
52-
53- /*--------------------------------------------------------------
54- * Helpers to save/restore Scratch Regs:
55- * used by Interrupt/Exception Prologue/Epilogue
56- *-------------------------------------------------------------*/
57- .macro SAVE_R0_TO_R12
58- PUSH r0
59- PUSH r1
60- PUSH r2
61- PUSH r3
62- PUSH r4
63- PUSH r5
64- PUSH r6
65- PUSH r7
66- PUSH r8
67- PUSH r9
68- PUSH r10
69- PUSH r11
70- PUSH r12
71- .endm
72-
73- .macro RESTORE_R12_TO_R0
74- POP r12
75- POP r11
76- POP r10
77- POP r9
78- POP r8
79- POP r7
80- POP r6
81- POP r5
82- POP r4
83- POP r3
84- POP r2
85- POP r1
86- POP r0
87-
88- .endm
89-
9024/*
9125 * save user mode callee regs as struct callee_regs
9226 * - needed by fork/do_signal/unaligned-access-emulation.
You can’t perform that action at this time.
0 commit comments