浏览代码

* when doing a string comparison that calls an rtl helper, compare the function
result with an 8-bit zero constant (which will be expanded to the native
integer size by the comparison node), instead of 32-bit zero. This avoids the
unnecessary 32-bit comparison on 16-bit and 8-bit cpus.

git-svn-id: trunk@32099 -

nickysn 10 年之前
父节点
当前提交
a20428f246
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/nadd.pas

+ 1 - 1
compiler/nadd.pas

@@ -2419,7 +2419,7 @@ implementation
                 ccallparanode.create(right,ccallparanode.create(left,nil)));
               { and compare its result with 0 according to the original operator }
               result := caddnode.create(nodetype,result,
-                cordconstnode.create(0,s32inttype,false));
+                cordconstnode.create(0,s8inttype,false));
               left := nil;
               right := nil;
             end;