From 0fcc57fb4b7ca536b4177d19ef32da54e8ca352d Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 12 Feb 2022 15:26:27 +0100 Subject: [PATCH] PPC64: don't save TOC in pure assembler routines Fix by Pierre --- compiler/powerpc64/cgcpu.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/powerpc64/cgcpu.pas b/compiler/powerpc64/cgcpu.pas index ea5fdadce8..e81b608f60 100644 --- a/compiler/powerpc64/cgcpu.pas +++ b/compiler/powerpc64/cgcpu.pas @@ -1259,7 +1259,8 @@ begin { save current RTOC for restoration after calls if necessary } if (pi_do_call in current_procinfo.flags) and - (target_info.abi in abis_ppc_toc) then + (target_info.abi in abis_ppc_toc) and + not nostackframe then begin reference_reset_base(href,NR_STACK_POINTER_REG,get_rtoc_offset,ctempposinvalid,target_info.stackalign,[]); a_load_reg_ref(list,OS_ADDR,OS_ADDR,NR_RTOC,href);