mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 10:19:17 +02:00
* disable several complex procedures for avr with a newly introduced define: EXCLUDE_COMPLEX_PROCS. They
might compile with an improved register allocator in the future git-svn-id: trunk@30546 -
This commit is contained in:
parent
1ef7e36f3c
commit
886e3e8d02
@ -22,6 +22,13 @@ Unit System;
|
||||
|
||||
{$define FPC_IS_SYSTEM}
|
||||
{$define HAS_CMDLINE}
|
||||
|
||||
{ currently, the avr compiler cannot compile complex procedures especially dealing with int64
|
||||
which are probaly anyways rarely used on avr }
|
||||
{$ifdef CPUAVR}
|
||||
{$define EXCLUDE_COMPLEX_PROCS}
|
||||
{$endif CPUAVR}
|
||||
|
||||
{ $define USE_NOTHREADMANAGER}
|
||||
|
||||
{$define DISABLE_NO_THREAD_MANAGER}
|
||||
|
@ -323,6 +323,9 @@
|
||||
q1,q2,q3 : qword;
|
||||
|
||||
begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
{ there's no difference between signed and unsigned multiplication,
|
||||
when the destination size is equal to the source size and overflow
|
||||
checking is off }
|
||||
@ -363,6 +366,7 @@
|
||||
else
|
||||
fpc_mul_int64:=q3;
|
||||
end;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
end;
|
||||
{$endif FPC_SYSTEM_HAS_MUL_INT64}
|
||||
|
||||
|
@ -990,24 +990,26 @@ end;
|
||||
{$endif}
|
||||
|
||||
{$ifndef FPC_STR_ENUM_INTERN}
|
||||
{ currently, the avr code generator fails on this procedure, so we disable it,
|
||||
{ currently, the avr code generator fails on this procedure, so we disable it,
|
||||
this is not a good solution but fixing compilation of this procedure for
|
||||
avr is hard, requires significant changes to the register allocator to take
|
||||
care of different register classes }
|
||||
{$ifndef CPUAVR}
|
||||
procedure fpc_chararray_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out a : array of char);compilerproc;
|
||||
var
|
||||
ss : shortstring;
|
||||
maxlen : SizeInt;
|
||||
begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
fpc_shortstr_enum(ordinal,len,typinfo,ord2strindex,ss);
|
||||
if length(ss)<high(a)+1 then
|
||||
maxlen:=length(ss)
|
||||
else
|
||||
maxlen:=high(a)+1;
|
||||
fpc_shortstr_chararray_intern_charmove(ss,a,maxlen);
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
end;
|
||||
{$endif CPUAVR}
|
||||
{$endif not FPC_STR_ENUM_INTERN}
|
||||
|
||||
procedure fpc_chararray_bool(b : boolean;len:sizeint;out a : array of char);compilerproc;
|
||||
@ -1220,6 +1222,9 @@ end;
|
||||
maxqword=qword($ffffffffffffffff);
|
||||
|
||||
begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
fpc_val_int64_shortstr := 0;
|
||||
Temp:=0;
|
||||
Code:=InitVal(s,negative,base);
|
||||
@ -1263,6 +1268,7 @@ end;
|
||||
fpc_val_int64_shortstr:=int64(Temp);
|
||||
If Negative Then
|
||||
fpc_val_int64_shortstr:=-fpc_val_int64_shortstr;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
end;
|
||||
|
||||
|
||||
|
@ -1217,6 +1217,9 @@ var
|
||||
s:string;
|
||||
|
||||
begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
if textrec(t).mode<>fmoutput then
|
||||
begin
|
||||
if textrec(t).mode=fminput then
|
||||
@ -1229,6 +1232,7 @@ begin
|
||||
if (inoutres <> 0) then
|
||||
exit;
|
||||
fpc_writeBuffer(t,s[1],length(s));
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
end;
|
||||
|
||||
{$ifdef FPC_HAS_STR_CURRENCY}
|
||||
@ -1681,6 +1685,9 @@ var
|
||||
p,startp,maxp : pchar;
|
||||
end_of_string:boolean;
|
||||
Begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
ReadPCharLen:=0;
|
||||
If not CheckRead(f) then
|
||||
exit;
|
||||
@ -1722,6 +1729,7 @@ Begin
|
||||
inc(sPos,Len);
|
||||
until (spos=MaxLen) or end_of_string;
|
||||
ReadPCharLen:=spos;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
End;
|
||||
|
||||
|
||||
|
@ -81,8 +81,12 @@ Procedure DoAssign(var t : TypedFile);
|
||||
const
|
||||
start : dword = 0;
|
||||
Begin
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
runerror(219);
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
Assign(t,'fpc_'+HexStr(start,8)+'.tmp');
|
||||
inc(start);
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
End;
|
||||
{$endif FPC_HAS_FEATURE_RANDOM}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user