]> git.gag.com Git - fw/sdcc/blobdiff - src/z80/gen.c
Now the regression tests could go online again
[fw/sdcc] / src / z80 / gen.c
index 09e50849dd2fa59b94174340d7cbbbb9e57708ba..60e46b11d00da2a1614411a8f3ca74095ff53b08 100644 (file)
@@ -5890,9 +5890,19 @@ genRightShiftLiteral (operand * left,
       wassert (0);
     }
 
-  else if (shCount >= (size * 8))
+  else if (shCount >= (size * 8)) {
+    const char *s;
+    if (!SPEC_USIGN(getSpec(operandType(left)))) {
+      _moveA(aopGet (AOP (left), 0, FALSE));
+      emit2 ("rlc a");
+      emit2 ("sbc a,a");
+      s=ACC_NAME;
+    } else {
+      s="!zero";
+    }
     while (size--)
-      aopPut (AOP (result), "!zero", size);
+      aopPut (AOP (result), s, size);
+  }
   else
     {
       switch (size)
@@ -7238,7 +7248,8 @@ genZ80Code (iCode * lic)
 
       if (cln != ic->lineno)
        {
-         emit2 ("; %s %d", ic->filename, ic->lineno);
+         emit2 ("; %s:%d: %s", ic->filename, ic->lineno,
+                printCLine(ic->filename, ic->lineno));
          cln = ic->lineno;
        }
       /* if the result is marked as