* i386: Minor PIC initialization improvement if the GOT register is forced to EBX.

git-svn-id: trunk@41462 -
This commit is contained in:
yury 2019-02-25 14:43:46 +00:00
parent 0fb27844d6
commit 4da16992df

View File

@ -544,7 +544,10 @@ unit cgcpu;
if not (target_info.system in [system_i386_darwin,system_i386_iphonesim]) then
begin
{ Use ECX as a temp register by default }
tmpreg:=NR_ECX;
if current_procinfo.got = NR_EBX then
tmpreg:=NR_EBX
else
tmpreg:=NR_ECX;
{ Allocate registers used for parameters to make sure they
never allocated during this PIC init code }
for i:=0 to current_procinfo.procdef.paras.Count - 1 do