From 7f769f024b1772c5b7796b88bf21394a39cac89a Mon Sep 17 00:00:00 2001 From: nickysn Date: Wed, 29 Apr 2020 19:44:57 +0000 Subject: [PATCH] * Z80: fixed code generation for pure assembler routines, that have no parameters, no local variables and no 'nostackframe' git-svn-id: trunk@45176 - --- compiler/z80/cgcpu.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/z80/cgcpu.pas b/compiler/z80/cgcpu.pas index e63a9aaf7b..6258c94a21 100644 --- a/compiler/z80/cgcpu.pas +++ b/compiler/z80/cgcpu.pas @@ -2254,9 +2254,8 @@ unit cgcpu; stacksize := align(stacksize+sizeof(aint),target_info.stackalign) - sizeof(aint); if (current_procinfo.framepointer=NR_STACK_POINTER_REG) then begin - internalerror(2020040302); - {if (stacksize<>0) then - cg.a_op_const_reg(list,OP_ADD,OS_ADDR,stacksize,current_procinfo.framepointer);} + if stacksize<>0 then + a_adjust_sp(list,stacksize); end else begin