浏览代码

* perform 32x32 to 64 multiplication in two more situations (u8bit and
u16bit can be converted to s32bit without any problems)

git-svn-id: trunk@9357 -

Jonas Maebe 17 年之前
父节点
当前提交
bbca8ee012
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      compiler/nadd.pas

+ 4 - 2
compiler/nadd.pas

@@ -2108,8 +2108,10 @@ implementation
             ((right.nodetype = typeconvn) and
              is_integer(ttypeconvnode(right).left.resultdef) and
              not(torddef(ttypeconvnode(right).left.resultdef).ordtype in [u64bit,s64bit])) and
-             (is_signed(ttypeconvnode(left).left.resultdef) =
-              is_signed(ttypeconvnode(right).left.resultdef)))) then
+             ((is_signed(ttypeconvnode(left).left.resultdef) =
+               is_signed(ttypeconvnode(right).left.resultdef)) or
+              (is_signed(ttypeconvnode(left).left.resultdef) and
+               (torddef(ttypeconvnode(right).left.resultdef).ordtype in [u8bit,u16bit]))))) then
           begin
             temp := ttypeconvnode(left).left;
             ttypeconvnode(left).left := nil;