aarch64: Clarify the initial adjustments to sp for kernel exception entry
The first store-pair instruction in save_registers_head decrements the stack pointer to create room for most of the trapframe (and the redzone area for nested exceptions). However, the expression was a bit non-intuitive as it was using an expression without a leading negative sign to adjust the stack pointer. Rewrite the expression so that it is more clearly a negative adjustment to the stack pointer. Suggested by: andrew Reviewed by: andrew Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D52514
This commit is contained in:
@@ -43,9 +43,9 @@
|
||||
.macro save_registers_head el
|
||||
.if \el == 1
|
||||
mov x18, sp
|
||||
stp x0, x1, [sp, #(TF_X - TF_SIZE - 128)]!
|
||||
stp x0, x1, [sp, #-(TF_SIZE - TF_X + 128)]!
|
||||
.else
|
||||
stp x0, x1, [sp, #(TF_X - TF_SIZE)]!
|
||||
stp x0, x1, [sp, #-(TF_SIZE - TF_X)]!
|
||||
.endif
|
||||
stp x2, x3, [sp, #(2 * 8)]
|
||||
stp x4, x5, [sp, #(4 * 8)]
|
||||
|
||||
Reference in New Issue
Block a user