Jelajahi Sumber

* For 8/16 bit CPUs and TP mode, disable expansion to a larger integer type for subtract operations on unsigned integers. This is TP7 compatible.

git-svn-id: trunk@46233 -
yury 5 tahun lalu
induk
melakukan
719220e8a4
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      compiler/nadd.pas

+ 5 - 1
compiler/nadd.pas

@@ -2225,7 +2225,11 @@ implementation
                    This is compatible with the code below for other unsigned types (PFV) }
                  if is_signed(left.resultdef) or
                     is_signed(right.resultdef) or
-                    (nodetype=subn) then
+                    ((nodetype=subn)
+{$if defined(cpu8bitalu) or defined(cpu16bitalu)}
+                     and not (m_tp7 in current_settings.modeswitches)
+{$endif}
+                    ) then
                    begin
                      if nodetype<>subn then
                        CGMessage(type_h_mixed_signed_unsigned);