Remove test/common_knight/*native files and switch knight-native to M2libc

This commit is contained in:
Jeremiah Orians 2021-02-03 19:47:18 -05:00
parent ba1fc44f29
commit a65619dbf4
No known key found for this signature in database
GPG Key ID: 6B3A3F198708F894
29 changed files with 141 additions and 630 deletions

2
M2libc

@ -1 +1 @@
Subproject commit cb870984babf6ea27f556715599b1cf995d27fda
Subproject commit 259f067f55a0095e4416eaee7314fe98f7f07175

View File

@ -1,25 +0,0 @@
/* Copyright (C) 2016 Jeremiah Orians
* This file is part of M2-Planet.
*
* M2-Planet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* M2-Planet 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
*/
// CONSTANT EXIT_FAILURE 1
// CONSTANT EXIT_SUCCESS 0
void exit(int value)
{
/* Hardware doesn't have return codes */
asm("HALT");
}

View File

@ -1,84 +0,0 @@
/* Copyright (C) 2016 Jeremiah Orians
* This file is part of M2-Planet.
*
* M2-Planet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* M2-Planet 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
*/
// CONSTANT stdin 0x1100
// CONSTANT stdout 0x1101
// CONSTANT stderr 0
// CONSTANT EOF 0xFFFFFFFF
int match(char* a, char* b);
int fgetc(FILE* f)
{
asm("LOAD R1 R14 0"
"FGETC");
}
void fputc(char s, FILE* f)
{
asm("LOAD R0 R14 0"
"LOAD R1 R14 4"
"FPUTC");
}
FILE* open_read(int filename)
{
asm("LOAD R0 R14 0"
"FOPEN_READ");
}
FILE* open_write(int filename)
{
asm("LOAD R0 R14 0"
"FOPEN_WRITE");
}
int fclose(FILE* stream)
{
asm("LOAD R0 R14 0"
"FCLOSE");
}
FILE* fopen(char* filename, char* mode)
{
FILE* f;
int fd = 0;
if(match(filename, "STDIN") || match(filename, "tape_01"))
{
fd = 0x1100;
}
else if(match(filename, "STDOUT") || match(filename, "tape_02"))
{
fd = 0x1101;
}
if('w' == mode[0])
{ /* 577 is O_WRONLY|O_CREAT|O_TRUNC, 384 is 600 in octal */
f = open_write(fd);
}
else
{ /* Everything else is a read */
f = open_read(fd);
}
/* Negative numbers are error codes */
if(0 > f)
{
return 0;
}
return f;
}

View File

@ -1,23 +0,0 @@
/* Copyright (C) 2016 Jeremiah Orians
* This file is part of M2-Planet.
*
* M2-Planet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* M2-Planet 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
*/
int getchar()
{
/* tape1 is 0x1100 */
asm("LOADUI R1 0x1100"
"FGETC");
}

View File

@ -1,24 +0,0 @@
/* Copyright (C) 2016 Jeremiah Orians
* This file is part of M2-Planet.
*
* M2-Planet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* M2-Planet 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
*/
void putchar(int c)
{
/* Console is 0 */
asm("LOAD R0 R14 0"
"LOADUI R1 0"
"FPUTC");
}

View File

@ -1,24 +0,0 @@
/* Copyright (C) 2016 Jeremiah Orians
* This file is part of M2-Planet.
*
* M2-Planet is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* M2-Planet 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
*/
void putchar(int c)
{
/* tape2 is 0x1101 */
asm("LOAD R0 R14 0"
"LOADUI R1 0x1101"
"FPUTC");
}

View File

