Implemented RFE #1899189
[fw/sdcc] / src / z80 / main.c
index 86501c99324a05cc6e8bb8c6949f8bbdde0dbe54..2f94e3615d7b93733eb1c1e6b46c18d94f948f1a 100644 (file)
@@ -652,6 +652,13 @@ _hasNativeMulFor (iCode *ic, sym_link *left, sym_link *right)
       test = right;
       val = OP_VALUE (IC_RIGHT (ic));
     }
+  /* 8x8 unsigned multiplication code is shorter than
+     call overhead for the multiplication routine. */
+  else if ( IS_CHAR (right) && IS_UNSIGNED (right) &&
+    IS_CHAR (left) && IS_UNSIGNED(left) && !IS_GB)
+    {
+      return TRUE;
+    }
   else
     {
       return FALSE;