Closed bmarcot closed 7 years ago
Instead of using r7 to do the branch to the requested syscall implementation, rather use the LR which has been saved on svcall prologue.
ldr r7, =syscall_vector ldr.w r7, [r7, r6, lsl #2] blx r7
Rather do:
ldr lr, =syscall_vector ldr.w lr, [lr, r6, lsl #2] blx lr
NOTE: I am not 100% sure ldr.w addressing modes allow having lr as rt (target register). For sure v6m does not allow.
SVcall entry has been redesigned and does not use r7.
Instead of using r7 to do the branch to the requested syscall implementation, rather use the LR which has been saved on svcall prologue.
Rather do:
NOTE: I am not 100% sure ldr.w addressing modes allow having lr as rt (target register). For sure v6m does not allow.