* src/ds390/gen.c (genRightShift): fixed bug #870788
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 5 Jan 2004 20:21:49 +0000 (20:21 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 5 Jan 2004 20:21:49 +0000 (20:21 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3082 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
src/ds390/gen.c

index 213ac05185aaddcb2352f099386562cee184c9fa..cf4d5f845256bde366d163092b169898967f2191 100644 (file)
--- 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 <vrokas@otenet.gr>
 
index 8c570d0ca2e02c4352aedfaa3935c8bfdf03bd0e..436a490b7767c136ee758698d06a74da268e52a1 100644 (file)
@@ -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;