浏览代码

Add RS_GP to list of saved registers if pi_needs_got flag is set

git-svn-id: trunk@22450 -
pierre 13 年之前
父节点
当前提交
15f4e1279b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      compiler/mips/cgcpu.pas

+ 3 - 0
compiler/mips/cgcpu.pas

@@ -1632,6 +1632,9 @@ begin
        include(saveregs,RS_R31);
        include(saveregs,RS_R31);
        if (TMIPSProcinfo(current_procinfo).needs_frame_pointer) then
        if (TMIPSProcinfo(current_procinfo).needs_frame_pointer) then
          include(saveregs,RS_FRAME_POINTER_REG);
          include(saveregs,RS_FRAME_POINTER_REG);
+       if (cs_create_pic in current_settings.moduleswitches) and
+          (pi_needs_got in current_procinfo.flags) then
+         include(saveregs,RS_GP);
        for reg:=RS_R1 to RS_R31 do
        for reg:=RS_R1 to RS_R31 do
          begin
          begin
            if reg in saveregs then
            if reg in saveregs then