mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 20:22:24 +00:00
powerpc port completed.
mostly there are changes in Reals.Mod, for big endian.
This commit is contained in:
parent
44086e5817
commit
b273a9901b
3 changed files with 7 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ MODULE ulmTypes;
|
||||||
CONST
|
CONST
|
||||||
bigEndian* = 0; (* SPARC, M68K etc *)
|
bigEndian* = 0; (* SPARC, M68K etc *)
|
||||||
littleEndian* = 1; (* Intel 80x86, VAX etc *)
|
littleEndian* = 1; (* Intel 80x86, VAX etc *)
|
||||||
byteorder* = littleEndian; (* machine-dependent constant *)
|
byteorder* = bigEndian; (* machine-dependent constant *)
|
||||||
TYPE
|
TYPE
|
||||||
ByteOrder* = SHORTINT; (* bigEndian or littleEndian *)
|
ByteOrder* = SHORTINT; (* bigEndian or littleEndian *)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,8 @@ MODULE Reals;
|
||||||
PROCEDURE ExpoL*(x: LONGREAL): INTEGER;
|
PROCEDURE ExpoL*(x: LONGREAL): INTEGER;
|
||||||
VAR h: LONGINT;
|
VAR h: LONGINT;
|
||||||
BEGIN
|
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)
|
RETURN SHORT(ASH(h, -20) MOD 2048)
|
||||||
END ExpoL;
|
END ExpoL;
|
||||||
|
|
||||||
|
|
@ -52,9 +53,11 @@ MODULE Reals;
|
||||||
CONST expo = {1..11};
|
CONST expo = {1..11};
|
||||||
VAR h: SET;
|
VAR h: SET;
|
||||||
BEGIN
|
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));
|
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;
|
END SetExpoL;
|
||||||
|
|
||||||
PROCEDURE Convert*(x: REAL; n: INTEGER; VAR d: ARRAY OF CHAR);
|
PROCEDURE Convert*(x: REAL; n: INTEGER; VAR d: ARRAY OF CHAR);
|
||||||
|
|
|
||||||
BIN
vocstatic.linux.gnuc.powerpc
Executable file
BIN
vocstatic.linux.gnuc.powerpc
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue