Jelajahi Sumber

* 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 tahun lalu
induk
melakukan
a20428f246
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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;