diff options
author | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-08-04 20:45:29 +0000 |
---|---|---|
committer | yury <yury@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2020-08-04 20:45:29 +0000 |
commit | bf01977e0a187834e69c6652b36e1a2313be909f (patch) | |
tree | ab152ba5fbda160d0e34e7de596297d473adcc60 /compiler/nadd.pas | |
parent | 217979b33e817f6d185b29885e614eb6238125bd (diff) | |
download | fpc-bf01977e0a187834e69c6652b36e1a2313be909f.tar.gz |
* 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: https://svn.freepascal.org/svn/fpc/trunk@46233 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/nadd.pas')
-rw-r--r-- | compiler/nadd.pas | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/nadd.pas b/compiler/nadd.pas index 1380d3e0ff..000eb90c36 100644 --- a/compiler/nadd.pas +++ b/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); |