mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-06 09:09:28 +01:00
+ define cpunodefaultint
git-svn-id: trunk@10415 -
This commit is contained in:
parent
bc0586139a
commit
5826b9bdad
@ -113,6 +113,7 @@
|
|||||||
{$define cpu16bit}
|
{$define cpu16bit}
|
||||||
{$define cpuflags}
|
{$define cpuflags}
|
||||||
{$define cpunofpu}
|
{$define cpunofpu}
|
||||||
|
{$define cpunodefaultint}
|
||||||
{$endif avr}
|
{$endif avr}
|
||||||
|
|
||||||
{$IFDEF MACOS}
|
{$IFDEF MACOS}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
Copyright (c) 1998-2002 by Florian Klaempfl
|
Copyright (c) 1998-2002 by Florian Klaempfl
|
||||||
|
|
||||||
Type checking and register allocation for add nodes
|
Type checking and simplification for add nodes
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -1206,8 +1206,40 @@ implementation
|
|||||||
is_signed(rd) or
|
is_signed(rd) or
|
||||||
(nodetype=subn) then
|
(nodetype=subn) then
|
||||||
begin
|
begin
|
||||||
|
{$ifdef cpunodefaultint}
|
||||||
|
{ for small cpus we use the smallest common type }
|
||||||
|
llow:=torddef(rd).low;
|
||||||
|
if llow<torddef(ld).low then
|
||||||
|
llow:=torddef(ld).low;
|
||||||
|
lhigh:=torddef(rd).high;
|
||||||
|
if lhigh<torddef(ld).high then
|
||||||
|
lhigh:=torddef(ld).high;
|
||||||
|
case range_to_basetype(llow,lhigh) of
|
||||||
|
s8bit:
|
||||||
|
nd:=s8inttype;
|
||||||
|
u8bit:
|
||||||
|
nd:=u8inttype;
|
||||||
|
s16bit:
|
||||||
|
nd:=s8inttype;
|
||||||
|
u16bit:
|
||||||
|
nd:=u8inttype;
|
||||||
|
s32bit:
|
||||||
|
nd:=s8inttype;
|
||||||
|
u32bit:
|
||||||
|
nd:=u8inttype;
|
||||||
|
s64bit:
|
||||||
|
nd:=s8inttype;
|
||||||
|
u64bit:
|
||||||
|
nd:=u8inttype;
|
||||||
|
else
|
||||||
|
internalerror(200802291);
|
||||||
|
end;
|
||||||
|
inserttypeconv(right,nd);
|
||||||
|
inserttypeconv(left,nd);
|
||||||
|
{$else cpunodefaultint}
|
||||||
inserttypeconv(right,sinttype);
|
inserttypeconv(right,sinttype);
|
||||||
inserttypeconv(left,sinttype);
|
inserttypeconv(left,sinttype);
|
||||||
|
{$endif cpunodefaultint}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user