Port updated tests and binary snapping, with corrected Reals code, from tidy branch.

This commit is contained in:
David Brown 2016-08-24 14:10:06 +01:00
parent b1dc7d77e8
commit ca2cc52a44
221 changed files with 949 additions and 550 deletions

View file

@ -2,20 +2,20 @@
MODULE oocLowReal;
(*
LowReal - Gives access to the underlying properties of the type REAL
for IEEE single-precision numbers.
LowReal - Gives access to the underlying properties of the type REAL
for IEEE single-precision numbers.
Copyright (C) 1995 Michael Griebling
This module is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@ -23,10 +23,10 @@ MODULE oocLowReal;
*)
IMPORT S := SYSTEM, Console;
IMPORT S := SYSTEM, Console, Reals;
(*
Real number properties are defined as follows:
radix--The whole number value of the radix used to represent the
@ -44,69 +44,69 @@ IMPORT S := SYSTEM, Console;
small--The smallest positive value of the corresponding real number
type, represented to maximal precision.
IEC559--A Boolean value that is TRUE if and only if the implementation
of the corresponding real number type conforms to IEC 559:1989
IEC559--A Boolean value that is TRUE if and only if the implementation
of the corresponding real number type conforms to IEC 559:1989
(IEEE 754:1987) in all regards.
NOTES
6 -- If `IEC559' is TRUE, the value of `radix' is 2.
7 -- If LowReal.IEC559 is TRUE, the 32-bit format of IEC 559:1989
7 -- If LowReal.IEC559 is TRUE, the 32-bit format of IEC 559:1989
is used for the type REAL.
7 -- If LowLong.IEC559 is TRUE, the 64-bit format of IEC 559:1989
7 -- If LowLong.IEC559 is TRUE, the 64-bit format of IEC 559:1989
is used for the type REAL.
LIA1--A Boolean value that is TRUE if and only if the implementation of
the corresponding real number type conforms to ISO/IEC 10967-1:199x
(LIA-1) in all regards: parameters, arithmetic, exceptions, and
LIA1--A Boolean value that is TRUE if and only if the implementation of
the corresponding real number type conforms to ISO/IEC 10967-1:199x
(LIA-1) in all regards: parameters, arithmetic, exceptions, and
notification.
rounds--A Boolean value that is TRUE if and only if each operation produces
a result that is one of the values of the corresponding real number
rounds--A Boolean value that is TRUE if and only if each operation produces
a result that is one of the values of the corresponding real number
type nearest to the mathematical result.
gUnderflow--A Boolean value that is TRUE if and only if there are values of
the corresponding real number type between 0.0 and `small'.
gUnderflow--A Boolean value that is TRUE if and only if there are values of
the corresponding real number type between 0.0 and `small'.
exception--A Boolean value that is TRUE if and only if every operation that
exception--A Boolean value that is TRUE if and only if every operation that
attempts to produce a real value out of range raises an exception.
extend--A Boolean value that is TRUE if and only if expressions of the
corresponding real number type are computed to higher precision than
extend--A Boolean value that is TRUE if and only if expressions of the
corresponding real number type are computed to higher precision than
the stored values.
nModes--The whole number value giving the number of bit positions needed for
nModes--The whole number value giving the number of bit positions needed for
the status flags for mode control.
*)
CONST
radix*= 2;
CONST
radix*= 2;
places*= 24;
expoMax*= 127;
expoMax*= 127;
expoMin*= 1-expoMax;
large*= MAX(REAL);(*3.40282347E+38;*) (* MAX(REAL) *)
(*small*= 1.17549435E-38; (* 2^(-126) *)*)
small* = 1/8.50705917E37; (* don't know better way; -- noch *)
IEC559*= TRUE;
LIA1*= FALSE;
rounds*= FALSE;
rounds*= FALSE;
gUnderflow*= TRUE; (* there are IEEE numbers smaller than `small' *)
exception*= FALSE; (* at least in the default implementation *)
extend*= FALSE;
nModes*= 0;
TEN=10.0; (* some commonly-used constants *)
ONE=1.0;
ONE=1.0;
ZERO=0.0;
expOffset=expoMax;
hiBit=22;
expOffset=expoMax;
hiBit=22;
expBit=hiBit+1;
nMask={0..hiBit,31}; (* number mask *)
expMask={expBit..30}; (* exponent mask *)
TYPE
Modes*= SET;
VAR
(*small* : REAL; tmp: REAL;*) (* this was a test to get small as a variable at runtime. obviously, compile time preferred; -- noch *)
ErrorHandler*: PROCEDURE (errno : INTEGER);
@ -114,33 +114,19 @@ VAR
(* Error handler default stub which can be replaced *)
(* PROCEDURE power0(i, j : INTEGER) : REAL; (* used to calculate sml at runtime; -- noch *)
VAR k : INTEGER;
p : REAL;
BEGIN
k := 1;
p := i;
REPEAT
p := p * i;
INC(k);
UNTIL k=j;
RETURN p;
END power0;*)
PROCEDURE DefaultHandler (errno : INTEGER);
BEGIN
err:=errno
END DefaultHandler;
END DefaultHandler;
PROCEDURE ClearError*;
BEGIN
err:=0
END ClearError;
END ClearError;
PROCEDURE exponent*(x: REAL): INTEGER;
(*
(*
The value of the call exponent(x) shall be the exponent value of `x'
that lies between `expoMin' and `expoMax'. An exception shall occur
and may be raised if `x' is equal to 0.0.
@ -148,14 +134,14 @@ PROCEDURE exponent*(x: REAL): INTEGER;
BEGIN
(* NOTE: x=0.0 should raise exception *)
IF x=ZERO THEN RETURN 0
ELSE RETURN SHORT(S.LSH(S.VAL(LONGINT,x),-expBit) MOD 256)-expOffset
ELSE RETURN Reals.Expo(x) - expOffset
END
END exponent;
PROCEDURE exponent10*(x: REAL): INTEGER;
(*
The value of the call exponent10(x) shall be the base 10 exponent
value of `x'. An exception shall occur and may be raised if `x' is
(*
The value of the call exponent10(x) shall be the base 10 exponent
value of `x'. An exception shall occur and may be raised if `x' is
equal to 0.0.
*)
VAR exp: INTEGER;
@ -163,47 +149,74 @@ BEGIN
exp:=0; x:=ABS(x);
IF x=ZERO THEN RETURN exp END; (* exception could be raised here *)
WHILE x>=TEN DO x:=x/TEN; INC(exp) END;
WHILE (x>ZERO) & (x<1.0) DO x:=x*TEN; DEC(exp) END;
WHILE (x>ZERO) & (x<1.0) DO x:=x*TEN; DEC(exp) END;
RETURN exp
END exponent10;
(* TYPE REAL: 1/sign, 8/exponent, 23/significand *)
PROCEDURE fraction*(x: REAL): REAL;
(*
The value of the call fraction(x) shall be the significand (or
significant) part of `x'. Hence the following relationship shall
hold: x = scale(fraction(x), exponent(x)).
hold: x = scale(fraction(x), exponent(x)).
*)
CONST eZero={(hiBit+2)..29};
VAR c: CHAR;
BEGIN
IF x=ZERO THEN RETURN ZERO
IF x=ZERO THEN RETURN ZERO
ELSE
(* Set top 7 bits of exponent to 0111111 *)
S.GET(S.ADR(x)+3, c);
c := CHR(((ORD(c) DIV 128) * 128) + 63); (* Set X0111111 (X unchanged) *)
S.PUT(S.ADR(x)+3, c);
(* Set bottom bit of exponent to 0 *)
S.GET(S.ADR(x)+2, c);
c := CHR(ORD(c) MOD 128); (* Set 0XXXXXXX (X unchanged) *)
S.PUT(S.ADR(x)+2, c);
RETURN x * 2.0;
END
(*
CONST eZero={(hiBit+2)..29};
BEGIN
IF x=ZERO THEN RETURN ZERO
ELSE RETURN S.VAL(REAL,(S.VAL(SET,x)*nMask)+eZero)*2.0 (* set the mantissa's exponent to zero *)
END
*)
END fraction;
PROCEDURE IsInfinity * (real: REAL) : BOOLEAN;
CONST signMask={0..30};
VAR c0, c1, c2, c3: CHAR;
BEGIN
RETURN S.VAL(SET,real)*signMask=expMask
S.GET(S.ADR(real)+0, c3);
S.GET(S.ADR(real)+1, c2);
S.GET(S.ADR(real)+2, c1);
S.GET(S.ADR(real)+3, c0);
RETURN (ORD(c0) MOD 128 = 127) & (ORD(c1) = 128) & (ORD(c2) = 0) & (ORD(c3) = 0)
END IsInfinity;
PROCEDURE IsNaN * (real: REAL) : BOOLEAN;
CONST fracMask={0..hiBit};
VAR sreal: SET;
VAR c0, c1, c2, c3: CHAR;
BEGIN
sreal:=S.VAL(SET, real);
RETURN (sreal*expMask=expMask) & (sreal*fracMask#{})
END IsNaN;
S.GET(S.ADR(real)+0, c3);
S.GET(S.ADR(real)+1, c2);
S.GET(S.ADR(real)+2, c1);
S.GET(S.ADR(real)+3, c0);
RETURN (ORD(c0) MOD 128 = 127)
& (ORD(c1) DIV 128 = 1)
& ((ORD(c1) MOD 128 # 0) OR (ORD(c2) # 0) OR (ORD(c3) # 0))
END IsNaN;
PROCEDURE sign*(x: REAL): REAL;
(*
The value of the call sign(x) shall be 1.0 if `x' is greater than 0.0,
or shall be -1.0 if `x' is less than 0.0, or shall be either 1.0 or
-1.0 if `x' is equal to 0.0.
-1.0 if `x' is equal to 0.0.
*)
BEGIN
IF x<ZERO THEN RETURN -ONE ELSE RETURN ONE END
END sign;
(*** Refactor for 64 bit support.
PROCEDURE scale*(x: REAL; n: INTEGER): REAL;
(*
The value of the call scale(x,n) shall be the value x*radix^n if such
@ -219,27 +232,27 @@ BEGIN
lexp:=S.VAL(SET,S.LSH(exp+expOffset,expBit)); (* shifted exponent bits *)
RETURN S.VAL(REAL,(S.VAL(SET,x)*nMask)+lexp) (* insert new exponent *)
END scale;
PROCEDURE ulp*(x: REAL): REAL;
(*
The value of the call ulp(x) shall be the value of the corresponding
real number type equal to a unit in the last place of `x', if such a
value exists; otherwise an exception shall occur and may be raised.
value exists; otherwise an exception shall occur and may be raised.
*)
BEGIN
RETURN scale(ONE, exponent(x)-places+1)
END ulp;
PROCEDURE succ*(x: REAL): REAL;
(*
The value of the call succ(x) shall be the next value of the
corresponding real number type greater than `x', if such a type
exists; otherwise an exception shall occur and may be raised.
*)
*)
BEGIN
RETURN x+ulp(x)*sign(x)
END succ;
PROCEDURE pred*(x: REAL): REAL;
(*
The value of the call pred(x) shall be the next value of the
@ -249,31 +262,31 @@ PROCEDURE pred*(x: REAL): REAL;
BEGIN
RETURN x-ulp(x)*sign(x)
END pred;
PROCEDURE intpart*(x: REAL): REAL;
(*
The value of the call intpart(x) shall be the integral part of `x'.
For negative values, this shall be -intpart(abs(x)).
For negative values, this shall be -intpart(abs(x)).
*)
VAR loBit: INTEGER;
BEGIN
loBit:=(hiBit+1)-exponent(x);
IF loBit<=0 THEN RETURN x (* no fractional part *)
ELSIF loBit<=hiBit+1 THEN
ELSIF loBit<=hiBit+1 THEN
RETURN S.VAL(REAL,S.VAL(SET,x)*{loBit..31}) (* integer part is extracted *)
ELSE RETURN ZERO (* no whole part *)
END
END intpart;
PROCEDURE fractpart*(x: REAL): REAL;
(*
(*
The value of the call fractpart(x) shall be the fractional part of
`x'. This satifies the relationship fractpart(x)+intpart(x)=x.
*)
BEGIN
RETURN x-intpart(x)
END fractpart;
PROCEDURE trunc*(x: REAL; n: INTEGER): REAL;
(*
The value of the call trunc(x,n) shall be the value of the most
@ -283,14 +296,14 @@ PROCEDURE trunc*(x: REAL; n: INTEGER): REAL;
VAR loBit: INTEGER; mask: SET;
BEGIN loBit:=places-n;
IF n<=0 THEN RETURN ZERO (* exception should be raised *)
ELSIF loBit<=0 THEN RETURN x (* nothing was truncated *)
ELSIF loBit<=0 THEN RETURN x (* nothing was truncated *)
ELSE mask:={loBit..31}; (* truncation bit mask *)
RETURN S.VAL(REAL,S.VAL(SET,x)*mask)
END
END trunc;
PROCEDURE round*(x: REAL; n: INTEGER): REAL;
(*
(*
The value of the call round(x,n) shall be the value of `x' rounded to
the most significant `n' places. An exception shall occur and may be
raised if such a value does not exist, or if `n' is less than or equal
@ -299,7 +312,7 @@ PROCEDURE round*(x: REAL; n: INTEGER): REAL;
VAR loBit: INTEGER; num, mask: SET; r: REAL;
BEGIN loBit:=places-n;
IF n<=0 THEN RETURN ZERO (* exception should be raised *)
ELSIF loBit<=0 THEN RETURN x (* nothing was rounded *)
ELSIF loBit<=0 THEN RETURN x (* nothing was rounded *)
ELSE mask:={loBit..31}; num:=S.VAL(SET,x); (* truncation bit mask and number as SET *)
x:=S.VAL(REAL,num*mask); (* truncated result *)
IF loBit-1 IN num THEN (* check if result should be rounded *)
@ -311,7 +324,7 @@ BEGIN loBit:=places-n;
END
END
END round;
PROCEDURE synthesize*(expart: INTEGER; frapart: REAL): REAL;
(*
The value of the call synthesize(expart,frapart) shall be a value of
@ -322,13 +335,14 @@ PROCEDURE synthesize*(expart: INTEGER; frapart: REAL): REAL;
BEGIN
RETURN scale(frapart, expart)
END synthesize;
*)
PROCEDURE setMode*(m: Modes);
(*
The call setMode(m) shall set status flags from the value of `m',
appropriate to the underlying implementation of the corresponding real
number type.
number type.
NOTES
3 -- Many implementations of floating point provide options for
setting flags within the system which control details of the handling
@ -346,12 +360,12 @@ PROCEDURE setMode*(m: Modes);
4 -- The effects of `setMode' on operation on values of the
corresponding real number type in coroutines other than the calling
coroutine is not defined. Implementations are not require to preserve
the status flags (if any) with the coroutine state.
the status flags (if any) with the coroutine state.
*)
BEGIN
(* hardware dependent mode setting of coprocessor *)
END setMode;
PROCEDURE currentMode*(): Modes;
(*
The value of the call currentMode() shall be the current status flags
@ -365,9 +379,9 @@ PROCEDURE currentMode*(): Modes;
BEGIN
RETURN {}
END currentMode;
PROCEDURE IsLowException*(): BOOLEAN;
(*
(*
Returns TRUE if the current coroutine is in the exceptional execution state
because of the raising of the LowReal exception; otherwise returns FALSE.
*)

View file

@ -1,7 +1,8 @@
MODULE Reals;
(* JT, 5.2.90 / RC 9.12.91 conversion between reals and strings for HP-700, MB 9.12.91, JT for Ofront, 16.3. 95*)
(* DCWB 20160817 Made independent of INTEGER size *)
IMPORT S := SYSTEM;
IMPORT SYSTEM;
PROCEDURE Ten*(e: INTEGER): REAL;
VAR r, power: LONGREAL;
@ -13,7 +14,7 @@ MODULE Reals;
END ;
RETURN SHORT(r)
END Ten;
PROCEDURE TenL*(e: INTEGER): LONGREAL;
VAR r, power: LONGREAL;
@ -26,31 +27,52 @@ MODULE Reals;
power := power * power
END
END TenL;
PROCEDURE Expo*(x: REAL): INTEGER;
BEGIN
RETURN SHORT(ASH(S.VAL(INTEGER, x), -23) MOD 256)
END Expo;
PROCEDURE ExpoL*(x: LONGREAL): INTEGER;
VAR i: INTEGER; l: LONGINT;
BEGIN
IF SIZE(INTEGER) = 4 THEN
S.GET(S.ADR(x)+4, i); (* Fetch top 32 bits *)
RETURN SHORT(ASH(i, -20) MOD 2048)
ELSIF SIZE(LONGINT) = 4 THEN
S.GET(S.ADR(x)+4, l); (* Fetch top 32 bits *)
RETURN SHORT(ASH(l, -20) MOD 2048)
ELSE HALT(98)
END
END ExpoL;
(* Convert LONGREAL: Write positive integer value of x into array d.
(* Real number format (IEEE 754)
TYPE REAL - Single precision / binary32:
1/sign, 8/exponent, 23/significand
TYPE LONGREAL - Double precision / binary64:
1/sign, 11/exponent, 52/significand
exponent:
stored as exponent value + 127.
significand (fraction):
excludes leading (most significant) bit which is assumed to be 1.
*)
PROCEDURE Expo*(x: REAL): INTEGER;
VAR i: INTEGER;
BEGIN
SYSTEM.GET(SYSTEM.ADR(x)+2, i);
RETURN (i DIV 128) MOD 256
END Expo;
PROCEDURE SetExpo*(VAR x: REAL; ex: INTEGER);
VAR c: CHAR;
BEGIN
(* Replace exponent bits within top byte of REAL *)
SYSTEM.GET(SYSTEM.ADR(x)+3, c);
SYSTEM.PUT(SYSTEM.ADR(x)+3, CHR(((ORD(c) DIV 128) * 128) + ((ex DIV 2) MOD 128)));
(* Replace exponent bits within 2nd byte of REAL *)
SYSTEM.GET(SYSTEM.ADR(x)+2, c);
SYSTEM.PUT(SYSTEM.ADR(x)+2, CHR((ORD(c) MOD 128) + ((ex MOD 2) * 128)))
END SetExpo;
PROCEDURE ExpoL*(x: LONGREAL): INTEGER;
VAR i: INTEGER;
BEGIN
SYSTEM.GET(SYSTEM.ADR(x)+6, i);
RETURN (i DIV 16) MOD 2048
END ExpoL;
(* Convert LONGREAL: Write positive integer value of x into array d.
The value is stored backwards, i.e. least significant digit
first. n digits are written, with trailing zeros fill.
first. n digits are written, with trailing zeros fill.
On entry x has been scaled to the number of digits required. *)
PROCEDURE ConvertL*(x: LONGREAL; n: INTEGER; VAR d: ARRAY OF CHAR);
VAR i, j, k: LONGINT;
@ -64,15 +86,15 @@ MODULE Reals;
j := ENTIER(x - (i * 1000000000.0D0)); (* The low 9 digits *)
(* First generate the low 9 digits. *)
IF j < 0 THEN j := 0 END;
WHILE k < 9 DO
WHILE k < 9 DO
d[k] := CHR(j MOD 10 + 48); j := j DIV 10; INC(k)
END;
(* Fall through to generate the upper digits *)
ELSE
(* We can generate all the digits in one go. *)
i := ENTIER(x);
i := ENTIER(x);
END;
WHILE k < n DO
d[k] := CHR(i MOD 10 + 48); i := i DIV 10; INC(k)
END
@ -89,28 +111,26 @@ MODULE Reals;
ELSE RETURN CHR(i+55) END
END ToHex;
PROCEDURE BytesToHex(VAR b, d: ARRAY OF SYSTEM.BYTE);
VAR i: INTEGER; l: LONGINT; by: CHAR;
BEGIN
i := 0; l := LEN(b);
WHILE i < l DO
by := SYSTEM.VAL(CHAR, b[i]);
d[i*2] := ToHex(ORD(by) DIV 16);
d[i*2+1] := ToHex(ORD(by) MOD 16);
INC(i)
END
END BytesToHex;
(* Convert Hex *)
PROCEDURE ConvertH*(y: REAL; VAR d: ARRAY OF CHAR);
TYPE pc4 = POINTER TO ARRAY 4 OF CHAR;
VAR p: pc4; i: INTEGER;
BEGIN
p := S.VAL(pc4, S.ADR(y)); i := 0;
WHILE i<4 DO
d[i*2] := ToHex(ORD(p[i]) DIV 16);
d[i*2+1] := ToHex(ORD(p[i]) MOD 16)
END
BEGIN BytesToHex(y, d)
END ConvertH;
(* Convert Hex Long *)
PROCEDURE ConvertHL*(y: LONGREAL; VAR d: ARRAY OF CHAR);
TYPE pc8 = POINTER TO ARRAY 8 OF CHAR;
VAR p: pc8; i: INTEGER;
BEGIN
p := S.VAL(pc8, S.ADR(y)); i := 0;
WHILE i<8 DO
d[i*2] := ToHex(ORD(p[i]) DIV 16);
d[i*2+1] := ToHex(ORD(p[i]) MOD 16)
END
PROCEDURE ConvertHL*(x: LONGREAL; VAR d: ARRAY OF CHAR);
BEGIN BytesToHex(x, d)
END ConvertHL;
END Reals.

View file

@ -55,7 +55,7 @@ C7442404 movl $0, 4(%esp)
00000000
C7042400 movl $LC0, (%esp)
E8000000 call _Heap_REGMOD
A3800000 movl %eax, _m.2056
A3800000 movl %eax, _m.1612
C7050000 movl $544502577, _aa_a30
00003173
C7050400 movl $1663053873, _aa_a30+4

View file

@ -1,5 +1,5 @@
#!/bin/sh
. ../testenv.sh
voc aa.mod -m
$OBECOMP aa.mod -m
./aa >result
. ../testresult.sh

View file

@ -48,7 +48,7 @@ C7442404 movl $0, 4(%esp)
00000000
C7042400 movl $LC0, (%esp)
E8000000 call _Heap_REGMOD
A3000000 movl %eax, _m.2052
A3000000 movl %eax, _m.1608
C7442404 movl $7, 4(%esp)
07000000
C7042406 movl $LC1, (%esp)

View file

@ -1,5 +1,5 @@
#!/bin/sh
. ../testenv.sh
voc hello.mod -m
$OBECOMP hello.mod -m
./hello >result
. ../testresult.sh

View file

@ -0,0 +1,18 @@
MODULE IntSyntax;
(* Test for error messages generated by incompatible integer types *)
VAR s: SHORTINT; i: INTEGER; l: LONGINT;
BEGIN
l := l; (* Good, same types *)
l := i; (* Good, LONGINT longer than INTEGER *)
l := s; (* Good, LONGINT longer than SHORTINT *)
i := s; (* Good, INTEGER longer then SHORTINT *)
i := l; (* Bad, INTEGER shorter than LONGINT *)
s := l; (* Bad, SHORTINT shorter than LONGINT *)
i := l; (* Bad, SHORTINT shorter than INTEGER *)
END IntSyntax.

View file

@ -0,0 +1,15 @@
IntSyntax.mod compiling IntSyntax.
14: i := l; (* Bad, INTEGER shorter than LONGINT *)
^
pos 341 err 113 incompatible assignment
15: s := l; (* Bad, SHORTINT shorter than LONGINT *)
^
pos 393 err 113 incompatible assignment
16: i := l; (* Bad, SHORTINT shorter than INTEGER *)
^
pos 446 err 113 incompatible assignment
Module compilation failed.

View file

@ -0,0 +1,5 @@
#!/bin/sh
. ../testenv.sh
# Generate mixed source and assembly code listing
$OBECOMP IntSyntax.mod -m >result
. ../testresult.sh

View file

@ -91,11 +91,51 @@ BEGIN
(* Also need full tests for CHAR, and poossibly SYSTEM.BYTE. Here's a simple one *)
c := 1X; c := SYSTEM.LSH(c,2); c := SYSTEM.ROT(c,-2); ASSERT(c=1X, 93);
b := 1; b := SYSTEM.LSH(b,2); b := SYSTEM.ROT(b,-2); ASSERT(SYSTEM.VAL(INTEGER,b)=1, 94);
b := 1; b := SYSTEM.LSH(b,2); b := SYSTEM.ROT(b,-2); ASSERT(SYSTEM.VAL(CHAR,b)=1X, 94);
END Shift;
PROCEDURE TestValue(v,e: LONGINT; name: ARRAY OF CHAR);
BEGIN
IF v # e THEN
Console.String(name);
Console.String(" = ");
Console.Int(v,1);
Console.String(", expected ");
Console.Int(e,1);
Console.Ln;
END
END TestValue;
PROCEDURE IntSize;
VAR l: LONGINT;
BEGIN
TestValue(MIN(SHORTINT), -80H, "MIN(SHORTINT)");
TestValue(MAX(SHORTINT), 7FH, "MAX(SHORTINT)");
IF SIZE(INTEGER) = 2 THEN (* 32 bit machine *)
TestValue(MIN(INTEGER), -7FFFH - 1, "MIN(INTEGER)");
TestValue(MAX(INTEGER), 7FFFH, "MAX(INTEGER)");
TestValue(MIN(LONGINT), -7FFFFFFFH - 1, "MIN(LONGINT)");
TestValue(MAX(LONGINT), 7FFFFFFFH, "MAX(LONGINT)");
ELSIF SIZE(INTEGER) = 4 THEN (* 64 bit machine *)
TestValue(MIN(INTEGER), -7FFFFFFFH - 1, "MIN(INTEGER)");
TestValue(MAX(INTEGER), 7FFFFFFFH, "MAX(INTEGER)");
(* Since we need to be compilable on 32 bit machines we cannot use
a 64 bit constant, so use arithmetic. *)
l := 1; l := SYSTEM.LSH(l, 63); l := l-1; (* Generate l = 7FFFFFFFFFFFFFFFH *)
TestValue(MIN(LONGINT), -l - 1, "MIN(LONGINT)");
TestValue(MAX(LONGINT), l, "MAX(LONGINT)");
ELSE
Console.String("SIZE(INTEGER) = ");
Console.Int(SIZE(INTEGER),1);
Console.String(", expected 2 or 4.");
Console.Ln;
END;
END IntSize;
BEGIN
Shift;
IntSize;
Console.String("Language tests successful."); Console.Ln;
END TestLanguage.

View file

@ -484,3 +484,58 @@ D3E2 sall %cl, %edx
89D0 movl %edx, %eax
09D8 orl %ebx, %eax
8845E5 movb %al, -27(%ebp)
0FB645E5 movzbl -27(%ebp), %eax
3A45F7 cmpb -9(%ebp), %al
740C je L52
C7042436 movl $54, (%esp)
E8000000 call _Platform_AssertFail
D07DF7 sarb -9(%ebp)
0FB745F4 movzwl -12(%ebp), %eax
83E801 subl $1, %eax
668945F4 movw %ax, -12(%ebp)
66837DF4 cmpw $-7, -12(%ebp)
0F8D19FF jge L53
66C745F4 movw $0, -12(%ebp)
C745EC01 movl $1, -20(%ebp)
8B45EC movl -20(%ebp), %eax
C1E01F sall $31, %eax
8945EC movl %eax, -20(%ebp)
8B45EC movl -20(%ebp), %eax
8945E0 movl %eax, -32(%ebp)
EB50 jmp L54
8B45E0 movl -32(%ebp), %eax
8945E8 movl %eax, -24(%ebp)
66837DF4 cmpw $0, -12(%ebp)
780F js L55
0FBF45F4 movswl -12(%ebp), %eax
8B55E8 movl -24(%ebp), %edx
89C1 movl %eax, %ecx
D3E2 sall %cl, %edx
89D0 movl %edx, %eax
EB0F jmp L56
0FBF45F4 movswl -12(%ebp), %eax
F7D8 negl %eax
8B55E8 movl -24(%ebp), %edx
89C1 movl %eax, %ecx
D3FA sarl %cl, %edx
89D0 movl %edx, %eax
8945E8 movl %eax, -24(%ebp)
8B45E8 movl -24(%ebp), %eax
3B45EC cmpl -20(%ebp), %eax
740C je L57
C704243E movl $62, (%esp)
E8000000 call _Platform_AssertFail
D17DEC sarl -20(%ebp)
0FB745F4 movzwl -12(%ebp), %eax
83E801 subl $1, %eax
668945F4 movw %ax, -12(%ebp)
66837DF4 cmpw $-31, -12(%ebp)
7DA9 jge L58
66C745F4 movw $0, -12(%ebp)
66C745E6 movw $1, -26(%ebp)
0FB745E6 movzwl -26(%ebp), %eax
0FB7C0 movzwl %ax, %eax
C1E00F sall $15, %eax
668945E6 movw %ax, -26(%ebp)
0FB745E6 movzwl -26(%ebp), %eax
668945F2 movw %ax, -14(%ebp)

View file

@ -1,6 +1,6 @@
#!/bin/sh
. ../testenv.sh
# Generate mixed source and assembly code listing
voc TestLanguage.mod -m
$OBECOMP TestLanguage.mod -m
./TestLanguage >result
. ../testresult.sh

View file

@ -0,0 +1,99 @@
MODULE TestLibrary;
IMPORT SYSTEM, Oberon, Texts, Reals, oocLowReal;
VAR W: Texts.Writer;
PROCEDURE tc(c: CHAR); BEGIN Texts.Write(W, c) END tc;
PROCEDURE ts(s: ARRAY OF CHAR); BEGIN Texts.WriteString(W, s) END ts;
PROCEDURE ti(i, n: LONGINT); BEGIN Texts.WriteInt(W, i, n) END ti;
PROCEDURE tr(r: LONGREAL; n: INTEGER); BEGIN Texts.WriteLongReal(W, r, n) END tr;
PROCEDURE tn; BEGIN Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf) END tn;
PROCEDURE TestConvert(lr: LONGREAL);
VAR str: ARRAY 20 OF CHAR; i: INTEGER;
BEGIN
Reals.ConvertL(lr, 6, str);
i := 6; WHILE i > 0 DO DEC(i); tc(str[i]) END;
tn;
END TestConvert;
PROCEDURE TestHex(r: REAL);
VAR str: ARRAY 20 OF CHAR;
BEGIN
Reals.ConvertH(r, str); str[8] := 0X; ts(str); tn;
END TestHex;
PROCEDURE TestSetExpo(r: REAL; i: INTEGER);
BEGIN
ts("r = "); tr(r,10);
ts(", i = "); ti(Reals.Expo(r),1);
Reals.SetExpo(r, i);
ts(" -> r = "); tr(r,10);
ts(", i = "); ti(Reals.Expo(r),1); tn;
END TestSetExpo;
PROCEDURE TestFractionPart(r: REAL);
BEGIN
ts("r = "); tr(r,14);
ts(", exp = "); ti(Reals.Expo(r),1);
r := oocLowReal.fraction(r);
ts(" -> r = "); tr(r,14);
ts(", exp = "); ti(Reals.Expo(r),1); tn;
END TestFractionPart;
PROCEDURE RealTests;
VAR
str: ARRAY 20 OF CHAR;
r: REAL;
(*
lr: LONGREAL;
*)
BEGIN
TestConvert(1.0);
TestConvert(1.5);
TestConvert(2.0);
TestConvert(2.99);
TestConvert(3.0);
TestHex(1.0);
TestHex(1.5);
TestHex(2.0);
TestHex(2.99);
TestHex(3.0);
ti(Reals.Expo(0.5),1); tn; (* 126 *)
ti(Reals.Expo(1.0),1); tn; (* 127 *)
ti(Reals.Expo(2.0),1); tn; (* 128 *)
ti(Reals.Expo(3.0),1); tn; (* 128 *)
ti(Reals.Expo(4.0),1); tn; (* 129 *)
TestSetExpo(1.0, 129);
TestSetExpo(-1.0, 129);
TestSetExpo(2.0, 129);
TestSetExpo(-4.0, 129);
TestSetExpo(1.5, 129);
TestSetExpo(-1.5, 129);
TestFractionPart(1.234);
TestFractionPart(-1.234);
TestFractionPart(32.678);
TestFractionPart(-32.678);
r := 0.0;
ASSERT(~oocLowReal.IsInfinity(r), 3); ASSERT(~oocLowReal.IsNaN(r), 4);
r := 0.0; Reals.SetExpo(r, 255);
ASSERT(oocLowReal.IsInfinity(r), 5); ASSERT(~oocLowReal.IsNaN(r), 6);
r := 0.123; Reals.SetExpo(r, 255);
ASSERT(~oocLowReal.IsInfinity(r), 7); ASSERT(oocLowReal.IsNaN(r), 8);
END RealTests;
BEGIN
Texts.OpenWriter(W);
RealTests;
ts("Library tests successful."); tn
END TestLibrary.

View file

@ -0,0 +1,26 @@
000001
000001
000002
000002
000003
0000803F
0000C03F
00000040
295C3F40
00004040
126
127
128
128
129
r = 1.0D+000, i = 127 -> r = 4.0D+000, i = 129
r = -1.0D+000, i = 127 -> r = -4.0D+000, i = 129
r = 2.0D+000, i = 128 -> r = 4.0D+000, i = 129
r = -4.0D+000, i = 129 -> r = -4.0D+000, i = 129
r = 1.5D+000, i = 127 -> r = 6.0D+000, i = 129
r = -1.5D+000, i = 127 -> r = -6.0D+000, i = 129
r = 1.23400D+000, exp = 127 -> r = 1.23400D+000, exp = 127
r = -1.23400D+000, exp = 127 -> r = -1.23400D+000, exp = 127
r = 3.26780D+001, exp = 132 -> r = 1.02119D+000, exp = 127
r = -3.26780D+001, exp = 132 -> r = -1.02119D+000, exp = 127
Library tests successful.

View file

@ -0,0 +1,6 @@
#!/bin/sh
. ../testenv.sh
# Generate mixed source and assembly code listing
$OBECOMP TestLibrary.mod -m
./TestLibrary >result
. ../testresult.sh

View file

@ -71,7 +71,7 @@ C7442404 movl $0, 4(%esp)
00000000
C7042400 movl $LC0, (%esp)
E8000000 call _Heap_REGMOD
A3000000 movl %eax, _m.2287
A3000000 movl %eax, _m.1843
0FB70500 movzwl _Platform_ArgCount, %eax
6683F802 cmpw $2, %ax
7F5C jg L6

View file

@ -1,5 +1,5 @@
#!/bin/sh
. ../testenv.sh
voc LSS.Mod LSB.Mod LSC.Mod LSV.Mod lola.Mod -m
$OBECOMP LSS.Mod LSB.Mod LSC.Mod LSV.Mod lola.Mod -m
./Lola RISC5.Lola result
. ../testresult.sh

View file

@ -368,7 +368,7 @@ C7442404 movl $_EnumPtrs, 4(%esp)
02040000
C7042411 movl $LC2, (%esp)
E8000000 call _Heap_REGMOD
A3180000 movl %eax, _m.2428
A3180000 movl %eax, _m.1984
C7442404 movl $7, 4(%esp)
07000000
C704241C movl $LC3, (%esp)

View file

@ -1,6 +1,6 @@
#!/bin/sh
. ../testenv.sh
voc signal.mod -m
$OBECOMP signal.mod -m
./SignalTest x &
sleep 1
kill -2 $!

View file

@ -7,16 +7,16 @@ fi
# Compare generated code
if [ -f new.asm ]
then egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.$FLAVOUR.s
then egrep '^[0-9 ]{4} ([0-9a-f]{4}| ) [0-9A-F]{2}[0-9A-F ]{6}' new.asm|cut -c 11- >new.$FLAVOUR.$BRANCH.s
if [ -f old.$FLAVOUR.s -a old.$FLAVOUR -nt ../../../../bootstrap/unix-44/Configuration.c ]
if [ -f old.$FLAVOUR.$BRANCH.s -a old.$FLAVOUR.$BRANCH -nt ../planned-binary-change ]
then
if diff -b old.$FLAVOUR.s new.$FLAVOUR.s
if diff -b old.$FLAVOUR.$BRANCH.s new.$FLAVOUR.$BRANCH.s
then echo "--- Generated code unchanged ---"
else echo "--- Generated code changed ---"
fi
else
cp new.$FLAVOUR.s old.$FLAVOUR.s
cp new.$FLAVOUR.$BRANCH.s old.$FLAVOUR.$BRANCH.s
echo "--- Generated code snapped ---"
fi

View file

@ -0,0 +1,4 @@
aaa
-3.1E+02
-311.141504
-3.1D+002

View file

@ -0,0 +1,5 @@
#!/bin/sh
. ../testenv.sh
$OBECOMP testTexts.mod -m
./testTexts >result
. ../testresult.sh

View file

@ -0,0 +1,41 @@
(* compile with voc -M testTexts.Mod *)
MODULE testTexts;
IMPORT Texts, Console;
CONST pi = -311.1415;
VAR
W: Texts.Writer;
T: Texts.Text;
R: Texts.Reader;
ch: CHAR;
i: INTEGER;
s: ARRAY 1024 OF CHAR;
BEGIN
Texts.OpenWriter(W);
Texts.WriteString(W, "aaa"); Texts.WriteLn(W);
Texts.WriteReal(W, pi, 7); Texts.WriteLn(W);
Texts.WriteRealFix(W, pi, 0, 7); Texts.WriteLn(W);
Texts.WriteLongReal(W, pi, 7); Texts.WriteLn(W);
NEW(T); Texts.Open(T, "test.txt");
Texts.Append(T, W.buf);
(*Texts.Store(W, T);*)
Texts.OpenReader(R, T, 0);
Texts.Read(R, ch);
i := 0;
WHILE ~R.eot DO
IF ch = 0DX THEN
s[i] := 0X; i := 0; Console.String(s); Console.Ln
ELSE
s[i] := ch; INC(i)
END;
Texts.Read(R, ch)
END;
s[i] := 0X; (*Console.String(s)*)
END testTexts.

View file

@ -45,7 +45,8 @@ clean:
assemble:
@printf "\nmake assemble - compiling Oberon compiler c source:\n"
@printf " VERSION: %s\n" "$(VERSION)"
@printf " Target characeristics:\n"
@printf " BRANCH: %s\n" "$(BRANCH)"
@printf " Target characteristics:\n"
@printf " PLATFORM: %s\n" "$(PLATFORM)"
@printf " OS: %s\n" "$(OS)"
@printf " BUILDDIR: %s\n" "$(BUILDDIR)"
@ -215,24 +216,27 @@ ooc2:
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc2/ooc2IntStr.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc2/ooc2Real0.Mod
TODO: Comment disabled lines contain use of VAL that reads beyond source variable
ooc:
@printf "\nMaking ooc library\n"
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLowReal.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLowLReal.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealMath.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocOakMath.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealMath.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLowLReal.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealMath.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocOakMath.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealMath.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLongInts.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocComplexMath.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLComplexMath.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocComplexMath.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLComplexMath.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocAscii.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocCharClass.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocStrings.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocConvTypes.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealConv.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealStr.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealConv.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealStr.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealConv.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocLRealStr.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealConv.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRealStr.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocIntConv.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocIntStr.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocMsg.Mod
@ -242,7 +246,7 @@ ooc:
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocStrings2.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocRts.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocFilenames.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocTextRider.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocTextRider.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocBinaryRider.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocJulianDay.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ooc/oocFilenames.Mod
@ -265,52 +269,52 @@ ulm:
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSYSTEM.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmEvents.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmProcess.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmResources.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmForwarders.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmRelatedEvents.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmResources.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmForwarders.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmRelatedEvents.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTypes.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreams.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStrings.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreams.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStrings.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysTypes.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTexts.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysConversions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmErrors.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysErrors.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysStat.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTexts.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysConversions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmErrors.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysErrors.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysStat.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmASCII.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSets.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIO.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmAssertions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIndirectDisciplines.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreamDisciplines.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmAssertions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIndirectDisciplines.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreamDisciplines.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIEEE.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmMC68881.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmReals.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPrint.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmWrite.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConstStrings.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPlotters.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysIO.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmLoader.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmNetIO.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPersistentObjects.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPersistentDisciplines.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmOperations.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmScales.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimes.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmClocks.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimers.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConditions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreamConditions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimeConditions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmCiphers.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmCipherOps.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmBlockCiphers.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmAsymmetricCiphers.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConclusions.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmRandomGenerators.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTCrypt.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIntOperations.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPrint.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmWrite.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConstStrings.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPlotters.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmSysIO.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmLoader.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmNetIO.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPersistentObjects.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmPersistentDisciplines.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmOperations.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmScales.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimes.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmClocks.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimers.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConditions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmStreamConditions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTimeConditions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmCiphers.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmCipherOps.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmBlockCiphers.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmAsymmetricCiphers.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmConclusions.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmRandomGenerators.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmTCrypt.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/ulm/ulmIntOperations.Mod
pow32:
@printf "\nMaking pow library\n"
@ -321,7 +325,7 @@ misc:
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/system/Oberon.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/crt.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/Listen.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/MersenneTwister.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/MersenneTwister.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/MultiArrays.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/misc/MultiArrayRiders.Mod
@ -337,13 +341,13 @@ s3:
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethZlibReaders.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethZlibWriters.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethZip.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethRandomNumbers.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethRandomNumbers.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethGZReaders.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethGZWriters.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethUnicode.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethDates.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethReals.Mod
cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethStrings.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethReals.Mod
# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethStrings.Mod
librarybinary:
@printf "\nMaking lib$(ONAME)\n"
@ -374,13 +378,18 @@ sourcechanges:
RUNTEST = COMPILER=$(COMPILER) OBECOMP=$(VISHAP) FLAVOUR=$(FLAVOUR) BRANCH=$(BRANCH) sh ./test.sh "$(INSTALLDIR)"
confidence:
@printf "\n\n--- Confidence tests ---\n\n"
cd src/test/confidence/hello; COMPILER=$(COMPILER) FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
cd src/test/confidence/language; COMPILER=$(COMPILER) FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; COMPILER=$(COMPILER) FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"; fi
cd src/test/confidence/lola; COMPILER=$(COMPILER) FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
cd src/test/confidence/arrayassignment; COMPILER=$(COMPILER) FLAVOUR=$(FLAVOUR) sh ./test.sh "$(INSTALLDIR)"
cd src/test/confidence/hello; $(RUNTEST)
cd src/test/confidence/intsyntax; $(RUNTEST)
cd src/test/confidence/language; $(RUNTEST)
cd src/test/confidence/texts; $(RUNTEST)
cd src/test/confidence/library; $(RUNTEST)
cd src/test/confidence/lola; $(RUNTEST)
cd src/test/confidence/arrayassignment; $(RUNTEST)
if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; $(RUNTEST); fi
@printf "\n\n--- Confidence tests passed ---\n\n"