From d373426fcefbb83b34bbb0aa761966a147238700 Mon Sep 17 00:00:00 2001 From: bernhardheld Date: Mon, 5 Jan 2004 20:21:49 +0000 Subject: [PATCH] * src/ds390/gen.c (genRightShift): fixed bug #870788 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3082 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 1 + src/ds390/gen.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 213ac051..cf4d5f84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ * doc/Makefile: fixed install, added local_icons * sim/ucsim/gui.src/Makefile.in: fixed an old typo * src/mcs51/gen.c (genRightShift): fixed bug #870788 + * src/ds390/gen.c (genRightShift): fixed bug #870788 2004-01-06 Vangelis Rokas diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 8c570d0c..436a490b 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -8755,7 +8755,7 @@ genRightShiftLiteral (operand * left, && (size != 2) && (size != 4)) { - D(emitcode (";", "genRightShiftLiteral wimping out");); + D(emitcode (";", "genRightShiftLiteral wimping out");); return FALSE; } @@ -8949,7 +8949,7 @@ static void genRightShift (iCode * ic) { operand *right, *left, *result; - sym_link *retype; + sym_link *letype; int size, offset; char *l; symbol *tlbl, *tlbl1; @@ -8958,9 +8958,9 @@ genRightShift (iCode * ic) /* if signed then we do it the hard way preserve the sign bit moving it inwards */ - retype = getSpec (operandType (IC_RESULT (ic))); + letype = getSpec (operandType (IC_LEFT (ic))); - if (!SPEC_USIGN (retype)) + if (!SPEC_USIGN (letype)) { genSignedRightShift (ic); return; -- 2.30.2