mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 02:29:34 +02:00
+ define cpunodefaultint
git-svn-id: trunk@10415 -
This commit is contained in:
parent
bc0586139a
commit
5826b9bdad
compiler
@ -113,6 +113,7 @@
|
||||
{$define cpu16bit}
|
||||
{$define cpuflags}
|
||||
{$define cpunofpu}
|
||||
{$define cpunodefaultint}
|
||||
{$endif avr}
|
||||
|
||||
{$IFDEF MACOS}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -1206,8 +1206,40 @@ implementation
|
||||
is_signed(rd) or
|
||||
(nodetype=subn) then
|
||||
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(left,sinttype);
|
||||
{$endif cpunodefaultint}
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user