@ -1,259 +0,0 @@
## Copyright (C) 2016 Jeremiah Orians
## This file is part of stage0.
##
## stage0 is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## stage0 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 General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with stage0. If not, see <http://www.gnu.org/licenses/>.
#Registers
DEFINE R0 0
DEFINE R1 1
DEFINE R2 2
DEFINE R3 3
DEFINE R4 4
DEFINE R5 5
DEFINE R6 6
DEFINE R7 7
DEFINE R8 8
DEFINE R9 9
DEFINE R10 A
DEFINE R11 B
DEFINE R12 C
DEFINE R13 D
DEFINE R14 E
DEFINE R15 F
# 4OP Integer Group
DEFINE ADD.CI 0100
DEFINE ADD.CO 0101
DEFINE ADD.CIO 0102
DEFINE ADDU.CI 0103
DEFINE ADDU.CO 0104
DEFINE ADDU.CIO 0105
DEFINE SUB.BI 0106
DEFINE SUB.BO 0107
DEFINE SUB.BIO 0108
DEFINE SUBU.BI 0109
DEFINE SUBU.BO 010A
DEFINE SUBU.BIO 010B
DEFINE MULTIPLY 010C
DEFINE MULTIPLYU 010D
DEFINE DIVIDE 010E
DEFINE DIVIDEU 010F
DEFINE MUX 0110
DEFINE NMUX 0111
DEFINE SORT 0112
DEFINE SORTU 0113
# 3OP Integer Group
DEFINE ADD 05000
DEFINE ADDU 05001
DEFINE SUB 05002
DEFINE SUBU 05003
DEFINE CMP 05004
DEFINE CMPU 05005
DEFINE MUL 05006
DEFINE MULH 05007
DEFINE MULU 05008
DEFINE MULUH 05009
DEFINE DIV 0500A
DEFINE MOD 0500B
DEFINE DIVU 0500C
DEFINE MODU 0500D
DEFINE MAX 05010
DEFINE MAXU 05011
DEFINE MIN 05012
DEFINE MINU 05013
DEFINE AND 05020
DEFINE OR 05021
DEFINE XOR 05022
DEFINE NAND 05023
DEFINE NOR 05024
DEFINE XNOR 05025
DEFINE MPQ 05026
DEFINE LPQ 05027
DEFINE CPQ 05028
DEFINE BPQ 05029
DEFINE SAL 05030
DEFINE SAR 05031
DEFINE SL0 05032
DEFINE SR0 05033
DEFINE SL1 05034
DEFINE SR1 05035
DEFINE ROL 05036
DEFINE ROR 05037
DEFINE LOADX 05038
DEFINE LOADX8 05039
DEFINE LOADXU8 0503A
DEFINE LOADX16 0503B
DEFINE LOADXU16 0503C
DEFINE LOADX32 0503D
DEFINE LOADXU32 0503E
DEFINE STOREX 05048
DEFINE STOREX8 05049
DEFINE STOREX16 0504A
DEFINE STOREX32 0504B
DEFINE CMPJUMP.G 05050
DEFINE CMPJUMP.GE 05051
DEFINE CMPJUMP.E 05052
DEFINE CMPJUMP.NE 05053
DEFINE CMPJUMP.LE 05054
DEFINE CMPJUMP.L 05055
DEFINE CMPJUMPU.G 05060
DEFINE CMPJUMPU.GE 05061
DEFINE CMPJUMPU.LE 05064
DEFINE CMPJUMPU.L 05065
# 2OP Integer Group
DEFINE NEG 090000
DEFINE ABS 090001
DEFINE NABS 090002
DEFINE SWAP 090003
DEFINE COPY 090004
DEFINE MOVE 090005
DEFINE NOT 090006
DEFINE BRANCH 090100
DEFINE CALL 090101
DEFINE PUSHR 090200
DEFINE PUSH8 090201
DEFINE PUSH16 090202
DEFINE PUSH32 090203
DEFINE POPR 090280
DEFINE POP8 090281
DEFINE POPU8 090282
DEFINE POP16 090283
DEFINE POPU16 090284
DEFINE POP32 090285
DEFINE POPU32 090286
DEFINE CMPSKIP.G 090300
DEFINE CMPSKIP.GE 090301
DEFINE CMPSKIP.E 090302
DEFINE CMPSKIP.NE 090303
DEFINE CMPSKIP.LE 090304
DEFINE CMPSKIP.L 090305
DEFINE CMPSKIPU.G 090380
DEFINE CMPSKIPU.GE 090381
DEFINE CMPSKIPU.LE 090384
DEFINE CMPSKIPU.L 090385
# 1OP Group
DEFINE READPC 0D00000
DEFINE READSCID 0D00001
DEFINE FALSE 0D00002
DEFINE TRUE 0D00003
DEFINE JSR_COROUTINE 0D01000
DEFINE RET 0D01001
DEFINE PUSHPC 0D02000
DEFINE POPPC 0D02001
# 2OPI Group
DEFINE SET.G E10000
DEFINE SET.GE E10001
DEFINE SET.E E10002
DEFINE SET.NE E10003
DEFINE SET.LE E10004
DEFINE SET.L E10005
DEFINE ADDI E1000E
DEFINE ADDUI E1000F
DEFINE SUBI E10010
DEFINE SUBUI E10011
DEFINE CMPI E10012
DEFINE LOAD E10013
DEFINE LOAD8 E10014
DEFINE LOADU8 E10015
DEFINE LOAD16 E10016
DEFINE LOADU16 E10017
DEFINE LOAD32 E10018
DEFINE LOADU32 E10019
DEFINE CMPUI E1001F
DEFINE STORE E10020
DEFINE STORE8 E10021
DEFINE STORE16 E10022
DEFINE STORE32 E10023
DEFINE ANDI E100B0
DEFINE ORI E100B1
DEFINE XORI E100B2
DEFINE NANDI E100B3
DEFINE NORI E100B4
DEFINE XNORI E100B5
DEFINE CMPJUMPI.G E100C0
DEFINE CMPJUMPI.GE E100C1
DEFINE CMPJUMPI.E E100C2
DEFINE CMPJUMPI.NE E100C3
DEFINE CMPJUMPI.LE E100C4
DEFINE CMPJUMPI.L E100C5
DEFINE CMPJUMPUI.G E100D0
DEFINE CMPJUMPUI.GE E100D1
DEFINE CMPJUMPUI.LE E100D4
DEFINE CMPJUMPUI.L E100D5
# 1OPI Group
DEFINE JUMP.C E0002C0
DEFINE JUMP.B E0002C1
DEFINE JUMP.O E0002C2
DEFINE JUMP.G E0002C3
DEFINE JUMP.GE E0002C4
DEFINE JUMP.E E0002C5
DEFINE JUMP.NE E0002C6
DEFINE JUMP.LE E0002C7
DEFINE JUMP.L E0002C8
DEFINE JUMP.Z E0002C9
DEFINE JUMP.NZ E0002CA
DEFINE JUMP.P E0002CB
DEFINE JUMP.NP E0002CC
DEFINE CALLI E0002D0
DEFINE LOADI E0002D1
DEFINE LOADUI E0002D2
DEFINE SALI E0002D3
DEFINE SARI E0002D4
DEFINE SL0I E0002D5
DEFINE SR0I E0002D6
DEFINE SL1I E0002D7
DEFINE SR1I E0002D8
DEFINE LOADR E0002E0
DEFINE LOADR8 E0002E1
DEFINE LOADRU8 E0002E2
DEFINE LOADR16 E0002E3
DEFINE LOADRU16 E0002E4
DEFINE LOADR32 E0002E5
DEFINE LOADRU32 E0002E6
DEFINE STORER E0002F0
DEFINE STORER8 E0002F1
DEFINE STORER16 E0002F2
DEFINE STORER32 E0002F3
DEFINE CMPSKIPI.G E000A00
DEFINE CMPSKIPI.GE E000A01
DEFINE CMPSKIPI.E E000A02
DEFINE CMPSKIPI.NE E000A03
DEFINE CMPSKIPI.LE E000A04
DEFINE CMPSKIPI.L E000A05
DEFINE CMPSKIPUI.G E000A10
DEFINE CMPSKIPUI.GE E000A11
DEFINE CMPSKIPUI.LE E000A14
DEFINE CMPSKIPUI.L E000A15
# 0OPI Group
DEFINE JUMP 3C00
# HALCODE Group
DEFINE FOPEN_READ 42100000
DEFINE FOPEN_WRITE 42100001
DEFINE FCLOSE 42100002
DEFINE REWIND 42100003
DEFINE FSEEK 42100004
DEFINE FGETC 42100100
DEFINE FPUTC 42100200
DEFINE HAL_MEM 42110000
# 0OP Group
DEFINE NULL 00000000
DEFINE HALT FFFFFFFF

