Explorar o código

+ Xtensa: tcgcpu.maybeadjustresult

git-svn-id: trunk@44360 -
florian %!s(int64=5) %!d(string=hai) anos
pai
achega
819e2638bb
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      compiler/xtensa/cgcpu.pas

+ 5 - 1
compiler/xtensa/cgcpu.pas

@@ -773,8 +773,12 @@ implementation
 
 
     procedure tcgcpu.maybeadjustresult(list : TAsmList; op : TOpCg; size : tcgsize; dst : tregister);
+      const
+        overflowops = [OP_MUL,OP_SHL,OP_ADD,OP_SUB,OP_NEG];
       begin
-
+        if (op in overflowops) and
+           (size in [OS_8,OS_S8,OS_16,OS_S16]) then
+          a_load_reg_reg(list,OS_32,size,dst,dst);
       end;