|
47 | 47 | * The callee saved registers depends on whether frame pointers are enabled.
|
48 | 48 | * With frame pointers (to be compliant with the ABI):
|
49 | 49 | *
|
50 |
| - * high |
51 |
| - * original ARM_SP => +------------------+ \ |
52 |
| - * | pc | | |
53 |
| - * current ARM_FP => +------------------+ } callee saved registers |
54 |
| - * |r4-r8,r10,fp,ip,lr| | |
55 |
| - * +------------------+ / |
56 |
| - * low |
| 50 | + * high |
| 51 | + * original ARM_SP => +--------------+ \ |
| 52 | + * | pc | | |
| 53 | + * current ARM_FP => +--------------+ } callee saved registers |
| 54 | + * |r4-r9,fp,ip,lr| | |
| 55 | + * +--------------+ / |
| 56 | + * low |
57 | 57 | *
|
58 | 58 | * Without frame pointers:
|
59 | 59 | *
|
60 |
| - * high |
61 |
| - * original ARM_SP => +------------------+ |
62 |
| - * | r4-r8,r10,fp,lr | callee saved registers |
63 |
| - * current ARM_FP => +------------------+ |
64 |
| - * low |
| 60 | + * high |
| 61 | + * original ARM_SP => +--------------+ |
| 62 | + * | r4-r9,fp,lr | callee saved registers |
| 63 | + * current ARM_FP => +--------------+ |
| 64 | + * low |
65 | 65 | *
|
66 | 66 | * When popping registers off the stack at the end of a BPF function, we
|
67 | 67 | * reference them via the current ARM_FP register.
|
68 | 68 | */
|
69 | 69 | #define CALLEE_MASK (1 << ARM_R4 | 1 << ARM_R5 | 1 << ARM_R6 | \
|
70 |
| - 1 << ARM_R7 | 1 << ARM_R8 | 1 << ARM_R10 | \ |
| 70 | + 1 << ARM_R7 | 1 << ARM_R8 | 1 << ARM_R9 | \ |
71 | 71 | 1 << ARM_FP)
|
72 | 72 | #define CALLEE_PUSH_MASK (CALLEE_MASK | 1 << ARM_LR)
|
73 | 73 | #define CALLEE_POP_MASK (CALLEE_MASK | 1 << ARM_PC)
|
@@ -157,7 +157,7 @@ static const s8 bpf2a32[][2] = {
|
157 | 157 | * for constant blindings and others.
|
158 | 158 | */
|
159 | 159 | [TMP_REG_1] = {ARM_R7, ARM_R6},
|
160 |
| - [TMP_REG_2] = {ARM_R10, ARM_R8}, |
| 160 | + [TMP_REG_2] = {ARM_R9, ARM_R8}, |
161 | 161 | /* Tail call count. Stored on stack scratch space. */
|
162 | 162 | [TCALL_CNT] = {STACK_OFFSET(BPF_TC_HI), STACK_OFFSET(BPF_TC_LO)},
|
163 | 163 | /* temporary register for blinding constants.
|
|
0 commit comments