View File

@ -1,34 +0,0 @@
## Copyright (C) 2016 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet 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 General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
:_start
;; Prep TAPE_02
LOADUI R0 0x1101
FOPEN_WRITE
;; Prep TAPE_01
LOADUI R0 0x1100
FOPEN_READ
LOADR32 R12 @HEAP ; Setup HEAP pointer
LOADUI R15 $STACK ; Setup initial stack pointer
COPY R14 R15 ; Setup initial base pointer
CALLI R15 @FUNCTION_main ; Go to main
HALT ; Exit to kernel
;; Our default heap pointer
:HEAP
'00100000'

View File

@ -1,38 +0,0 @@
## Copyright (C) 2016 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet 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 General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
:_start
LOADR32 R12 @HEAP ; Setup HEAP pointer
; Setup initial stack pointer
LOADR R15 4
JUMP 4
&STACK
; Setup initial base pointer
COPY R14 R15
; Perform the main loop
LOADR R0 4
JUMP 4
&FUNCTION_main
CALL R0 R15
HALT ; Exit to kernel
;; Our default heap pointer
:HEAP
'00100000'

View File

@ -1,85 +1,85 @@
deb80d26727f797c397b927938360f846eb982dc0722903cb07947737332c443 test/results/test0000-aarch64-binary
847326ee9a1bd6e9f0b8cc546218d0c9a97e8a021b366b1367cd595a63516d09 test/results/test0000-amd64-binary
8ee4ee96799a48b4b21e8511ae95866a4d18fe75ddf2796a0c5991e97aabaf82 test/results/test0000-armv7l-binary
0c93110e4cf2f8f69eb3a308162478e644ee63fd4881762161be5de50fbe9f06 test/results/test0000-knight-native-binary
b4dfdb3f7cef6571968fadd3e586a19226a546b3d470cafb8b7c556e1d2d3bfd test/results/test0000-knight-native-binary
4862ffbb8e6265bdbf3d5fd824f7b7581206a627f5e7fe83cf5b7f4b30b8ebd4 test/results/test0000-knight-posix-binary
69c060eae9ffb12992d89eb02f066c517c5acfd1d9f80152e279fccce7b77f6a test/results/test0000-x86-binary
a9f4f8e041eecc29536d0b877d134d30213d5775e235e8f3ac463f340842432e test/results/test0001-aarch64-binary
59eed61f835681183effabf49247892a99eded70711b31d5cd2829fff161e7bf test/results/test0001-amd64-binary
a1815ebef92f6e2006a442cadf76474c4bca4de6a772f1ff7ffb3f1a3a14259e test/results/test0001-armv7l-binary
bff3ae5a240cd319570ef0c81c499cea51c821bc1369456c23a4206e6072865e test/results/test0001-knight-native-binary
e7a97db5ad2156efa7189f6edf794ed91aca9381e9808c84217c3adbb5551a69 test/results/test0001-knight-native-binary
06ed95778bb59b47ac40cd3be2b44f7057c28b4983c96c9f633ff3c84b7f1d7f test/results/test0001-knight-posix-binary
1965f1923ca0139a2921dc7d8e148a9418032e7d9b5c624763a12a791168bea3 test/results/test0001-x86-binary
2cc32e960e701df78d34bcfe1dbe558d30d48881d4b499766032977369cae5f7 test/results/test0002-aarch64-binary
6ae517b54db3803b2e3208c1bb1d77ead87102b328f7f6fd829bdcc667ffdede test/results/test0002-amd64-binary
8b52eee6d9ebc3a8ec2cf1190ab0a45f7ca8d552971b7c3815cc754d8f93893b test/results/test0002-armv7l-binary
b177407a336c5fe8ed31fc4c2f6e6f9160da8c3b166a1b6875dff5f3d9966e7c test/results/test0002-knight-native-binary
6a3c51d8f2f4abc61d67ef3f8914939d71b7a5232cd9a5c223ef0a92506eaef2 test/results/test0002-knight-native-binary
2a74cd88a71560ffcd75bdcd1172e4d2c5c85fc4fb6a3f39a83cad549926c91c test/results/test0002-knight-posix-binary
c0b8d35d26a37094a49589b4bf8ff77d7ff7967b0aabd49e66ef90be5c4ef872 test/results/test0002-x86-binary
71ce004e52c903b0e3c36a05c9b5db830add4c7267e383cce95f86fb46c8d642 test/results/test0003-aarch64-binary
e4e20792ac1f164a50b918a45b481cc8d9bf0039453595dcf8c9059a40359809 test/results/test0003-amd64-binary
93378a2dcea5bd4ed2bb5f51893dad6434a420df8c49853c6c5f03c56701b7c4 test/results/test0003-armv7l-binary
5b64d3204ef384a664eb6d8ca665b48903f58b87409eec9571ff3d72384056eb test/results/test0003-knight-native-binary
acbd365c049dc5bf32bb5a35ee5879bbbcf6ca770452316ae9643ccbc8e4f5e1 test/results/test0003-knight-native-binary
8dba8cd939a647073e6e0651a743152cabdcfec8a900ca7fbbe70df33d2f81d5 test/results/test0003-knight-posix-binary
7eed8f5086c0598b2966973b0e1dfe27adaf00394614a0fcaba66512c5fffc91 test/results/test0003-x86-binary
f0888b779fb16e4b9b56ee2dbb8e51545adcdfd19852903001c06d48adc3df6e test/results/test0004-aarch64-binary
b9c2dd466a939a2c975ce39cc20f0e33b705eade57621181f0e31f12e89a4f9c test/results/test0004-amd64-binary
cff2e265d151bd2fa1713753543f78e2c9677470ffe220753660079a74025406 test/results/test0004-armv7l-binary
17faf6968c97f4fb9ec53c5ab506def33501ba1aa6d3518b8d747b869663007c test/results/test0004-knight-native-binary
31a2ef697bdb0c360b77772ce3e702377df0801dc0314b4c74dd522a1bdf5ef7 test/results/test0004-knight-native-binary
8d82721418ddd1ede82ff62cbcb2033188e19770a4ed32d3af6981605bee4ebc test/results/test0004-knight-posix-binary
0cc6f7b9d753a2734e789b35d8cba7e10f65f17fc126a2efef403a49bd1b739c test/results/test0004-x86-binary
4b40361fe6e936ffc2f8f0afe46ec5c0c66b4bb3b30f56c84e18036f8b063e5a test/results/test0005-aarch64-binary
ffc4a4da0880744053cba103abbde9fdd50bd5e298d0c8c51407d087b1b067dd test/results/test0005-amd64-binary
4d4d927953757473df56c7033996891acb5bae32510d92b5159e7aaf56c03d72 test/results/test0005-armv7l-binary
66f964f025449632862eb190e668210a63535ae9d8c0dabde38c84f08f97b80b test/results/test0005-knight-native-binary
716a96f2faff3a7d84758106814e529d5a761b6c2d8483880096b4968d7b9a08 test/results/test0005-knight-native-binary
0278a97a86caf2c6a0b88214471d4f7f30c6b9b9361070e0b778211f4855e6bf test/results/test0005-knight-posix-binary
74f63fbaafd2cd097fdbc10dd9e2919f35a7477042dd6f02a85a8f0cf330d199 test/results/test0005-x86-binary
283e2358d17fa6d6699d36e2dd16ae92825dec82dec6f515ed57a6e07c2ae126 test/results/test0006-aarch64-binary
8925bb06ef69c70aac7749162d683e8da200a64a7c8437dd1e46b5e98057efb5 test/results/test0006-amd64-binary
f8134ad470e5e044aef91ee72882111a750162b1b4ebdb8a4027e548126a1ea3 test/results/test0006-armv7l-binary
285e9916e79075d4a4b5cfc947cc5d27df44edc9ebe091fae1095efd3a39110f test/results/test0006-knight-native-binary
ae5acac98c9d5df0a7525d359cb7c817df1aa4b42c100e6783b43c9255a21ef4 test/results/test0006-knight-native-binary
4d90b082711dd7108e261d9acb353793e53e97b3c0bb00275d43a2bcb6ea34d0 test/results/test0006-knight-posix-binary
2fdab9370f3dca78c682f3334f393fb4a2d68c51f901006abe826b2b559cedab test/results/test0006-x86-binary
d65943dfce2047da4f2e6827ef484ab92f5369ee0d7d2e2d4a7e1c37b4dbaead test/results/test0007-aarch64-binary
cfa4382e0e3edd23ed8a292fa8e8630ac3ca90eb424e4fd241f3509705dd7943 test/results/test0007-amd64-binary
876a38b259618a2c30e681c3f8ed624d9fd2a2873cb1e70dc826c444a004d535 test/results/test0007-armv7l-binary
dc543f40901704ce9f352308c7759c8b581395f8683cfa248a03410dc3dc24bd test/results/test0007-knight-native-binary
66c431d5f9a7a9b4e97ec23f82966251420e1e3eb26d2c76baa691280238f295 test/results/test0007-knight-native-binary
fffb165db40690ad5528028cb46f124bf1dab16e616b78fa037becc4428ac200 test/results/test0007-knight-posix-binary
de50c7139b401b684d34d9365f62301dd168a3a0c97e7cf325d84b7c0ca0af74 test/results/test0007-x86-binary
92e05eff2ad5a0eb414c916573bf75fadbfcd758fe0ab7f85d65de7ab3973518 test/results/test0008-aarch64-binary
ab6c8c172b61d24374f1a387d1d02aadf3fab69c32f9d47c311928750725a2d4 test/results/test0008-amd64-binary
56765c0450f35869f2a7cfeab39b4e52b1a3a94f69c3ee52ad4bd42a1df3dfe8 test/results/test0008-armv7l-binary
b54dd7a53e4e7619e7fe1761b827cfdf0c24b2317084ec7c06a7403c5d51c651 test/results/test0008-knight-native-binary
3e2f040dddcf81d50023c9c1673fea23f98238de299577769237de80ca55e9b0 test/results/test0008-knight-native-binary
1d5a1d4f3197d1a0d6cc23fd681313fedfa450d402a1e1a25e47bacf5ee8241c test/results/test0008-knight-posix-binary
f741233af242dba7df5e1c199c0c2f51ead1df049d3bd872c52d81feaaccb6af test/results/test0008-x86-binary
51a2f9653a1658c02d5c6b9810293f722af4abe9576ad1eae5a501d7b47e9389 test/results/test0009-aarch64-binary
47cfa71149eda9ed06766a8f36d945e463380709d683afef648cd65741e2fa8f test/results/test0009-amd64-binary
b86182592a642cc2d5a1dafe0b46eaf8d444e19e20af5f0db5828c48fde1bcbd test/results/test0009-armv7l-binary
80583e4bd2c04eaec31d73dfd62ae3b65ff527e672eadef1a1d5a2deaf1ab84e test/results/test0009-knight-native-binary
6744f329d9d3eef88383364573597ffc9f3a5db4d91f112081cf4ec537a53636 test/results/test0009-knight-native-binary
a58141119dffc95a3906576b3cfec629374920886eaec5e7e8abc6f71ba0608e test/results/test0009-knight-posix-binary
17c4325c7553e03253d684f3ae8a48d1d62dd5db10af120b62d12d6eeb453a22 test/results/test0009-x86-binary
009327de3b432a3030339c9f9de5aca793fe8a194af6b483ce0d8133d3290a11 test/results/test0010-aarch64-binary
4694533fc4055a43b84e07912a5f8b9f7b49900e3904cd570fd186c51605726c test/results/test0010-amd64-binary
bd400ad4b047a5fd31605a2a426a9e2aad03e258bcbee769097d5b259fa57063 test/results/test0010-armv7l-binary
defb9b8b7f97b2b41907bbf2b2e5fd9fec2beaad2b391a673fe766a97094e912 test/results/test0010-knight-native-binary
95471b57bc34b76c303a9e613acda299c0dc7e4cfd576aaeeed88a0fd5bb9502 test/results/test0010-knight-native-binary
971fedf695f5dea6d9eded00ebaab3f8da03d135256116e5c2f62df90e86dac2 test/results/test0010-knight-posix-binary
b97d639f371d039040f79481ca146402225010dd777d32b2b1e06dbaccfc4464 test/results/test0010-x86-binary
044340db280b63f03a985140831d54d09a475d710c005db34d73d2e66e94a7de test/results/test0011-aarch64-binary
5af8a955ad11680ccede59f6639d1fdad649d6b93b317c2ee1a889adbc141c9e test/results/test0011-amd64-binary
9cde965000c91e9fa477a1431fe1c13f87e6ce108491b12ec13971c4cc69f3fe test/results/test0011-armv7l-binary
e9d4eb00cd8e5ca882f15d158c61f033e0f2587d3040913cd5ea2f07174bdf30 test/results/test0011-knight-native-binary
186c4f19a7e5fb6f99ecb8ad9cbab278eeb7788cfb08c095e4ea47ab0829ec68 test/results/test0011-knight-native-binary
bc1e35c469c3c5fe7abffe58cdff3b1d8f185522a9ef3a391183f69d27da18a5 test/results/test0011-knight-posix-binary
668b21d3eae0c0114e9dd406ab3f29d3977cd41a79bbe4bc806850048a6f2b34 test/results/test0011-x86-binary
4dd3f41982047925225f0cf1213ed1cdee3b31c48e9d741a64407ecf3c50624c test/results/test0012-aarch64-binary
b3c9ad056a805bd85c619551d7d8f91fe24f34b354272fdd25d5ea2d66fde610 test/results/test0012-amd64-binary
f09f1d4e8a0e59c3479c9582e3db52402b2492691381db5b19acde26ba25131d test/results/test0012-armv7l-binary
e3b8e624fcf532c703f01f50024e556fdae2b843b14360d579829a69282be15d test/results/test0012-knight-native-binary
2103991f0adbd1c5cb3c63ee43ba012ae6e561c21ff4019772567f749ce22695 test/results/test0012-knight-native-binary
d4bd9ec4d6f6b355d5908f717e929f67ac7973883f21003c7c283145bb36d16e test/results/test0012-knight-posix-binary
32d27b8ceaa4560e7846ff4bff5ba06d6dd9590bada5f9eebc740bbb38842a7f test/results/test0012-x86-binary
cda109377b4a0e5f7d6d3a6c6092c4821c5964ed2cecfc4848a415c5ebe3eba3 test/results/test0013-aarch64-binary
e748ba742bb5a3c0075d6662f0e89e0d9d42efd593419ad68bcd1d022b901ea6 test/results/test0013-amd64-binary
ad7d5f186f72937b3876b163825f298a17ea8ff88f6bb76a597c765cff482310 test/results/test0013-armv7l-binary
8ae4f182d3d79697e99b5c04437685c72bf83667618392a32884cc12a7d38e48 test/results/test0013-knight-native-binary
dcee03654b597835aedbbd401810c3b59c2dada234f47a070966517f4c455d1c test/results/test0013-knight-native-binary
8c5ce71c1c3d8ff753f814471182ec34da9c2f7a11b7faba0aa728698f54a08e test/results/test0013-knight-posix-binary
c9ebe7a943a278a38212533b8e8e09a3e39279274fff7bfcae7b9faa0a4a7a4b test/results/test0013-x86-binary
7bf2fb3a9bd3681c108543a62fee9c785abcb1cebe660ef925b2bd3d6efd1cf1 test/results/test0014-aarch64-binary
@ -100,13 +100,13 @@ a111c4c9b48eb773c72da1be72f04a37738eb23352b613862619c208157afd57 test/results/t
84c92cd47db29282b3f09dd22e2b7b8499adf23a105a9d50ac19a0f7902bf931 test/results/test0017-aarch64-binary
804d29fea80e21b04e2098c2866201d9f19e5757209488bb64382cb9205b12bb test/results/test0017-amd64-binary
754188c89fd8ca237eec1f8ec3cfdff48d2323fe20f994bfe20d1b67d60d5b46 test/results/test0017-armv7l-binary
8aef1d611095930c3bf681cf11f95289743cdab6e8f0737b38f572c492a9d36c test/results/test0017-knight-native-binary
2f5ebe06a67b5798e3a6edc97446a6a2cc71e19e2b0f6d6d9838227db317b32f test/results/test0017-knight-native-binary
2ad6f276f32de0d3a9158aa662cec44c36cc04c717cf9d9b03fc24c81e67e250 test/results/test0017-knight-posix-binary
4bec6725b35ac1295a843f5dc142cb8a48a1c14556855a075f3d878c48c0aa5d test/results/test0017-x86-binary
02f8a3631f1ec266de13fb233aa64ee486d43e11673e66f94b0e5a3f4aa73d2c test/results/test0018-aarch64-binary
a626c4961bb78e4c469c964516341684f783b928931cfeb9238b714401e7126d test/results/test0018-amd64-binary
c8917a882cf4eaf6c332ef35793aaf4a6a58ac075cb041ebc7e1290c3129cb58 test/results/test0018-armv7l-binary
f31fbd190e6dceda05b33a71692926845127f4f73eab08a143a17b5f2611e6e3 test/results/test0018-knight-native-binary
00bda76b7151fc541e5f99db677377cb3437c461a1986e4d0ded91ee9b092af7 test/results/test0018-knight-native-binary
4f794e6dae2c21dc9ebe611a4be616d5c67f30b110ad7b7b81c0a19717c39932 test/results/test0018-knight-posix-binary
1ccbc54c2a2a722107b7ba9d282d65c2d975541a33d615a5ddcf468281a29153 test/results/test0018-x86-binary
ad5266a63744471b352830bff2d65adcb77918feee3e90b8434f13865fb3a8c1 test/results/test0019-aarch64-binary
@ -117,7 +117,7 @@ adf4cd12871da97065261fda59fe62f024a0d831d4a3bc7a80c7c3b2ed54e172 test/results/t
52d849336725092ab929ab372326b795b5810d159adc81c5a667bc0ed6c9d353 test/results/test0020-aarch64-binary
5bf34266efdd7423733bc99a01c7e248110950e28dcc0cc768c189f286d6402a test/results/test0020-amd64-binary
1b0a548114f4e2d627049c5b64792701c8068bfdd33862af028374ab9f9cb3a1 test/results/test0020-armv7l-binary
f1795d82f5d39e5d2995882a627c74fa972bc749675d4a294732f9285a5ae3c2 test/results/test0020-knight-native-binary
bb45a1e65b34cdfb48e1de213853df8234942545fdaae5630c03e55540f25cff test/results/test0020-knight-native-binary
b7341a4196e4a66d563fdff36a0990544e011795554206828d4c15751a5fbd43 test/results/test0020-knight-posix-binary
5fcb0cd39e5ddb0d50a3a5187a555d1cdf4e45b382b9ea418dcd87044c772a13 test/results/test0020-x86-binary
de8c8105ec9eb9f3ca398e7efaba61a86c5022363ebe0a010502e667de0260c1 test/results/test0021-aarch64-binary
@ -138,7 +138,7 @@ f7f6efb36a7f68189c050b8f623a760c0113ad676a37a39dd745ad4c9ab79e67 test/results/t
deb80d26727f797c397b927938360f846eb982dc0722903cb07947737332c443 test/results/test0024-aarch64-binary
847326ee9a1bd6e9f0b8cc546218d0c9a97e8a021b366b1367cd595a63516d09 test/results/test0024-amd64-binary
8ee4ee96799a48b4b21e8511ae95866a4d18fe75ddf2796a0c5991e97aabaf82 test/results/test0024-armv7l-binary
0c93110e4cf2f8f69eb3a308162478e644ee63fd4881762161be5de50fbe9f06 test/results/test0024-knight-native-binary
b4dfdb3f7cef6571968fadd3e586a19226a546b3d470cafb8b7c556e1d2d3bfd test/results/test0024-knight-native-binary
4862ffbb8e6265bdbf3d5fd824f7b7581206a627f5e7fe83cf5b7f4b30b8ebd4 test/results/test0024-knight-posix-binary
69c060eae9ffb12992d89eb02f066c517c5acfd1d9f80152e279fccce7b77f6a test/results/test0024-x86-binary
97e576b2c8c111ce352006674f1f8d41633bc1568f301a45b651935d20034fb9 test/results/test0025-aarch64-binary
@ -176,7 +176,7 @@ b69ea75698be9265c2c9bd6be748a893dc289acd10f64999230fc392010d9a87 test/results/t
ca9fdf7c6720b7aff8a37a60608b89bb4a6941aa323c7038e0bcbb01af9a568d test/results/test0106-aarch64-binary
447d78cd2526ef97cdf02f72bc2f492765f7c076c598cf3dbd3e8dd4507740b7 test/results/test0106-amd64-binary
ba2e2e1bbe66fea15d5984678175229fcb0adc6faa394be2cfde8bea1d3026de test/results/test0106-armv7l-binary
698853b79efb30865a663c4863c050639eb21c7400008f7840830503928973d4 test/results/test0106-knight-native-binary
5afa9027627815aed92b0f239f4ac85318ca11c15c0c44ae0a0b9bc4ca599119 test/results/test0106-knight-native-binary
44d0b9e0433f12b5567ecddc9285b6a7d41ea646a7134e6fc3c394b4a973f6ba test/results/test0106-knight-posix-binary
1f83e1cbac44aabd9f87eae601e020b584b572e7edb738d6274972d6d100fa3c test/results/test0106-x86-binary
f2fdafa1f4697d505f4e6b0305149e4a41fb50bae7024b420559ef8b42c5813a test/results/test1000-aarch64-binary

