Skip to content

Commit 69295fc

Browse files
committed
SS_SET uses TEMP5 to avoid register conflicts
1 parent bf7703a commit 69295fc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/machine/asm/execute_aarch64.S

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,24 @@
111111
NEXT_INST
112112

113113
#define SS_GET(addr_reg, temp_reg) \
114-
ldr TEMP4, =65528 SEP \
115-
cmp addr_reg, TEMP4 SEP \
114+
ldr TEMP5, =65528 SEP \
115+
cmp addr_reg, TEMP5 SEP \
116116
bhi .exit_shadow_stack_stack_out_of_stack SEP \
117-
ldr TEMP4, =0 SEP \
118-
cmp addr_reg, TEMP4 SEP \
117+
ldr TEMP5, =0 SEP \
118+
cmp addr_reg, TEMP5 SEP \
119119
beq .exit_shadow_stack_stack_out_of_stack SEP \
120-
add TEMP4, MACHINE, CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK SEP \
121-
ldr temp_reg, [TEMP4, addr_reg]
120+
add TEMP5, MACHINE, CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK SEP \
121+
ldr temp_reg, [TEMP5, addr_reg]
122122

123123
#define SS_SET(addr_reg, from_reg) \
124-
ldr TEMP4, =65528 SEP \
125-
cmp addr_reg, TEMP4 SEP \
124+
ldr TEMP5, =65528 SEP \
125+
cmp addr_reg, TEMP5 SEP \
126126
bhi .exit_shadow_stack_stack_out_of_stack SEP \
127-
ldr TEMP4, =0 SEP \
128-
cmp addr_reg, TEMP4 SEP \
127+
ldr TEMP5, =0 SEP \
128+
cmp addr_reg, TEMP5 SEP \
129129
beq .exit_shadow_stack_stack_out_of_stack SEP \
130-
add TEMP4, MACHINE, CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK SEP \
131-
str from_reg, [TEMP4, addr_reg]
130+
add TEMP5, MACHINE, CKB_VM_ASM_ASM_CORE_MACHINE_OFFSET_SHADOW_STACK SEP \
131+
str from_reg, [TEMP5, addr_reg]
132132

133133
#define DECODE_R \
134134
ubfx RS1, TEMP1, 0, 8 SEP \

0 commit comments

Comments
 (0)