From 819e2638bb490c73b4f73473238aa5eb239e5e83 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 25 Mar 2020 21:17:03 +0000 Subject: [PATCH] + Xtensa: tcgcpu.maybeadjustresult git-svn-id: trunk@44360 - --- compiler/xtensa/cgcpu.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/xtensa/cgcpu.pas b/compiler/xtensa/cgcpu.pas index e82c9ff063..8a5cfb67a3 100644 --- a/compiler/xtensa/cgcpu.pas +++ b/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;