mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 08:09:29 +02:00
* fix loading of constants in registers in the LLVM CG if the constant
does not fit in ptrsinttype git-svn-id: trunk@41138 -
This commit is contained in:
parent
2d01fe76f6
commit
e52cf555ab
@ -553,8 +553,14 @@ implementation
|
||||
|
||||
|
||||
procedure thlcgllvm.a_load_const_reg(list: TAsmList; tosize: tdef; a: tcgint; register: tregister);
|
||||
var
|
||||
fromsize: tdef;
|
||||
begin
|
||||
list.concat(taillvm.op_reg_size_const_size(llvmconvop(ptrsinttype,tosize,false),register,ptrsinttype,a,tosize))
|
||||
if tosize.size<=ptrsinttype.size then
|
||||
fromsize:=ptrsinttype
|
||||
else
|
||||
fromsize:=tosize;
|
||||
list.concat(taillvm.op_reg_size_const_size(llvmconvop(fromsize,tosize,false),register,fromsize,a,tosize))
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user