From ca2cc52a44c27bb8c050715c16c66ef8c38faddf Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 24 Aug 2016 14:10:06 +0100 Subject: [PATCH 1/3] Port updated tests and binary snapping, with corrected Reals code, from tidy branch. --- .gitignore | 4 +- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Console.c | 2 +- bootstrap/unix-44/Console.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 2 +- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 2 +- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 2 +- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 2 +- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 2 +- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 2 +- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 2 +- bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 61 +++--- bootstrap/unix-44/Reals.h | 5 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 2 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/Vishap.c | 2 +- bootstrap/unix-44/errors.c | 2 +- bootstrap/unix-44/errors.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-44/vt100.c | 2 +- bootstrap/unix-44/vt100.h | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Console.c | 2 +- bootstrap/unix-48/Console.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 2 +- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 2 +- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 2 +- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 2 +- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 2 +- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 2 +- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 2 +- bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 61 +++--- bootstrap/unix-48/Reals.h | 5 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 2 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/Vishap.c | 2 +- bootstrap/unix-48/errors.c | 2 +- bootstrap/unix-48/errors.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-48/vt100.c | 2 +- bootstrap/unix-48/vt100.h | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Console.c | 2 +- bootstrap/unix-88/Console.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 2 +- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 2 +- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 2 +- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 2 +- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 2 +- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 2 +- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 2 +- bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 61 +++--- bootstrap/unix-88/Reals.h | 5 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 2 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/Vishap.c | 2 +- bootstrap/unix-88/errors.c | 2 +- bootstrap/unix-88/errors.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/unix-88/vt100.c | 2 +- bootstrap/unix-88/vt100.h | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Console.c | 2 +- bootstrap/windows-48/Console.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 2 +- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 2 +- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 2 +- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 2 +- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 2 +- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 2 +- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 2 +- bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 61 +++--- bootstrap/windows-48/Reals.h | 5 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 2 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/Vishap.c | 2 +- bootstrap/windows-48/errors.c | 2 +- bootstrap/windows-48/errors.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-48/vt100.c | 2 +- bootstrap/windows-48/vt100.h | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Console.c | 2 +- bootstrap/windows-88/Console.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 2 +- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 2 +- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 2 +- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 2 +- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 2 +- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 2 +- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 2 +- bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 61 +++--- bootstrap/windows-88/Reals.h | 5 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 2 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/Vishap.c | 2 +- bootstrap/windows-88/errors.c | 2 +- bootstrap/windows-88/errors.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- bootstrap/windows-88/vt100.c | 2 +- bootstrap/windows-88/vt100.h | 2 +- src/library/ooc/oocLowReal.Mod | 202 ++++++++++-------- src/library/v4/Reals.Mod | 114 ++++++---- .../arrayassignment/old.cygwin.ILP32.gcc.s | 2 +- src/test/confidence/arrayassignment/test.sh | 2 +- .../confidence/hello/old.cygwin.ILP32.gcc.s | 2 +- src/test/confidence/hello/test.sh | 2 +- src/test/confidence/intsyntax/IntSyntax.mod | 18 ++ src/test/confidence/intsyntax/expected | 15 ++ src/test/confidence/intsyntax/test.sh | 5 + src/test/confidence/language/TestLanguage.mod | 42 +++- .../language/old.cygwin.ILP32.gcc.s | 55 +++++ src/test/confidence/language/test.sh | 2 +- src/test/confidence/library/TestLibrary.mod | 99 +++++++++ src/test/confidence/library/expected | 26 +++ src/test/confidence/library/test.sh | 6 + .../confidence/lola/old.cygwin.ILP32.gcc.s | 2 +- src/test/confidence/lola/test.sh | 2 +- src/test/confidence/planned-binary-change | 0 .../confidence/signal/old.cygwin.ILP32.gcc.s | 2 +- src/test/confidence/signal/test.sh | 2 +- src/test/confidence/testresult.sh | 8 +- src/test/confidence/texts/expected | 4 + src/test/confidence/texts/test.sh | 5 + src/test/confidence/texts/testTexts.mod | 41 ++++ src/tools/make/vishap.make | 127 ++++++----- 221 files changed, 949 insertions(+), 550 deletions(-) create mode 100644 src/test/confidence/intsyntax/IntSyntax.mod create mode 100644 src/test/confidence/intsyntax/expected create mode 100644 src/test/confidence/intsyntax/test.sh create mode 100644 src/test/confidence/library/TestLibrary.mod create mode 100644 src/test/confidence/library/expected create mode 100644 src/test/confidence/library/test.sh create mode 100644 src/test/confidence/planned-binary-change create mode 100644 src/test/confidence/texts/expected create mode 100644 src/test/confidence/texts/test.sh create mode 100644 src/test/confidence/texts/testTexts.mod diff --git a/.gitignore b/.gitignore index 3f69b59d..0e401127 100644 --- a/.gitignore +++ b/.gitignore @@ -16,9 +16,11 @@ /src/test/**/*.sym /src/test/**/*.stackdump /src/test/confidence/**/result +/src/test/confidence/**/*.asm +/src/test/confidence/**/*.s /.DS_store **/.DS_store **/*.dSYM **/.tmp.* /*.pdb -/*.ilk \ No newline at end of file +/*.ilk diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index c4a99497..1f5afbb7 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/24] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 9ccb175b..eef3a15d 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Console.c b/bootstrap/unix-44/Console.c index 529459d3..5fa65e00 100644 --- a/bootstrap/unix-44/Console.c +++ b/bootstrap/unix-44/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-44/Console.h b/bootstrap/unix-44/Console.h index fe4dd1e8..53dbdfa8 100644 --- a/bootstrap/unix-44/Console.h +++ b/bootstrap/unix-44/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index 564d7975..5d92e963 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 2539b65b..b60e6242 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 2cb7c777..4cabf8c6 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 7e1bfa5e..38e549be 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 94c48dac..d5164a2a 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index 10f4d96d..5e27b653 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index ea10b5d7..d834a9e8 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 4a0aad65..4c37f01f 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 58a32122..417337c0 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 90b9b2b9..52ed8dab 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 8016a6bb..8e5add20 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index fc3808a8..db46c598 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index d6930745..ffe3dff2 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 00534e5c..40e2def4 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index 3be820a5..efed04c6 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 3cd6b899..dae6e457 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index e91a1a68..8c943c20 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 0035ead1..45816124 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index 96f02b38..23bff9c0 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index a4f208c5..0de9e6cc 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 2baa87e7..3cce2026 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 7bc6a7f9..581da770 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index 1ebd0438..0f1c3a92 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,15 +1,17 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); export void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); export void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); export INTEGER Reals_Expo (REAL x); export INTEGER Reals_ExpoL (LONGREAL x); +export void Reals_SetExpo (REAL *x, INTEGER ex); export REAL Reals_Ten (INTEGER e); export LONGREAL Reals_TenL (INTEGER e); static CHAR Reals_ToHex (INTEGER i); @@ -55,17 +57,27 @@ LONGREAL Reals_TenL (INTEGER e) INTEGER Reals_Expo (REAL x) { INTEGER _o_result; - _o_result = (int)__MASK(__ASHR((LONGINT)(__VAL(INTEGER, x)), 23), -256); + INTEGER i; + __GET((LONGINT)(uintptr_t)&x + 2, i, INTEGER); + _o_result = __MASK(__ASHR(i, 7), -256); return _o_result; } +void Reals_SetExpo (REAL *x, INTEGER ex) +{ + CHAR c; + __GET((LONGINT)(uintptr_t)x + 3, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 3, (CHAR)(__ASHL(__ASHR((int)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __GET((LONGINT)(uintptr_t)x + 2, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 2, (CHAR)(__MASK((int)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); +} + INTEGER Reals_ExpoL (LONGREAL x) { INTEGER _o_result; INTEGER i; - LONGINT l; - __GET((LONGINT)(uintptr_t)&x + 4, l, LONGINT); - _o_result = (int)__MASK(__ASHR(l, 20), -2048); + __GET((LONGINT)(uintptr_t)&x + 6, i, INTEGER); + _o_result = __MASK(__ASHR(i, 4), -2048); return _o_result; } @@ -115,34 +127,29 @@ static CHAR Reals_ToHex (INTEGER i) __RETCHK; } -typedef - CHAR (*pc4__3)[4]; - -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) { - pc4__3 p = NIL; INTEGER i; - p = (pc4__3)(uintptr_t)((LONGINT)(uintptr_t)&y); + LONGINT l; + CHAR by; i = 0; - while (i < 4) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(4)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(4)))], -16)); + l = b__len; + while ((LONGINT)i < l) { + by = __VAL(CHAR, b[__X(i, b__len)]); + d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)by, 4)); + d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)by, -16)); + i += 1; } } -typedef - CHAR (*pc8__5)[8]; - -void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) { - pc8__5 p = NIL; - INTEGER i; - p = (pc8__5)(uintptr_t)((LONGINT)(uintptr_t)&y); - i = 0; - while (i < 8) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(8)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(8)))], -16)); - } + Reals_BytesToHex((void*)&y, ((LONGINT)(4)), (void*)d, d__len * ((LONGINT)(1))); +} + +void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +{ + Reals_BytesToHex((void*)&x, ((LONGINT)(8)), (void*)d, d__len * ((LONGINT)(1))); } diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index ae81f6e7..4a783296 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h @@ -10,10 +10,11 @@ import void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); import void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); import INTEGER Reals_Expo (REAL x); import INTEGER Reals_ExpoL (LONGREAL x); +import void Reals_SetExpo (REAL *x, INTEGER ex); import REAL Reals_Ten (INTEGER e); import LONGREAL Reals_TenL (INTEGER e); import void *Reals__init(void); diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 6ecc5e7b..d2713d0f 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index ee20ae49..5f45d8a8 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index a985d2fc..0e6ee85e 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 454de29e..c8abf16a 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/Vishap.c b/bootstrap/unix-44/Vishap.c index 4660166b..74d0e984 100644 --- a/bootstrap/unix-44/Vishap.c +++ b/bootstrap/unix-44/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-44/errors.c b/bootstrap/unix-44/errors.c index 0122b025..f8ddb53a 100644 --- a/bootstrap/unix-44/errors.c +++ b/bootstrap/unix-44/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-44/errors.h b/bootstrap/unix-44/errors.h index 94835309..5068083b 100644 --- a/bootstrap/unix-44/errors.h +++ b/bootstrap/unix-44/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index e53881fe..03bd540b 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index e393ad88..695ea164 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-44/vt100.c b/bootstrap/unix-44/vt100.c index f905ffc7..c499aceb 100644 --- a/bootstrap/unix-44/vt100.c +++ b/bootstrap/unix-44/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-44/vt100.h b/bootstrap/unix-44/vt100.h index 2af72bac..1aaeca77 100644 --- a/bootstrap/unix-44/vt100.h +++ b/bootstrap/unix-44/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index c4a99497..1f5afbb7 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/24] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 9ccb175b..eef3a15d 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Console.c b/bootstrap/unix-48/Console.c index 529459d3..5fa65e00 100644 --- a/bootstrap/unix-48/Console.c +++ b/bootstrap/unix-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-48/Console.h b/bootstrap/unix-48/Console.h index fe4dd1e8..53dbdfa8 100644 --- a/bootstrap/unix-48/Console.h +++ b/bootstrap/unix-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index 564d7975..5d92e963 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 2539b65b..b60e6242 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 2cb7c777..4cabf8c6 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 7e1bfa5e..38e549be 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 94c48dac..d5164a2a 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index 10f4d96d..5e27b653 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index ea10b5d7..d834a9e8 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 4a0aad65..4c37f01f 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 58a32122..417337c0 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 90b9b2b9..52ed8dab 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 8016a6bb..8e5add20 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index fc3808a8..db46c598 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index d6930745..ffe3dff2 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 00534e5c..40e2def4 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index 3be820a5..efed04c6 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 3cd6b899..dae6e457 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index e91a1a68..8c943c20 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 0035ead1..45816124 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index 96f02b38..23bff9c0 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index a4f208c5..0de9e6cc 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 2baa87e7..3cce2026 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 7bc6a7f9..581da770 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index 1ebd0438..0f1c3a92 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,15 +1,17 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); export void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); export void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); export INTEGER Reals_Expo (REAL x); export INTEGER Reals_ExpoL (LONGREAL x); +export void Reals_SetExpo (REAL *x, INTEGER ex); export REAL Reals_Ten (INTEGER e); export LONGREAL Reals_TenL (INTEGER e); static CHAR Reals_ToHex (INTEGER i); @@ -55,17 +57,27 @@ LONGREAL Reals_TenL (INTEGER e) INTEGER Reals_Expo (REAL x) { INTEGER _o_result; - _o_result = (int)__MASK(__ASHR((LONGINT)(__VAL(INTEGER, x)), 23), -256); + INTEGER i; + __GET((LONGINT)(uintptr_t)&x + 2, i, INTEGER); + _o_result = __MASK(__ASHR(i, 7), -256); return _o_result; } +void Reals_SetExpo (REAL *x, INTEGER ex) +{ + CHAR c; + __GET((LONGINT)(uintptr_t)x + 3, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 3, (CHAR)(__ASHL(__ASHR((int)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __GET((LONGINT)(uintptr_t)x + 2, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 2, (CHAR)(__MASK((int)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); +} + INTEGER Reals_ExpoL (LONGREAL x) { INTEGER _o_result; INTEGER i; - LONGINT l; - __GET((LONGINT)(uintptr_t)&x + 4, l, LONGINT); - _o_result = (int)__MASK(__ASHR(l, 20), -2048); + __GET((LONGINT)(uintptr_t)&x + 6, i, INTEGER); + _o_result = __MASK(__ASHR(i, 4), -2048); return _o_result; } @@ -115,34 +127,29 @@ static CHAR Reals_ToHex (INTEGER i) __RETCHK; } -typedef - CHAR (*pc4__3)[4]; - -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) { - pc4__3 p = NIL; INTEGER i; - p = (pc4__3)(uintptr_t)((LONGINT)(uintptr_t)&y); + LONGINT l; + CHAR by; i = 0; - while (i < 4) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(4)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(4)))], -16)); + l = b__len; + while ((LONGINT)i < l) { + by = __VAL(CHAR, b[__X(i, b__len)]); + d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)by, 4)); + d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)by, -16)); + i += 1; } } -typedef - CHAR (*pc8__5)[8]; - -void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) { - pc8__5 p = NIL; - INTEGER i; - p = (pc8__5)(uintptr_t)((LONGINT)(uintptr_t)&y); - i = 0; - while (i < 8) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(8)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(8)))], -16)); - } + Reals_BytesToHex((void*)&y, ((LONGINT)(4)), (void*)d, d__len * ((LONGINT)(1))); +} + +void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +{ + Reals_BytesToHex((void*)&x, ((LONGINT)(8)), (void*)d, d__len * ((LONGINT)(1))); } diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index ae81f6e7..4a783296 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h @@ -10,10 +10,11 @@ import void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); import void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); import INTEGER Reals_Expo (REAL x); import INTEGER Reals_ExpoL (LONGREAL x); +import void Reals_SetExpo (REAL *x, INTEGER ex); import REAL Reals_Ten (INTEGER e); import LONGREAL Reals_TenL (INTEGER e); import void *Reals__init(void); diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 6ecc5e7b..d2713d0f 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index ee20ae49..5f45d8a8 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index 43955368..2dab1e0f 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 928de612..189403c9 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/Vishap.c b/bootstrap/unix-48/Vishap.c index 4660166b..74d0e984 100644 --- a/bootstrap/unix-48/Vishap.c +++ b/bootstrap/unix-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/unix-48/errors.c b/bootstrap/unix-48/errors.c index 0122b025..f8ddb53a 100644 --- a/bootstrap/unix-48/errors.c +++ b/bootstrap/unix-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/unix-48/errors.h b/bootstrap/unix-48/errors.h index 94835309..5068083b 100644 --- a/bootstrap/unix-48/errors.h +++ b/bootstrap/unix-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index e53881fe..03bd540b 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index e393ad88..695ea164 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/vt100.c b/bootstrap/unix-48/vt100.c index f905ffc7..c499aceb 100644 --- a/bootstrap/unix-48/vt100.c +++ b/bootstrap/unix-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/unix-48/vt100.h b/bootstrap/unix-48/vt100.h index 2af72bac..1aaeca77 100644 --- a/bootstrap/unix-48/vt100.h +++ b/bootstrap/unix-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index ab2d4040..951bea6e 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/24] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 932a72f5..15594379 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Console.c b/bootstrap/unix-88/Console.c index 1c91edd0..29555980 100644 --- a/bootstrap/unix-88/Console.c +++ b/bootstrap/unix-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/unix-88/Console.h b/bootstrap/unix-88/Console.h index 341bc4cb..11152de0 100644 --- a/bootstrap/unix-88/Console.h +++ b/bootstrap/unix-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index 818b1445..be91d89c 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index fac2b753..6dcba157 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 2fef0b01..69ba4ffb 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index c284f0f3..40db2aca 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index db12f96d..eaf370c4 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index b2fdac26..d273cf1a 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index 9192e087..2fccfe61 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 644f8330..48c946c5 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index 181da1e9..40697da9 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index 671e1325..58679d74 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 73f7ab23..40d53974 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 031a726d..2e93dfcf 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index 9854e906..9ce53b1f 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 3fc22ca6..372c5f88 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 55314019..8276ecf9 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index ee049f54..8f1581bb 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index ce5819e4..7f03064b 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 463ce607..7e03d42c 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 0100f58d..c86ba15e 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 2d3f7cd4..eeb89a76 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index e42fe8ef..842c232d 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 570192bf..bdb39b1d 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 5c8f8117..0fb9a236 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,16 +1,18 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); export void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); export void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); export INTEGER Reals_Expo (REAL x); export INTEGER Reals_ExpoL (LONGREAL x); +export void Reals_SetExpo (REAL *x, INTEGER ex); export REAL Reals_Ten (INTEGER e); export LONGREAL Reals_TenL (INTEGER e); static CHAR Reals_ToHex (INTEGER i); @@ -56,17 +58,27 @@ LONGREAL Reals_TenL (INTEGER e) INTEGER Reals_Expo (REAL x) { INTEGER _o_result; - _o_result = (int)__MASK(__ASHR((LONGINT)(__VAL(INTEGER, x)), 23), -256); + INTEGER i; + __GET((LONGINT)(uintptr_t)&x + 2, i, INTEGER); + _o_result = __MASK(__ASHR(i, 7), -256); return _o_result; } +void Reals_SetExpo (REAL *x, INTEGER ex) +{ + CHAR c; + __GET((LONGINT)(uintptr_t)x + 3, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 3, (CHAR)(__ASHL(__ASHR((int)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __GET((LONGINT)(uintptr_t)x + 2, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 2, (CHAR)(__MASK((int)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); +} + INTEGER Reals_ExpoL (LONGREAL x) { INTEGER _o_result; INTEGER i; - LONGINT l; - __GET((LONGINT)(uintptr_t)&x + 4, i, INTEGER); - _o_result = (int)__MASK(__ASHR((LONGINT)i, 20), -2048); + __GET((LONGINT)(uintptr_t)&x + 6, i, INTEGER); + _o_result = __MASK(__ASHR(i, 4), -2048); return _o_result; } @@ -103,34 +115,29 @@ static CHAR Reals_ToHex (INTEGER i) __RETCHK; } -typedef - CHAR (*pc4__3)[4]; - -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) { - pc4__3 p = NIL; INTEGER i; - p = (pc4__3)(uintptr_t)((LONGINT)(uintptr_t)&y); + LONGINT l; + CHAR by; i = 0; - while (i < 4) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(4)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(4)))], -16)); + l = b__len; + while ((LONGINT)i < l) { + by = __VAL(CHAR, b[__X(i, b__len)]); + d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)by, 4)); + d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)by, -16)); + i += 1; } } -typedef - CHAR (*pc8__5)[8]; - -void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) { - pc8__5 p = NIL; - INTEGER i; - p = (pc8__5)(uintptr_t)((LONGINT)(uintptr_t)&y); - i = 0; - while (i < 8) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(8)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(8)))], -16)); - } + Reals_BytesToHex((void*)&y, ((LONGINT)(4)), (void*)d, d__len * ((LONGINT)(1))); +} + +void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +{ + Reals_BytesToHex((void*)&x, ((LONGINT)(8)), (void*)d, d__len * ((LONGINT)(1))); } diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index 813b3ef5..db522698 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h @@ -11,10 +11,11 @@ import void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); import void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); import INTEGER Reals_Expo (REAL x); import INTEGER Reals_ExpoL (LONGREAL x); +import void Reals_SetExpo (REAL *x, INTEGER ex); import REAL Reals_Ten (INTEGER e); import LONGREAL Reals_TenL (INTEGER e); import void *Reals__init(void); diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index 46e8b812..962b86a0 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 56dacf40..549337ee 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 056a0391..fe673ac8 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 2e2be576..dcee9f40 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/Vishap.c b/bootstrap/unix-88/Vishap.c index 9f66b328..ccb3e59e 100644 --- a/bootstrap/unix-88/Vishap.c +++ b/bootstrap/unix-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/errors.c b/bootstrap/unix-88/errors.c index d6ba2eeb..9b9ec275 100644 --- a/bootstrap/unix-88/errors.c +++ b/bootstrap/unix-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/unix-88/errors.h b/bootstrap/unix-88/errors.h index 847af188..fdf34cf1 100644 --- a/bootstrap/unix-88/errors.h +++ b/bootstrap/unix-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index a9de34cf..521538ae 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 84ae119b..de353aeb 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/vt100.c b/bootstrap/unix-88/vt100.c index 2a02ae93..1b8568fe 100644 --- a/bootstrap/unix-88/vt100.c +++ b/bootstrap/unix-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/unix-88/vt100.h b/bootstrap/unix-88/vt100.h index 365596ac..2d276238 100644 --- a/bootstrap/unix-88/vt100.h +++ b/bootstrap/unix-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index c4a99497..1f5afbb7 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" @@ -13,6 +13,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/24] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 9ccb175b..eef3a15d 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Console.c b/bootstrap/windows-48/Console.c index 676f93c7..b1cc9707 100644 --- a/bootstrap/windows-48/Console.c +++ b/bootstrap/windows-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-48/Console.h b/bootstrap/windows-48/Console.h index fe4dd1e8..53dbdfa8 100644 --- a/bootstrap/windows-48/Console.h +++ b/bootstrap/windows-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index f15a9971..49be5f7c 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index 49ae3db6..10a35cd2 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 2cb7c777..4cabf8c6 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #include "SYSTEM.h" struct Heap__1 { diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 7e1bfa5e..38e549be 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 94c48dac..d5164a2a 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Heap.h" diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index 10f4d96d..5e27b653 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index ea10b5d7..d834a9e8 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 4a0aad65..4c37f01f 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 58a32122..417337c0 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 90b9b2b9..52ed8dab 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 8016a6bb..8e5add20 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index fc3808a8..db46c598 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index d6930745..ffe3dff2 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPB.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 00534e5c..40e2def4 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index 3be820a5..efed04c6 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 3cd6b899..dae6e457 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index e91a1a68..8c943c20 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPM.h" #include "OPS.h" diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 0035ead1..45816124 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index 96f02b38..23bff9c0 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "OPC.h" #include "OPM.h" diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index a4f208c5..0de9e6cc 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 5b709627..78bdbf70 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index 96919602..aecbb66c 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index 1ebd0438..0f1c3a92 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,15 +1,17 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); export void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); export void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); export INTEGER Reals_Expo (REAL x); export INTEGER Reals_ExpoL (LONGREAL x); +export void Reals_SetExpo (REAL *x, INTEGER ex); export REAL Reals_Ten (INTEGER e); export LONGREAL Reals_TenL (INTEGER e); static CHAR Reals_ToHex (INTEGER i); @@ -55,17 +57,27 @@ LONGREAL Reals_TenL (INTEGER e) INTEGER Reals_Expo (REAL x) { INTEGER _o_result; - _o_result = (int)__MASK(__ASHR((LONGINT)(__VAL(INTEGER, x)), 23), -256); + INTEGER i; + __GET((LONGINT)(uintptr_t)&x + 2, i, INTEGER); + _o_result = __MASK(__ASHR(i, 7), -256); return _o_result; } +void Reals_SetExpo (REAL *x, INTEGER ex) +{ + CHAR c; + __GET((LONGINT)(uintptr_t)x + 3, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 3, (CHAR)(__ASHL(__ASHR((int)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __GET((LONGINT)(uintptr_t)x + 2, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 2, (CHAR)(__MASK((int)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); +} + INTEGER Reals_ExpoL (LONGREAL x) { INTEGER _o_result; INTEGER i; - LONGINT l; - __GET((LONGINT)(uintptr_t)&x + 4, l, LONGINT); - _o_result = (int)__MASK(__ASHR(l, 20), -2048); + __GET((LONGINT)(uintptr_t)&x + 6, i, INTEGER); + _o_result = __MASK(__ASHR(i, 4), -2048); return _o_result; } @@ -115,34 +127,29 @@ static CHAR Reals_ToHex (INTEGER i) __RETCHK; } -typedef - CHAR (*pc4__3)[4]; - -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) { - pc4__3 p = NIL; INTEGER i; - p = (pc4__3)(uintptr_t)((LONGINT)(uintptr_t)&y); + LONGINT l; + CHAR by; i = 0; - while (i < 4) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(4)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(4)))], -16)); + l = b__len; + while ((LONGINT)i < l) { + by = __VAL(CHAR, b[__X(i, b__len)]); + d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)by, 4)); + d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)by, -16)); + i += 1; } } -typedef - CHAR (*pc8__5)[8]; - -void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) { - pc8__5 p = NIL; - INTEGER i; - p = (pc8__5)(uintptr_t)((LONGINT)(uintptr_t)&y); - i = 0; - while (i < 8) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(8)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(8)))], -16)); - } + Reals_BytesToHex((void*)&y, ((LONGINT)(4)), (void*)d, d__len * ((LONGINT)(1))); +} + +void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +{ + Reals_BytesToHex((void*)&x, ((LONGINT)(8)), (void*)d, d__len * ((LONGINT)(1))); } diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index ae81f6e7..4a783296 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h @@ -10,10 +10,11 @@ import void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); import void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); import INTEGER Reals_Expo (REAL x); import INTEGER Reals_ExpoL (LONGREAL x); +import void Reals_SetExpo (REAL *x, INTEGER ex); import REAL Reals_Ten (INTEGER e); import LONGREAL Reals_TenL (INTEGER e); import void *Reals__init(void); diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 6ecc5e7b..d2713d0f 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index ee20ae49..5f45d8a8 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index 43955368..2dab1e0f 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Files.h" #include "Modules.h" diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 928de612..189403c9 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/Vishap.c b/bootstrap/windows-48/Vishap.c index 4660166b..74d0e984 100644 --- a/bootstrap/windows-48/Vishap.c +++ b/bootstrap/windows-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkamSf */ #include "SYSTEM.h" #include "Configuration.h" #include "Heap.h" diff --git a/bootstrap/windows-48/errors.c b/bootstrap/windows-48/errors.c index 0122b025..f8ddb53a 100644 --- a/bootstrap/windows-48/errors.c +++ b/bootstrap/windows-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" typedef diff --git a/bootstrap/windows-48/errors.h b/bootstrap/windows-48/errors.h index 94835309..5068083b 100644 --- a/bootstrap/windows-48/errors.h +++ b/bootstrap/windows-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index e53881fe..03bd540b 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Configuration.h" #include "Console.h" diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index e393ad88..695ea164 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/vt100.c b/bootstrap/windows-48/vt100.c index f905ffc7..c499aceb 100644 --- a/bootstrap/windows-48/vt100.c +++ b/bootstrap/windows-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #include "SYSTEM.h" #include "Console.h" #include "Strings.h" diff --git a/bootstrap/windows-48/vt100.h b/bootstrap/windows-48/vt100.h index 2af72bac..1aaeca77 100644 --- a/bootstrap/windows-48/vt100.h +++ b/bootstrap/windows-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index ab2d4040..951bea6e 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" @@ -14,6 +14,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/07/22] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/08/24] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 932a72f5..15594379 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Console.c b/bootstrap/windows-88/Console.c index 622da4c3..0e1c708d 100644 --- a/bootstrap/windows-88/Console.c +++ b/bootstrap/windows-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Platform.h" diff --git a/bootstrap/windows-88/Console.h b/bootstrap/windows-88/Console.h index 341bc4cb..11152de0 100644 --- a/bootstrap/windows-88/Console.h +++ b/bootstrap/windows-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index 2106bb31..b9b748e0 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 5cea8802..da7d6e44 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 2fef0b01..69ba4ffb 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index c284f0f3..40db2aca 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index db12f96d..eaf370c4 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index b2fdac26..d273cf1a 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index 9192e087..2fccfe61 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 644f8330..48c946c5 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index 181da1e9..40697da9 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index 671e1325..58679d74 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 73f7ab23..40d53974 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 031a726d..2e93dfcf 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index 9854e906..9ce53b1f 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPB.h" diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 3fc22ca6..372c5f88 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 55314019..8276ecf9 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index ee049f54..8f1581bb 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index ce5819e4..7f03064b 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPM.h" diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 463ce607..7e03d42c 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 0100f58d..c86ba15e 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "OPC.h" diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 2d3f7cd4..eeb89a76 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index 4c3cb5f0..ec8fb7a9 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 4458ef75..179bd3c3 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 5c8f8117..0fb9a236 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,16 +1,18 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len); export void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); export void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -export void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +export void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); export void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); export INTEGER Reals_Expo (REAL x); export INTEGER Reals_ExpoL (LONGREAL x); +export void Reals_SetExpo (REAL *x, INTEGER ex); export REAL Reals_Ten (INTEGER e); export LONGREAL Reals_TenL (INTEGER e); static CHAR Reals_ToHex (INTEGER i); @@ -56,17 +58,27 @@ LONGREAL Reals_TenL (INTEGER e) INTEGER Reals_Expo (REAL x) { INTEGER _o_result; - _o_result = (int)__MASK(__ASHR((LONGINT)(__VAL(INTEGER, x)), 23), -256); + INTEGER i; + __GET((LONGINT)(uintptr_t)&x + 2, i, INTEGER); + _o_result = __MASK(__ASHR(i, 7), -256); return _o_result; } +void Reals_SetExpo (REAL *x, INTEGER ex) +{ + CHAR c; + __GET((LONGINT)(uintptr_t)x + 3, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 3, (CHAR)(__ASHL(__ASHR((int)c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR); + __GET((LONGINT)(uintptr_t)x + 2, c, CHAR); + __PUT((LONGINT)(uintptr_t)x + 2, (CHAR)(__MASK((int)c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR); +} + INTEGER Reals_ExpoL (LONGREAL x) { INTEGER _o_result; INTEGER i; - LONGINT l; - __GET((LONGINT)(uintptr_t)&x + 4, i, INTEGER); - _o_result = (int)__MASK(__ASHR((LONGINT)i, 20), -2048); + __GET((LONGINT)(uintptr_t)&x + 6, i, INTEGER); + _o_result = __MASK(__ASHR(i, 4), -2048); return _o_result; } @@ -103,34 +115,29 @@ static CHAR Reals_ToHex (INTEGER i) __RETCHK; } -typedef - CHAR (*pc4__3)[4]; - -void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) +static void Reals_BytesToHex (SYSTEM_BYTE *b, LONGINT b__len, SYSTEM_BYTE *d, LONGINT d__len) { - pc4__3 p = NIL; INTEGER i; - p = (pc4__3)(uintptr_t)((LONGINT)(uintptr_t)&y); + LONGINT l; + CHAR by; i = 0; - while (i < 4) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(4)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(4)))], -16)); + l = b__len; + while ((LONGINT)i < l) { + by = __VAL(CHAR, b[__X(i, b__len)]); + d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)by, 4)); + d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)by, -16)); + i += 1; } } -typedef - CHAR (*pc8__5)[8]; - -void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len) +void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len) { - pc8__5 p = NIL; - INTEGER i; - p = (pc8__5)(uintptr_t)((LONGINT)(uintptr_t)&y); - i = 0; - while (i < 8) { - d[__X(__ASHL(i, 1), d__len)] = Reals_ToHex(__ASHR((int)(*p)[__X(i, ((LONGINT)(8)))], 4)); - d[__X(__ASHL(i, 1) + 1, d__len)] = Reals_ToHex(__MASK((int)(*p)[__X(i, ((LONGINT)(8)))], -16)); - } + Reals_BytesToHex((void*)&y, ((LONGINT)(4)), (void*)d, d__len * ((LONGINT)(1))); +} + +void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len) +{ + Reals_BytesToHex((void*)&x, ((LONGINT)(8)), (void*)d, d__len * ((LONGINT)(1))); } diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index 813b3ef5..db522698 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h @@ -11,10 +11,11 @@ import void Reals_Convert (REAL x, INTEGER n, CHAR *d, LONGINT d__len); import void Reals_ConvertH (REAL y, CHAR *d, LONGINT d__len); -import void Reals_ConvertHL (LONGREAL y, CHAR *d, LONGINT d__len); +import void Reals_ConvertHL (LONGREAL x, CHAR *d, LONGINT d__len); import void Reals_ConvertL (LONGREAL x, INTEGER n, CHAR *d, LONGINT d__len); import INTEGER Reals_Expo (REAL x); import INTEGER Reals_ExpoL (LONGREAL x); +import void Reals_SetExpo (REAL *x, INTEGER ex); import REAL Reals_Ten (INTEGER e); import LONGREAL Reals_TenL (INTEGER e); import void *Reals__init(void); diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index 46e8b812..962b86a0 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 56dacf40..549337ee 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 056a0391..fe673ac8 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Files.h" diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 2e2be576..dcee9f40 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/Vishap.c b/bootstrap/windows-88/Vishap.c index 9f66b328..ccb3e59e 100644 --- a/bootstrap/windows-88/Vishap.c +++ b/bootstrap/windows-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkamSf */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/errors.c b/bootstrap/windows-88/errors.c index d6ba2eeb..9b9ec275 100644 --- a/bootstrap/windows-88/errors.c +++ b/bootstrap/windows-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" diff --git a/bootstrap/windows-88/errors.h b/bootstrap/windows-88/errors.h index 847af188..fdf34cf1 100644 --- a/bootstrap/windows-88/errors.h +++ b/bootstrap/windows-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index a9de34cf..521538ae 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Configuration.h" diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 84ae119b..de353aeb 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/vt100.c b/bootstrap/windows-88/vt100.c index 2a02ae93..1b8568fe 100644 --- a/bootstrap/windows-88/vt100.c +++ b/bootstrap/windows-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #define LARGE #include "SYSTEM.h" #include "Console.h" diff --git a/bootstrap/windows-88/vt100.h b/bootstrap/windows-88/vt100.h index 365596ac..2d276238 100644 --- a/bootstrap/windows-88/vt100.h +++ b/bootstrap/windows-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/07/22] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/08/24] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/src/library/ooc/oocLowReal.Mod b/src/library/ooc/oocLowReal.Mod index 33859dcc..83ae8e32 100644 --- a/src/library/ooc/oocLowReal.Mod +++ b/src/library/ooc/oocLowReal.Mod @@ -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 xresult . ../testresult.sh diff --git a/src/test/confidence/hello/old.cygwin.ILP32.gcc.s b/src/test/confidence/hello/old.cygwin.ILP32.gcc.s index 618e26e5..ab9053fa 100644 --- a/src/test/confidence/hello/old.cygwin.ILP32.gcc.s +++ b/src/test/confidence/hello/old.cygwin.ILP32.gcc.s @@ -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) diff --git a/src/test/confidence/hello/test.sh b/src/test/confidence/hello/test.sh index 4ebe71c3..e49e2b2a 100755 --- a/src/test/confidence/hello/test.sh +++ b/src/test/confidence/hello/test.sh @@ -1,5 +1,5 @@ #!/bin/sh . ../testenv.sh -voc hello.mod -m +$OBECOMP hello.mod -m ./hello >result . ../testresult.sh diff --git a/src/test/confidence/intsyntax/IntSyntax.mod b/src/test/confidence/intsyntax/IntSyntax.mod new file mode 100644 index 00000000..c5ac799c --- /dev/null +++ b/src/test/confidence/intsyntax/IntSyntax.mod @@ -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. \ No newline at end of file diff --git a/src/test/confidence/intsyntax/expected b/src/test/confidence/intsyntax/expected new file mode 100644 index 00000000..82813b89 --- /dev/null +++ b/src/test/confidence/intsyntax/expected @@ -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. diff --git a/src/test/confidence/intsyntax/test.sh b/src/test/confidence/intsyntax/test.sh new file mode 100644 index 00000000..7699daea --- /dev/null +++ b/src/test/confidence/intsyntax/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh +. ../testenv.sh +# Generate mixed source and assembly code listing +$OBECOMP IntSyntax.mod -m >result +. ../testresult.sh diff --git a/src/test/confidence/language/TestLanguage.mod b/src/test/confidence/language/TestLanguage.mod index 11aa3f5d..d3653c0b 100644 --- a/src/test/confidence/language/TestLanguage.mod +++ b/src/test/confidence/language/TestLanguage.mod @@ -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. diff --git a/src/test/confidence/language/old.cygwin.ILP32.gcc.s b/src/test/confidence/language/old.cygwin.ILP32.gcc.s index 9a4499d2..4e35c971 100644 --- a/src/test/confidence/language/old.cygwin.ILP32.gcc.s +++ b/src/test/confidence/language/old.cygwin.ILP32.gcc.s @@ -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) diff --git a/src/test/confidence/language/test.sh b/src/test/confidence/language/test.sh index 217e6c49..82f3efbf 100755 --- a/src/test/confidence/language/test.sh +++ b/src/test/confidence/language/test.sh @@ -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 diff --git a/src/test/confidence/library/TestLibrary.mod b/src/test/confidence/library/TestLibrary.mod new file mode 100644 index 00000000..32f7c91b --- /dev/null +++ b/src/test/confidence/library/TestLibrary.mod @@ -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. \ No newline at end of file diff --git a/src/test/confidence/library/expected b/src/test/confidence/library/expected new file mode 100644 index 00000000..3e361735 --- /dev/null +++ b/src/test/confidence/library/expected @@ -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. diff --git a/src/test/confidence/library/test.sh b/src/test/confidence/library/test.sh new file mode 100644 index 00000000..e59c074c --- /dev/null +++ b/src/test/confidence/library/test.sh @@ -0,0 +1,6 @@ +#!/bin/sh +. ../testenv.sh +# Generate mixed source and assembly code listing +$OBECOMP TestLibrary.mod -m +./TestLibrary >result +. ../testresult.sh diff --git a/src/test/confidence/lola/old.cygwin.ILP32.gcc.s b/src/test/confidence/lola/old.cygwin.ILP32.gcc.s index bd2a8780..601c26da 100644 --- a/src/test/confidence/lola/old.cygwin.ILP32.gcc.s +++ b/src/test/confidence/lola/old.cygwin.ILP32.gcc.s @@ -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 diff --git a/src/test/confidence/lola/test.sh b/src/test/confidence/lola/test.sh index 523dd7bb..315d6d8e 100755 --- a/src/test/confidence/lola/test.sh +++ b/src/test/confidence/lola/test.sh @@ -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 diff --git a/src/test/confidence/planned-binary-change b/src/test/confidence/planned-binary-change new file mode 100644 index 00000000..e69de29b diff --git a/src/test/confidence/signal/old.cygwin.ILP32.gcc.s b/src/test/confidence/signal/old.cygwin.ILP32.gcc.s index 6d7de14d..d9de6f01 100644 --- a/src/test/confidence/signal/old.cygwin.ILP32.gcc.s +++ b/src/test/confidence/signal/old.cygwin.ILP32.gcc.s @@ -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) diff --git a/src/test/confidence/signal/test.sh b/src/test/confidence/signal/test.sh index 8e507edc..fadc1879 100755 --- a/src/test/confidence/signal/test.sh +++ b/src/test/confidence/signal/test.sh @@ -1,6 +1,6 @@ #!/bin/sh . ../testenv.sh -voc signal.mod -m +$OBECOMP signal.mod -m ./SignalTest x & sleep 1 kill -2 $! diff --git a/src/test/confidence/testresult.sh b/src/test/confidence/testresult.sh index a827345f..eb7e485b 100755 --- a/src/test/confidence/testresult.sh +++ b/src/test/confidence/testresult.sh @@ -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 diff --git a/src/test/confidence/texts/expected b/src/test/confidence/texts/expected new file mode 100644 index 00000000..96ea4526 --- /dev/null +++ b/src/test/confidence/texts/expected @@ -0,0 +1,4 @@ +aaa + -3.1E+02 +-311.141504 + -3.1D+002 diff --git a/src/test/confidence/texts/test.sh b/src/test/confidence/texts/test.sh new file mode 100644 index 00000000..6a798eee --- /dev/null +++ b/src/test/confidence/texts/test.sh @@ -0,0 +1,5 @@ +#!/bin/sh +. ../testenv.sh +$OBECOMP testTexts.mod -m +./testTexts >result +. ../testresult.sh diff --git a/src/test/confidence/texts/testTexts.mod b/src/test/confidence/texts/testTexts.mod new file mode 100644 index 00000000..cc2484d1 --- /dev/null +++ b/src/test/confidence/texts/testTexts.mod @@ -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. diff --git a/src/tools/make/vishap.make b/src/tools/make/vishap.make index 62d90166..17bb1b95 100644 --- a/src/tools/make/vishap.make +++ b/src/tools/make/vishap.make @@ -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" From 3a7b742ea78c9344f96be53cf50f86b3d0077656 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 24 Aug 2016 16:26:43 +0100 Subject: [PATCH 2/3] Update binary test process. --- src/test/confidence/testresult.sh | 2 +- src/tools/make/buildall.pl | 4 ++-- src/tools/make/postpush.pl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/confidence/testresult.sh b/src/test/confidence/testresult.sh index eb7e485b..b4c7bd19 100755 --- a/src/test/confidence/testresult.sh +++ b/src/test/confidence/testresult.sh @@ -9,7 +9,7 @@ fi 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.$BRANCH.s - if [ -f old.$FLAVOUR.$BRANCH.s -a old.$FLAVOUR.$BRANCH -nt ../planned-binary-change ] + if [ -f old.$FLAVOUR.$BRANCH.s -a old.$FLAVOUR.$BRANCH.s -nt ../planned-binary-change ] then if diff -b old.$FLAVOUR.$BRANCH.s new.$FLAVOUR.$BRANCH.s then echo "--- Generated code unchanged ---" diff --git a/src/tools/make/buildall.pl b/src/tools/make/buildall.pl index 3363bbc4..01f262c2 100755 --- a/src/tools/make/buildall.pl +++ b/src/tools/make/buildall.pl @@ -14,7 +14,7 @@ my %machines = ( "wind" => ['-p5932 dave@wax', "", "vishaps/voc", "export CC=gcc && make full;" . "export CC=i686-w64-mingw32-gcc && make full;" . "cd ~;" - . "sh start64.sh \\\"cd vishaps/voc && git checkout $branch && git pull;" + . "sh start64.sh \\\"cd vishaps/voc && git pull && git checkout $branch && git pull;" . "export CC=gcc && make full;" . "export CC=x86_64-w64-mingw32-gcc && make full\\\""], "android" => ['-p8022 root@and', "", "vishap/voc", "export CC=gcc && make full"], @@ -55,7 +55,7 @@ unlink glob "log/*"; for my $machine (sort keys %machines) { my ($login, $sudo, $dir, $mkcmd) = @{$machines{$machine}}; - my $cmd = "ssh $login \"cd $dir && $sudo git checkout $branch && $sudo git pull && $sudo $mkcmd\" "; + my $cmd = "ssh $login \"cd $dir && $sudo git pull && $sudo git checkout -f $branch && $sudo git pull && $sudo $mkcmd\" "; logged($cmd, $machine); } diff --git a/src/tools/make/postpush.pl b/src/tools/make/postpush.pl index a65fbb86..fe9e62ad 100755 --- a/src/tools/make/postpush.pl +++ b/src/tools/make/postpush.pl @@ -43,7 +43,7 @@ if ($buildneeded) { } else { close(STDIN); close(STDOUT); close(STDERR); # child process system 'echo Syncing voc>postpush.log'; - system '(cd voc; git pull; git checkout ' . $branch . ') >>postpush.log'; + system '(cd voc; git pull; git checkout -f ' . $branch . '; git pull; git checkout -f) >>postpush.log'; exec 'perl voc/src/tools/make/buildall.pl ' . $branch . ' >/tmp/buildall.log'; exit; } From 1f41d80b1efaf5c181588dbc6a944d14b8cd641c Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 24 Aug 2016 18:45:52 +0100 Subject: [PATCH 3/3] Resnap test binaries with improved buinary extraction. --- src/test/confidence/planned-binary-change | 1 + src/test/confidence/testresult.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/confidence/planned-binary-change b/src/test/confidence/planned-binary-change index e69de29b..78981922 100644 --- a/src/test/confidence/planned-binary-change +++ b/src/test/confidence/planned-binary-change @@ -0,0 +1 @@ +a diff --git a/src/test/confidence/testresult.sh b/src/test/confidence/testresult.sh index b4c7bd19..bdfcccfe 100755 --- a/src/test/confidence/testresult.sh +++ b/src/test/confidence/testresult.sh @@ -7,7 +7,8 @@ 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.$BRANCH.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 +then sed -n '/^ *[0-9]\+ \([0-9a-f]\{4\}\| \) [0-9A-F]\{2\}[0-9A-F ]\{6\}/s/^ *[0-9]\+ ....//p' new.asm>new.$FLAVOUR.$BRANCH.s if [ -f old.$FLAVOUR.$BRANCH.s -a old.$FLAVOUR.$BRANCH.s -nt ../planned-binary-change ] then