|
@@ -775,6 +775,16 @@ implementation
|
|
|
else
|
|
|
;
|
|
|
end;
|
|
|
+ { inttoptr performs zero extension -> avoid inc(ptr,longint(-1)) from
|
|
|
+ increasing ptr by 4GB on a 64bit platform }
|
|
|
+ if (op=la_inttoptr) and
|
|
|
+ (fromsize.size<tosize.size) then
|
|
|
+ begin
|
|
|
+ tmpreg:=getintregister(list,fromsize);
|
|
|
+ a_load_reg_reg(list,fromsize,ptrsinttype,reg1,tmpreg);
|
|
|
+ reg1:=tmpreg;
|
|
|
+ fromsize:=ptrsinttype;
|
|
|
+ end;
|
|
|
{ reg2 = bitcast fromsize reg1 to tosize }
|
|
|
list.concat(taillvm.op_reg_size_reg_size(op,reg2,fromsize,reg1,tosize));
|
|
|
end;
|