mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:59:29 +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,
|
||||
s16bit,
|
||||
s32bit,
|
||||
{$ifdef cpu64bitaddr}
|
||||
u32bit,
|
||||
{$endif cpu64bitaddr}
|
||||
s64bit:
|
||||
s64bit,
|
||||
u64bit:
|
||||
begin
|
||||
v:=int64(not int64(v));
|
||||
if (torddef(left.resultdef).ordtype<>s64bit) then
|
||||
def:=sinttype
|
||||
{ unsigned, equal or bigger than the native int size? }
|
||||
if (torddef(left.resultdef).ordtype in [u64bit,u32bit,u16bit,u8bit,uchar,uwidechar]) and
|
||||
(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
|
||||
def:=s64inttype;
|
||||
end;
|
||||
{$ifndef cpu64bitaddr}
|
||||
u32bit,
|
||||
{$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 }
|
||||
begin
|
||||
v:=int64(not int64(v));
|
||||
def:=get_common_intdef(torddef(left.resultdef),torddef(sinttype),false);
|
||||
end;
|
||||
end;
|
||||
else
|
||||
CGMessage(type_e_mismatch);
|
||||
|
Loading…
Reference in New Issue
Block a user