|
@@ -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
|