- moved deallocation of NR_PIC_OFFSET_REG from the x86_64 to the i386 code

generator (as it's also allocated for i386 rather than for x86_64)

git-svn-id: trunk@28928 -
This commit is contained in:
Jonas Maebe 2014-10-25 17:47:44 +00:00
parent af7876b93c
commit 8244d366d0
2 changed files with 7 additions and 4 deletions

View File

@ -314,6 +314,13 @@ unit cgcpu;
end;
begin
{ Release PIC register }
if (cs_create_pic in current_settings.moduleswitches) and
(tf_pic_uses_got in target_info.flags) and
(pi_needs_got in current_procinfo.flags) and
not(target_info.system in systems_darwin) then
list.concat(tai_regalloc.dealloc(NR_PIC_OFFSET_REG,nil));
{ MMX needs to call EMMS }
if assigned(rg[R_MMXREGISTER]) and
(rg[R_MMXREGISTER].uses_registers) then

View File

@ -330,10 +330,6 @@ unit cgcpu;
hreg : tregister;
r : longint;
begin
{ Release PIC register }
if cs_create_pic in current_settings.moduleswitches then
list.concat(tai_regalloc.dealloc(NR_PIC_OFFSET_REG,nil));
{ Prevent return address from a possible call from ending up in the epilogue }
{ (restoring registers happens before epilogue, providing necessary padding) }
if (current_procinfo.flags*[pi_has_unwind_info,pi_do_call,pi_has_saved_regs])=[pi_has_unwind_info,pi_do_call] then