diff --git a/compiler/i386/hlcgcpu.pas b/compiler/i386/hlcgcpu.pas index 8001d41d95..141341a475 100644 --- a/compiler/i386/hlcgcpu.pas +++ b/compiler/i386/hlcgcpu.pas @@ -228,7 +228,7 @@ implementation procedure thlcgcpu.g_exception_reason_save(list: TAsmList; fromsize, tosize: tdef; reg: tregister; const href: treference); begin - if not paramanager.use_fixed_stack then + if not(paramanager.use_fixed_stack) and not(tf_use_psabieh in target_info.flags) then list.concat(Taicpu.op_reg(A_PUSH,tcgsize2opsize[def_cgsize(tosize)],reg)) else inherited @@ -237,7 +237,7 @@ implementation procedure thlcgcpu.g_exception_reason_save_const(list: TAsmList; size: tdef; a: tcgint; const href: treference); begin - if not paramanager.use_fixed_stack then + if not(paramanager.use_fixed_stack) and not(tf_use_psabieh in target_info.flags) then list.concat(Taicpu.op_const(A_PUSH,tcgsize2opsize[def_cgsize(size)],a)) else inherited; @@ -246,7 +246,7 @@ implementation procedure thlcgcpu.g_exception_reason_load(list: TAsmList; fromsize, tosize: tdef; const href: treference; reg: tregister); begin - if not paramanager.use_fixed_stack then + if not(paramanager.use_fixed_stack) and not(tf_use_psabieh in target_info.flags) then list.concat(Taicpu.op_reg(A_POP,tcgsize2opsize[def_cgsize(tosize)],reg)) else inherited; @@ -255,7 +255,7 @@ implementation procedure thlcgcpu.g_exception_reason_discard(list: TAsmList; size: tdef; href: treference); begin - if not paramanager.use_fixed_stack then + if not(paramanager.use_fixed_stack) and not(tf_use_psabieh in target_info.flags) then begin getcpuregister(list,NR_FUNCTION_RESULT_REG); list.concat(Taicpu.op_reg(A_POP,tcgsize2opsize[def_cgsize(size)],NR_FUNCTION_RESULT_REG));