From 15f4e1279bf9a545f2765cb76f560bb76a9fdf4d Mon Sep 17 00:00:00 2001 From: pierre Date: Mon, 24 Sep 2012 21:01:47 +0000 Subject: [PATCH] Add RS_GP to list of saved registers if pi_needs_got flag is set git-svn-id: trunk@22450 - --- compiler/mips/cgcpu.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/mips/cgcpu.pas b/compiler/mips/cgcpu.pas index c53d464684..0c9b77c759 100644 --- a/compiler/mips/cgcpu.pas +++ b/compiler/mips/cgcpu.pas @@ -1632,6 +1632,9 @@ begin include(saveregs,RS_R31); if (TMIPSProcinfo(current_procinfo).needs_frame_pointer) then 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 begin if reg in saveregs then