mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +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
|
||||
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 *)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
BIN
vocstatic.linux.gnuc.powerpc
Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue