powerpc port completed.

mostly there are changes in Reals.Mod, for big endian.
This commit is contained in:
Norayr Chilingarian 2014-01-08 04:01:49 +04:00
parent 44086e5817
commit b273a9901b
3 changed files with 7 additions and 4 deletions

View file

@ -65,7 +65,7 @@ MODULE ulmTypes;
CONST
bigEndian* = 0; (* SPARC, M68K etc *)
littleEndian* = 1; (* Intel 80x86, VAX etc *)
byteorder* = littleEndian; (* machine-dependent constant *)
byteorder* = bigEndian; (* machine-dependent constant *)
TYPE
ByteOrder* = SHORTINT; (* bigEndian or littleEndian *)

View file

@ -38,7 +38,8 @@ MODULE Reals;
PROCEDURE ExpoL*(x: LONGREAL): INTEGER;
VAR h: LONGINT;
BEGIN
S.GET(S.ADR(x)+4, h);
(*S.GET(S.ADR(x)+4, h);*) (* commented out, powerpc is big endian *)
S.GET(S.ADR(x), h);
RETURN SHORT(ASH(h, -20) MOD 2048)
END ExpoL;
@ -52,9 +53,11 @@ MODULE Reals;
CONST expo = {1..11};
VAR h: SET;
BEGIN
S.GET(S.ADR(x)+4, h);
(*S.GET(S.ADR(x)+4, h);*) (* big endian *)
S.GET(S.ADR(x), h);
h := h - expo + S.VAL(SET, ASH(LONG(e), 20));
S.PUT(S.ADR(x)+4, h)
(*S.PUT(S.ADR(x)+4, h)*)
S.PUT(S.ADR(x), h)
END SetExpoL;
PROCEDURE Convert*(x: REAL; n: INTEGER; VAR d: ARRAY OF CHAR);

BIN
vocstatic.linux.gnuc.powerpc Executable file

Binary file not shown.