View File

@ -30,8 +30,8 @@ bin/M2-Planet \
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native.M1 \
-f ${TMPDIR}/return.M1 \
--big-endian \
--architecture knight-native \

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0001/library_call.c \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/library_call.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0001-knight-native-binary )
out=$(vm --rom ./test/results/test0001-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 3
[ "$out" = "Hello mes" ] || exit 4
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0002/if.c \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/if.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0002-knight-native-binary )
out=$(vm --rom ./test/results/test0002-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "Hello mes" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0003/constant.c \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/constant.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0003-knight-native-binary )
out=$(vm --rom ./test/results/test0003-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "Hello mes" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0004/call.c \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/call.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0004-knight-native-binary )
out=$(vm --rom ./test/results/test0004-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "Hello mes" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0005/string.c \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/string.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0005-knight-native-binary )
out=$(vm --rom ./test/results/test0005-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "Hello mes" ] || exit 5
fi

View File

@ -24,15 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0006/for.c \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/for.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0006-knight-native-binary --tty-out test/test0006/proof || exit 4
vm --rom ./test/results/test0006-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0006/proof --memory 2M || exit 4
out=$(sha256_check test/test0006/proof.answer)
[ "$out" = "test/test0006/proof: OK" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0007/do.c \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/do.M1 \
--big-endian \
--architecture knight-native \
@ -54,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0007-knight-native-binary --tty-out test/test0007/proof || exit 4
vm --rom ./test/results/test0007-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0007/proof --memory 2M || exit 4
out=$(sha256_check test/test0007/proof.answer)
[ "$out" = "test/test0007/proof: OK" ] || exit 5
fi

View File

@ -24,18 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/common_knight/functions/malloc.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/struct.M1 \
--big-endian \
--architecture knight-native \
@ -55,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0008-knight-native-binary --memory 2M)
out=$(vm --rom ./test/results/test0008-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "35419896642975313541989657891634" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0009/goto.c \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/goto.M1 \
--big-endian \
--architecture knight-native \
@ -53,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0009-knight-native-binary)
out=$(vm --rom ./test/results/test0009-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "Hello mes" ] || exit 5
fi

