|
@@ -2486,6 +2486,11 @@ unit cgcpu;
|
|
(tf_pic_uses_got in target_info.flags) and
|
|
(tf_pic_uses_got in target_info.flags) and
|
|
assigned(ref.symbol) then
|
|
assigned(ref.symbol) then
|
|
begin
|
|
begin
|
|
|
|
+ {$ifdef EXTDEBUG}
|
|
|
|
+ if not (pi_needs_got in current_procinfo.flags) then
|
|
|
|
+ Comment(V_warning,'pi_needs_got not included');
|
|
|
|
+ {$endif EXTDEBUG}
|
|
|
|
+ Include(current_procinfo.flags,pi_needs_got);
|
|
reference_reset(tmpref,4,[]);
|
|
reference_reset(tmpref,4,[]);
|
|
tmpref.base:=current_procinfo.got;
|
|
tmpref.base:=current_procinfo.got;
|
|
tmpref.index:=tmpreg;
|
|
tmpref.index:=tmpreg;
|
|
@@ -2656,7 +2661,7 @@ unit cgcpu;
|
|
if we can keep the original reference while copying }
|
|
if we can keep the original reference while copying }
|
|
function SimpleRef(const ref : treference) : boolean;
|
|
function SimpleRef(const ref : treference) : boolean;
|
|
begin
|
|
begin
|
|
- result:=((ref.base=NR_PC) and (ref.addressmode=AM_OFFSET) and (ref.refaddr=addr_full)) or
|
|
|
|
|
|
+ result:=((ref.base=NR_PC) and (ref.addressmode=AM_OFFSET) and (ref.refaddr in [addr_full,addr_no])) or
|
|
((ref.symbol=nil) and
|
|
((ref.symbol=nil) and
|
|
(ref.addressmode=AM_OFFSET) and
|
|
(ref.addressmode=AM_OFFSET) and
|
|
(((ref.offset>=0) and (ref.offset+len<=31)) or
|
|
(((ref.offset>=0) and (ref.offset+len<=31)) or
|