summaryrefslogtreecommitdiff
path: root/compiler/ncgcnv.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:24:37 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-01-21 23:24:37 +0000
commitad1141d52f8353457053b925cd674fe1d5c4eafc (patch)
treeaa541e18564c2876adf659a772b4cec2669a24dc /compiler/ncgcnv.pas
parent9a4ce580e758aec2235d58a1bfb10f981ba03c1b (diff)
downloadfpc-ad1141d52f8353457053b925cd674fe1d5c4eafc.tar.gz
- reverted partial commit of merge
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/blocks@29515 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ncgcnv.pas')
-rw-r--r--compiler/ncgcnv.pas10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/ncgcnv.pas b/compiler/ncgcnv.pas
index da7dcc6293..d179cb5f17 100644
--- a/compiler/ncgcnv.pas
+++ b/compiler/ncgcnv.pas
@@ -120,12 +120,12 @@ interface
{ On targets without 8/16 bit register components, 8/16-bit operations
always adjust high bits of result, see 'maybeadjustresult' method in
respective cgcpu.pas. Therefore 8/16-bit locations are valid as larger
- ones (except signed->unsigned, which still needs high bits cleared). }
+ ones (except OS_S8->OS_16 which still needs high 16 bits cleared). }
else if (left.location.loc in [LOC_REGISTER,LOC_CREGISTER]) and
- (tcgsize2size[(reg_cgsize(left.location.register))]=sizeof(aint)) and
- (ressize>leftsize) and
- (newsize in [OS_32,OS_S32,OS_16,OS_S16]) and
- (not is_signed(left.resultdef) or is_signed(resultdef)) then
+ (tcgsize2size[(reg_cgsize(left.location.register))]=sizeof(aint)) and
+ (ressize>leftsize) and
+ (newsize in [OS_32,OS_S32,OS_16,OS_S16]) and
+ not ((newsize=OS_16) and (def_cgsize(left.resultdef)=OS_S8)) then
location.size:=newsize
{$endif}
else