//\r
-// Copyright (c) 2011 - 2013 ARM LTD. All rights reserved.<BR>\r
+// Copyright (c) 2011 - 2014 ARM LTD. All rights reserved.<BR>\r
// Portion of Copyright (c) 2014 NVIDIA Corporation. All rights reserved.<BR>\r
//\r
// This program and the accompanying materials\r
// In order to save the SP we need to put it somwhere else first.\r
// STR only works with XZR/WZR directly\r
#define SAVE_SP \\r
- add x1, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE; \\r
+ add x1, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE); \\r
REG_ONE (x1, 0x0f8, GP_CONTEXT_SIZE);\r
\r
#define ALL_FP_REGS \\r
\r
ASM_PFX(SynchronousExceptionEntry):\r
// Move the stackpointer so we can reach our structure with the str instruction.\r
- sub sp, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
\r
// Save all the General regs before touching x0 and x1.\r
// This does not save r31(SP) as it is special. We do that later.\r
br x1\r
\r
ASM_PFX(IrqEntry):\r
- sub sp, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
ALL_GP_REGS\r
mov x0, #EXCEPT_AARCH64_IRQ\r
ldr x1, ASM_PFX(CommonExceptionEntry)\r
br x1\r
\r
ASM_PFX(FiqEntry):\r
- sub sp, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
ALL_GP_REGS\r
mov x0, #EXCEPT_AARCH64_FIQ\r
ldr x1, ASM_PFX(CommonExceptionEntry)\r
br x1\r
\r
ASM_PFX(SErrorEntry):\r
- sub sp, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
ALL_GP_REGS\r
mov x0, #EXCEPT_AARCH64_SERROR\r
ldr x1, ASM_PFX(CommonExceptionEntry)\r
mrs x5, far_el2 // EL1 Fault Address Register\r
\r
// Adjust SP to save next set\r
-3:add sp, sp, FP_CONTEXT_SIZE\r
+3:add sp, sp, #FP_CONTEXT_SIZE\r
\r
// Push FP regs to Stack.\r
ALL_FP_REGS\r
\r
// Adjust SP to save next set\r
- add sp, sp, SYS_CONTEXT_SIZE\r
+ add sp, sp, #SYS_CONTEXT_SIZE\r
\r
// Save the SYS regs\r
ALL_SYS_REGS\r
\r
// Point to top of struct after all regs saved\r
- sub sp, sp, GP_CONTEXT_SIZE + FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(GP_CONTEXT_SIZE + FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
\r
// x0 still holds the exception type.\r
// Set x1 to point to the top of our struct on the Stack\r
#define REG_ONE(REG1, OFFSET, CONTEXT_SIZE) ldr REG1, [sp, #(OFFSET-CONTEXT_SIZE)]\r
\r
// Adjust SP to pop system registers\r
- add sp, sp, GP_CONTEXT_SIZE + FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ add sp, sp, #(GP_CONTEXT_SIZE + FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
ALL_SYS_REGS\r
\r
EL1_OR_EL2(x6)\r
msr far_el2, x5 // EL1 Fault Address Register\r
\r
3:// pop all regs and return from exception.\r
- sub sp, sp, FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE\r
+ sub sp, sp, #(FP_CONTEXT_SIZE + SYS_CONTEXT_SIZE)\r
ALL_GP_REGS\r
\r
// Adjust SP to pop next set\r
- add sp, sp, FP_CONTEXT_SIZE\r
+ add sp, sp, #FP_CONTEXT_SIZE\r
// Pop FP regs to Stack.\r
ALL_FP_REGS\r
\r
// Adjust SP to be where we started from when we came into the handler.\r
// The handler can not change the SP.\r
- add sp, sp, SYS_CONTEXT_SIZE\r
+ add sp, sp, #SYS_CONTEXT_SIZE\r
\r
eret\r
\r