summaryrefslogtreecommitdiff
path: root/compiler/arm/cgcpu.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/arm/cgcpu.pas')
-rw-r--r--compiler/arm/cgcpu.pas2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/arm/cgcpu.pas b/compiler/arm/cgcpu.pas
index c4feae5fc2..dfb75b83b8 100644
--- a/compiler/arm/cgcpu.pas
+++ b/compiler/arm/cgcpu.pas
@@ -3479,6 +3479,8 @@ unit cgcpu;
begin
{ restore int registers and return }
list.concat(taicpu.op_reg_reg(A_MOV, NR_STACK_POINTER_REG, NR_FRAME_POINTER_REG));
+ { Add 4 to SP to make it point to an "imaginary PC" which the paramanager assumes is there(for normal ARM) }
+ list.concat(taicpu.op_reg_const(A_ADD, NR_STACK_POINTER_REG, 4));
reference_reset(ref,4);
ref.index:=NR_STACK_POINTER_REG;