Bläddra i källkod

* in the case of (uint8 div/mod small_positive_const), convert the const to unsigned, so that we don't do a 16-bit division on 8-bit CPUs

git-svn-id: branches/i8086@24209 -
nickysn 12 år sedan
förälder
incheckning
7a15fd0444
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      compiler/nmat.pas

+ 2 - 2
compiler/nmat.pas

@@ -243,7 +243,7 @@ implementation
          { Additionally, do the same for cardinal/qwords and other positive types, but    }
          { always in a way that a smaller type is converted to a bigger type              }
          { (webtbs/tw8870)                                                                }
-         if (rd.ordtype in [u16bit,u32bit,u64bit]) and
+         if (rd.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
             ((is_constintnode(left) and
               (tordconstnode(left).value >= 0)) or
              (not is_signed(ld) and
@@ -252,7 +252,7 @@ implementation
              inserttypeconv(left,right.resultdef);
              ld:=torddef(left.resultdef);
            end;
-         if (ld.ordtype in [u16bit,u32bit,u64bit]) and
+         if (ld.ordtype in [u8bit,u16bit,u32bit,u64bit]) and
             ((is_constintnode(right) and
               (tordconstnode(right).value >= 0)) or
              (not is_signed(rd) and