mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 13:19:34 +01:00
* always size the value on top of the stack back down to its original size
after an 8/16 bit operation on Dalvik (even if the value cannot have
become too big), because otherwise its type checker complains
git-svn-id: branches/jvmbackend@20520 -
This commit is contained in:
parent
85ef5e109c
commit
0248258670
@ -224,7 +224,7 @@ implementation
|
||||
defutil,
|
||||
aasmtai,aasmcpu,
|
||||
symtable,jvmdef,
|
||||
procinfo,cgcpu,tgobj;
|
||||
procinfo,cpuinfo,cgcpu,tgobj;
|
||||
|
||||
const
|
||||
TOpCG2IAsmOp : array[topcg] of TAsmOp=( { not = xor -1 }
|
||||
@ -853,7 +853,8 @@ implementation
|
||||
const
|
||||
overflowops = [OP_MUL,OP_SHL,OP_ADD,OP_SUB,OP_NOT,OP_NEG];
|
||||
begin
|
||||
if (op in overflowops) and
|
||||
if ((op in overflowops) or
|
||||
(current_settings.cputype=cpu_dalvik)) and
|
||||
(def_cgsize(size) in [OS_8,OS_S8,OS_16,OS_S16]) then
|
||||
resize_stack_int_val(list,s32inttype,size,false);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user