diff options
author | Achin Gupta <achin.gupta@arm.com> | 2013-11-25 14:00:56 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2013-12-05 12:28:50 +0000 |
commit | 4a826ddad8ea0fc5ce09709f534efb72cc33611c (patch) | |
tree | 2756ac5b549591af762e917841e81b5513c2ce7d /include/asm_macros.S | |
parent | ab2d31edbd9dea69bd1ca495e3fce0511c9d42ff (diff) |
rework general purpose registers save and restore
The runtime exception handling assembler code used magic numbers for
saving and restoring the general purpose register context on stack
memory. The memory is interpreted as a 'gp_regs' structure and the
magic numbers are offsets to members of this structure. This patch
replaces the magic number offsets with constants. It also adds compile
time assertions to prevent an incorrect assembler view of this
structure.
Change-Id: Ibf125bfdd62ba3a33e58c5f1d71f8c229720781c
Diffstat (limited to 'include/asm_macros.S')
-rw-r--r-- | include/asm_macros.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm_macros.S b/include/asm_macros.S index 0067ca61..786c52a2 100644 --- a/include/asm_macros.S +++ b/include/asm_macros.S @@ -55,14 +55,14 @@ .macro exception_entry func - stp x29, x30, [sp, #-0x10]! + stp x29, x30, [sp, #-(SIZEOF_GPREGS - GPREGS_FP_OFF)]! bl \func .endm .macro exception_exit func bl \func - ldp x29, x30, [sp], #0x10 + ldp x29, x30, [sp], #(SIZEOF_GPREGS - GPREGS_FP_OFF) .endm |