Browse Source

* define COMP_IS_INT64 for m68k cpu

pierre 23 years ago
parent
commit
1ba8fd756e
3 changed files with 28 additions and 0 deletions
  1. 10 0
      tests/tbs/tb0281.pp
  2. 8 0
      tests/test/tstring4.pp
  3. 10 0
      tests/webtbs/tw1269.pp

+ 10 - 0
tests/tbs/tb0281.pp

@@ -1,14 +1,24 @@
 { Old file: tbs0333.pp }
 { Old file: tbs0333.pp }
 {  }
 {  }
 
 
+{$ifdef cpu68k}
+  {$define COMP_IS_INT64}
+{$endif cpu68k}
+
+
 var
 var
   a,b : comp;
   a,b : comp;
   s1,s2 : string;
   s1,s2 : string;
 begin
 begin
   a:=11384563;
   a:=11384563;
   b:=a*a;
   b:=a*a;
+{$ifdef COMP_IS_INT64}
+  str(a*a,s1);
+  str(b,s2);
+{$else not COMP_IS_INT64}
   str(a*a:0:0,s1);
   str(a*a:0:0,s1);
   str(b:0:0,s2);
   str(b:0:0,s2);
+{$endif COMP_IS_INT64}
   writeln(s1);
   writeln(s1);
   writeln(s2);
   writeln(s2);
   if (s1<>'129608274700969') or (s2<>'129608274700969') then
   if (s1<>'129608274700969') or (s2<>'129608274700969') then

+ 8 - 0
tests/test/tstring4.pp

@@ -1,5 +1,9 @@
 Program ansitest;
 Program ansitest;
 
 
+{$ifdef cpu68k}
+  {$define COMP_IS_INT64}
+{$endif cpu68k}
+
 {$ifndef fpc}
 {$ifndef fpc}
 Function Memavail : Longint;
 Function Memavail : Longint;
 begin
 begin
@@ -433,7 +437,11 @@ begin
   str(E,S);
   str(E,S);
   Writeln (S);
   Writeln (S);
   Write ('str(Co,S)= ');
   Write ('str(Co,S)= ');
+{$ifdef COMP_IS_INT64}
+  Co:=4;
+{$else}
   Co:=4.0;
   Co:=4.0;
+{$endif}
   str(Co,S);
   str(Co,S);
   Writeln (S);
   Writeln (S);
   Write ('str(Si,S)= ');
   Write ('str(Si,S)= ');

+ 10 - 0
tests/webtbs/tw1269.pp

@@ -1,6 +1,12 @@
 { Source provided for Free Pascal Bug Report 1269 }
 { Source provided for Free Pascal Bug Report 1269 }
 { Submitted by "Rob Kolstad" on  2000-11-28 }
 { Submitted by "Rob Kolstad" on  2000-11-28 }
 { e-mail: [email protected] }
 { e-mail: [email protected] }
+
+{$ifdef cpu68k}
+  {$define COMP_IS_INT64}
+{$endif cpu68k}
+
+
 var
 var
   A : array [0..25, 0..100] of comp;
   A : array [0..25, 0..100] of comp;
   V : array [1..25] of longint;
   V : array [1..25] of longint;
@@ -36,7 +42,11 @@ begin
   v[10] := 10;
   v[10] := 10;
   for i := 0 to 25 do
   for i := 0 to 25 do
     for j := 0 to nn do A[i, j] := -1;
     for j := 0 to nn do A[i, j] := -1;
+{$ifdef COMP_IS_INT64}
+  writeln( calc(vt, nn));
+{$else not COMP_IS_INT64}
   writeln( calc(vt, nn) :0:0);
   writeln( calc(vt, nn) :0:0);
+{$endif COMP_IS_INT64}
 end.
 end.