mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
* sizeof(x), typeof(x): if "x" is typenode, request GOT for PIC because a global VMT label will be loaded.
* typeinfo(x): transform into rttinode (which does request GOT) during pass 1, so pass 2 is not needed. git-svn-id: trunk@24798 -
This commit is contained in:
parent
b17cdf4e09
commit
cc8772cf92
@ -451,13 +451,8 @@ implementation
|
||||
TYPEINFO GENERIC HANDLING
|
||||
*****************************************************************************}
|
||||
procedure tcginlinenode.second_typeinfo;
|
||||
var
|
||||
href : treference;
|
||||
begin
|
||||
location_reset(location,LOC_REGISTER,OS_ADDR);
|
||||
location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
||||
reference_reset_symbol(href,RTTIWriter.get_rtti_label(left.resultdef,fullrtti),0,sizeof(pint));
|
||||
cg.a_loadaddr_ref_reg(current_asmdata.CurrAsmList,href,location.register);
|
||||
internalerror(2013060301);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -3277,14 +3277,14 @@ implementation
|
||||
firstpass(result);
|
||||
end;
|
||||
|
||||
in_sizeof_x:
|
||||
begin
|
||||
expectloc:=LOC_REGISTER;
|
||||
end;
|
||||
|
||||
in_sizeof_x,
|
||||
in_typeof_x:
|
||||
begin
|
||||
expectloc:=LOC_REGISTER;
|
||||
expectloc:=LOC_REGISTER;
|
||||
if (left.nodetype=typen) and
|
||||
(cs_create_pic in current_settings.moduleswitches) and
|
||||
(tf_pic_uses_got in target_info.flags) then
|
||||
include(current_procinfo.flags,pi_needs_got);
|
||||
end;
|
||||
|
||||
in_length_x:
|
||||
@ -3294,7 +3294,9 @@ implementation
|
||||
|
||||
in_typeinfo_x:
|
||||
begin
|
||||
expectloc:=LOC_REGISTER;
|
||||
result:=caddrnode.create_internal(
|
||||
crttinode.create(tstoreddef(left.resultdef),fullrtti,rdt_normal)
|
||||
);
|
||||
end;
|
||||
|
||||
in_assigned_x:
|
||||
|
Loading…
Reference in New Issue
Block a user