mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
* emit the current offset when flushing tasmsymbols in the
ttai_lowleveltypedconstbuilder o set the offset to 0 in the llvm constbuilder before calling the lowlevel one, because it incorporates this offset already via getelementptr instructions git-svn-id: branches/hlcgllvm@28136 -
This commit is contained in:
parent
e0c1c4d3bf
commit
a284902813
@ -562,7 +562,7 @@ implementation
|
||||
{ getpointerdef, because "sym" represents the address of whatever the
|
||||
data is }
|
||||
def:=getpointerdef(def);
|
||||
emit_tai(Tai_const.Create_sym(sym),def);
|
||||
emit_tai(Tai_const.Create_sym_offset(sym,fqueue_offset),def);
|
||||
fqueue_offset:=low(fqueue_offset);
|
||||
end;
|
||||
|
||||
|
@ -63,6 +63,7 @@ interface
|
||||
procedure queue_vecn(def: tdef; const index: tconstexprint); override;
|
||||
procedure queue_subscriptn(def: tabstractrecorddef; vs: tfieldvarsym); override;
|
||||
procedure queue_typeconvn(fromdef, todef: tdef); override;
|
||||
procedure queue_emit_asmsym(sym: tasmsymbol; def: tdef); override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -336,6 +337,16 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure tllvmtai_typedconstbuilder.queue_emit_asmsym(sym: tasmsymbol; def: tdef);
|
||||
begin
|
||||
{ we've already incorporated the offset via the inserted operations above,
|
||||
make sure it doesn't get emitted again as part of the tai_const for
|
||||
the tasmsymbol }
|
||||
fqueue_offset:=0;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
ctai_typedconstbuilder:=tllvmtai_typedconstbuilder;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user