mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 23:30:43 +02:00
* only handle a_load_const_ref() directly when storing ordinals, as in case
of pointers llvm only supports 0 (as null, which we don't generate either) git-svn-id: trunk@30676 -
This commit is contained in:
parent
e2cf90ad8a
commit
3496129f79
@ -472,9 +472,17 @@ implementation
|
|||||||
procedure thlcgllvm.a_load_const_ref(list: TAsmList; tosize: tdef; a: tcgint; const ref: treference);
|
procedure thlcgllvm.a_load_const_ref(list: TAsmList; tosize: tdef; a: tcgint; const ref: treference);
|
||||||
var
|
var
|
||||||
sref: treference;
|
sref: treference;
|
||||||
|
begin
|
||||||
|
{ llvm instructions do not support pointer constants -> only directly
|
||||||
|
encode for integers; a_load_const_reg() handles pointers properly }
|
||||||
|
if is_ordinal(tosize) or
|
||||||
|
is_64bit(tosize) then
|
||||||
begin
|
begin
|
||||||
sref:=make_simple_ref(list,ref,tosize);
|
sref:=make_simple_ref(list,ref,tosize);
|
||||||
list.concat(taillvm.op_size_const_size_ref(la_store,tosize,a,getpointerdef(tosize),sref))
|
list.concat(taillvm.op_size_const_size_ref(la_store,tosize,a,getpointerdef(tosize),sref))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user