From 004ac4d1f4e0d67c811fdc51d3070c0203b0c774 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 18 Aug 2020 21:10:06 +0000 Subject: [PATCH] * Xtensa: set abi correctly git-svn-id: trunk@46485 - --- compiler/options.pas | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/compiler/options.pas b/compiler/options.pas index a71e0b62c3..41dc48932a 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -4309,6 +4309,14 @@ begin end; if not(option.CPUSetExplicitly) and (target_info.system=system_xtensa_linux) then init_settings.cputype:=cpu_lx6; + + if (target_info.system in [system_xtensa_embedded,system_xtensa_freertos]) and not(option.ABISetExplicitly) then + begin + if CPUXTENSA_REGWINDOW in cpu_capabilities[init_settings.cputype] then + target_info.abi:=abi_xtensa_windowed + else + target_info.abi:=abi_xtensa_call0; + end; {$endif xtensa} {$ifdef arm} @@ -4624,17 +4632,6 @@ begin end; {$endif} -{$ifdef xtensa} - if (target_info.system=system_xtensa_embedded) and not(option.ABISetExplicitly) then - begin - if CPUXTENSA_REGWINDOW in cpu_capabilities[init_settings.cputype] then - target_info.abi:=abi_xtensa_windowed - else - target_info.abi:=abi_xtensa_call0; - end; -{$endif xtensa} - - {$if defined(powerpc) or defined(powerpc64)} { define _CALL_ELF symbol like gcc } case target_info.abi of