View File

@ -24,18 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/common_knight/functions/malloc.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--big-endian \
--architecture knight-native \
@ -55,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0010-knight-native-binary --memory 2M)
out=$(vm --rom ./test/results/test0010-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "35419896642975313541989657891634" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0011/break-do.c \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/break-do.M1 \
--big-endian \
--architecture knight-native \
@ -54,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0011-knight-native-binary --tty-out test/test0011/proof || exit 4
vm --rom ./test/results/test0011-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0011/proof --memory 2M || exit 4
out=$(sha256_check test/test0011/proof.answer)
[ "$out" = "test/test0011/proof: OK" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0012/break-for.c \
-o ${TMPDIR}/break-for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/break-for.M1 \
--big-endian \
--architecture knight-native \
@ -54,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0012-knight-native-binary --tty-out test/test0012/proof || exit 4
vm --rom ./test/results/test0012-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0012/proof --memory 2M || exit 4
out=$(sha256_check test/test0012/proof.answer)
[ "$out" = "test/test0012/proof: OK" ] || exit 5
fi

View File

@ -24,16 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0013/break-while.c \
-o ${TMPDIR}/break-while.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/break-while.M1 \
--big-endian \
--architecture knight-native \
@ -54,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0013-knight-native-binary --tty-out test/test0013/proof || exit 4
vm --rom ./test/results/test0013-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0013/proof --memory 2M || exit 4
out=$(sha256_check test/test0013/proof.answer)
[ "$out" = "test/test0013/proof: OK" ] || exit 5
fi

View File

@ -24,18 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/malloc.c \
-f functions/calloc.c \
-f test/common_knight/functions/putchar-native.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0017/memset.c \
--bootstrap-mode \
-o ${TMPDIR}/memset.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/memset.M1 \
--big-endian \
--architecture knight-native \
@ -56,7 +56,7 @@ if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
. ./sha256.sh
# Verify that the resulting file works
vm --rom ./test/results/test0017-knight-native-binary --tty-out test/test0017/proof --memory 2M || exit 4
vm --rom ./test/results/test0017-knight-native-binary --tape_01 /dev/stdin --tape_02 test/test0017/proof --memory 2M || exit 4
out=$(sha256_check test/test0017/proof.answer)
[ "$out" = "test/test0017/proof: OK" ] || exit 5
fi

View File

@ -24,19 +24,19 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/file-native.c \
-f test/common_knight/functions/malloc.c \
-f functions/calloc.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f functions/match.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o ${TMPDIR}/math.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native-file.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/math.M1 \
--big-endian \
--architecture knight-native \

View File

@ -24,18 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/common_knight/functions/malloc.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0020/struct.c \
--bootstrap-mode \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/struct.M1 \
--big-endian \
--architecture knight-native \
@ -55,7 +55,7 @@ hex2 \
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight-native" ]
then
# Verify that the compiled program returns the correct result
out=$(vm --rom ./test/results/test0020-knight-native-binary --memory 2M)
out=$(vm --rom ./test/results/test0020-knight-native-binary --tape_01 /dev/stdin --tape_02 /dev/stdout --memory 2M)
[ 0 = $? ] || exit 4
[ "$out" = "35419896642975313541989657891634" ] || exit 5
fi

View File

@ -30,8 +30,8 @@ bin/M2-Planet \
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native.M1 \
-f ${TMPDIR}/return.M1 \
--big-endian \
--architecture knight-native \

View File

@ -24,19 +24,18 @@ mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-tape2.c \
-f test/common_knight/functions/getchar-tape1.c \
-f test/common_knight/functions/exit-native.c \
-f test/common_knight/functions/malloc.c \
-f M2libc/knight/Native/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/knight/Native/fcntl.h \
-f M2libc/stdio.c \
-f test/test0106/cc500.c \
--bootstrap-mode \
-o ${TMPDIR}/cc0.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native-file.M1 \
-f M2libc/knight/knight-native_defs.M1 \
-f M2libc/knight/libc-native-file.M1 \
-f ${TMPDIR}/cc0.M1 \
--big-endian \
--architecture knight-native \