mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 02:09:14 +02:00
* fixed LLVM code generator not taking into account constalignmin/max
settings for typed constants git-svn-id: trunk@40605 -
This commit is contained in:
parent
4f72edcdd5
commit
f87304f5ca
@ -269,6 +269,8 @@ type
|
|||||||
{ finalize the asmlist: add the necessary symbols etc }
|
{ finalize the asmlist: add the necessary symbols etc }
|
||||||
procedure finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions); virtual;
|
procedure finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions); virtual;
|
||||||
procedure finalize_asmlist_add_indirect_sym(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions); virtual;
|
procedure finalize_asmlist_add_indirect_sym(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions); virtual;
|
||||||
|
{ prepare finalization (common for the default and overridden versions }
|
||||||
|
procedure finalize_asmlist_prepare(const options: ttcasmlistoptions; var alignment: shortint);
|
||||||
|
|
||||||
{ functionality of the above for vectorized dead strippable sections }
|
{ functionality of the above for vectorized dead strippable sections }
|
||||||
procedure finalize_vectorized_dead_strip_asmlist(def: tdef; const basename, itemname: TSymStr; st: tsymtable; alignment: shortint; options: ttcasmlistoptions); virtual;
|
procedure finalize_vectorized_dead_strip_asmlist(def: tdef; const basename, itemname: TSymStr; st: tsymtable; alignment: shortint; options: ttcasmlistoptions); virtual;
|
||||||
@ -928,9 +930,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure ttai_typedconstbuilder.finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions);
|
procedure ttai_typedconstbuilder.finalize_asmlist_prepare(const options: ttcasmlistoptions; var alignment: shortint);
|
||||||
var
|
|
||||||
prelist: tasmlist;
|
|
||||||
begin
|
begin
|
||||||
if tcalo_apply_constalign in options then
|
if tcalo_apply_constalign in options then
|
||||||
alignment:=const_align(alignment);
|
alignment:=const_align(alignment);
|
||||||
@ -946,7 +946,14 @@ implementation
|
|||||||
tcalo_vectorized_dead_strip_end]*options)<>[]) and
|
tcalo_vectorized_dead_strip_end]*options)<>[]) and
|
||||||
not fvectorized_finalize_called then
|
not fvectorized_finalize_called then
|
||||||
internalerror(2015110602);
|
internalerror(2015110602);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure ttai_typedconstbuilder.finalize_asmlist(sym: tasmsymbol; def: tdef; section: TAsmSectiontype; const secname: TSymStr; alignment: shortint; const options: ttcasmlistoptions);
|
||||||
|
var
|
||||||
|
prelist: tasmlist;
|
||||||
|
begin
|
||||||
|
finalize_asmlist_prepare(options, alignment);
|
||||||
prelist:=tasmlist.create;
|
prelist:=tasmlist.create;
|
||||||
{ only now add items based on the symbolname, because it may be
|
{ only now add items based on the symbolname, because it may be
|
||||||
modified by the "section" specifier in case of a typed constant }
|
modified by the "section" specifier in case of a typed constant }
|
||||||
|
@ -188,6 +188,7 @@ implementation
|
|||||||
newasmlist: tasmlist;
|
newasmlist: tasmlist;
|
||||||
decl: taillvmdecl;
|
decl: taillvmdecl;
|
||||||
begin
|
begin
|
||||||
|
finalize_asmlist_prepare(options,alignment);
|
||||||
newasmlist:=tasmlist.create;
|
newasmlist:=tasmlist.create;
|
||||||
if assigned(foverriding_def) then
|
if assigned(foverriding_def) then
|
||||||
def:=foverriding_def;
|
def:=foverriding_def;
|
||||||
|
Loading…
Reference in New Issue
Block a user