mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 05:39:19 +02:00
* 8/16-bit alu fixes in tnotnode.simplify
git-svn-id: trunk@27636 -
This commit is contained in:
parent
356ea656e4
commit
aa3f450832
@ -1125,26 +1125,24 @@ implementation
|
|||||||
u16bit,
|
u16bit,
|
||||||
s16bit,
|
s16bit,
|
||||||
s32bit,
|
s32bit,
|
||||||
{$ifdef cpu64bitaddr}
|
|
||||||
u32bit,
|
u32bit,
|
||||||
{$endif cpu64bitaddr}
|
s64bit,
|
||||||
s64bit:
|
u64bit:
|
||||||
begin
|
begin
|
||||||
v:=int64(not int64(v));
|
{ unsigned, equal or bigger than the native int size? }
|
||||||
if (torddef(left.resultdef).ordtype<>s64bit) then
|
if (torddef(left.resultdef).ordtype in [u64bit,u32bit,u16bit,u8bit,uchar,uwidechar]) and
|
||||||
def:=sinttype
|
(is_nativeord(left.resultdef) or is_oversizedord(left.resultdef)) then
|
||||||
|
begin
|
||||||
|
{ Delphi-compatible: not dword = dword (not word = longint) }
|
||||||
|
{ Extension: not qword = qword }
|
||||||
|
v:=qword(not qword(v));
|
||||||
|
{ will be truncated by the ordconstnode for u32bit }
|
||||||
|
end
|
||||||
else
|
else
|
||||||
def:=s64inttype;
|
begin
|
||||||
end;
|
v:=int64(not int64(v));
|
||||||
{$ifndef cpu64bitaddr}
|
def:=get_common_intdef(torddef(left.resultdef),torddef(sinttype),false);
|
||||||
u32bit,
|
end;
|
||||||
{$endif not cpu64bitaddr}
|
|
||||||
u64bit :
|
|
||||||
begin
|
|
||||||
{ Delphi-compatible: not dword = dword (not word = longint) }
|
|
||||||
{ Extension: not qword = qword }
|
|
||||||
v:=qword(not qword(v));
|
|
||||||
{ will be truncated by the ordconstnode for u32bit }
|
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
CGMessage(type_e_mismatch);
|
CGMessage(type_e_mismatch);
|
||||||
|
Loading…
Reference in New Issue
Block a user