First generation implemention of typedef

This commit is contained in:
Jeremiah Orians 2021-01-02 22:00:02 -05:00
parent 358b6cfb96
commit 921cc86ce6
No known key found for this signature in database
GPG Key ID: 6B3A3F198708F894
86 changed files with 177 additions and 41 deletions

6
cc.c
View File

@ -31,6 +31,7 @@ int numerate_string(char *a);
int main(int argc, char** argv)
{
MAX_STRING = 4096;
BOOTSTRAP_MODE = FALSE;
int DEBUG = FALSE;
FILE* in = stdin;
FILE* destination_file = stdout;
@ -102,6 +103,11 @@ int main(int argc, char** argv)
require(0 < MAX_STRING, "Not a valid string size\nAbort and fix your --max-string\n");
i = i + 2;
}
else if(match(argv[i], "--bootstrap-mode"))
{
BOOTSTRAP_MODE = TRUE;
i = i + 1;
}
else if(match(argv[i], "-g") || match(argv[i], "--debug"))
{
DEBUG = TRUE;

2
cc.h
View File

@ -39,7 +39,7 @@
#define AARCH64 5
char* copy_string(char* target, char* source);
void copy_string(char* target, char* source, int max);
int in_set(int c, char* s);
int match(char* a, char* b);
void file_print(char* s, FILE* f);

View File

@ -47,6 +47,8 @@ int escape_lookup(char* c);
int numerate_string(char *a);
void require(int bool, char* error);
struct token_list* reverse_list(struct token_list* head);
struct type* mirror_type(struct type* source, char* name);
struct type* add_primitive(struct type* a);
/* Host touchy function will need custom on 64bit systems*/
int fixup_int32(int a);
@ -1831,6 +1833,16 @@ new_type:
global_token = global_token->next->next;
}
}
else if(match("typedef", global_token->s))
{
/* typedef $TYPE $NAME; */
global_token = global_token->next;
type_size = type_name();
type_size = mirror_type(type_size, global_token->s);
add_primitive(type_size);
global_token = global_token->next;
require_match("ERROR in typedef statement\nMissing ;\n", ";");
}
else
{
type_size = type_name();

View File

@ -38,3 +38,6 @@ int register_size;
int MAX_STRING;
struct type* integer;
/* enable bootstrap-mode */
int BOOTSTRAP_MODE;

View File

@ -41,3 +41,6 @@ extern int MAX_STRING;
/* make default type integer */
extern struct type* integer;
/* enable bootstrap-mode */
extern int BOOTSTRAP_MODE;

View File

@ -171,7 +171,7 @@ reset:
/* More efficiently allocate memory for string */
current->s = calloc(string_index + 2, sizeof(char));
require(NULL != current->s, "Exhusted memory while trying to copy a token\n");
copy_string(current->s, hold_string);
copy_string(current->s, hold_string, MAX_STRING);
current->prev = token;
current->next = token;

View File

@ -127,7 +127,7 @@ collect_regular_string_reset:
hold_string[string_index + 1] = '\n';
char* message = calloc(string_index + 3, sizeof(char));
require(NULL != message, "Exhusted memory while storing regular string\n");
copy_string(message, hold_string);
copy_string(message, hold_string, string_index + 2);
reset_hold_string();
return message;
}
@ -165,7 +165,7 @@ collect_weird_string_reset:
char* hold = calloc(string_index + 6, sizeof(char));
require(NULL != hold, "Exhusted available memory while attempting to collect a weird string\n");
copy_string(hold, hold_string);
copy_string(hold, hold_string, string_index + 5);
reset_hold_string();
return hold;
}

View File

@ -98,20 +98,23 @@ void initialize_types()
hold = new_primitive("char", "char*", "char**", 1, TRUE);
prim_types = add_primitive(hold);
/* Define FILE */
hold = new_primitive("FILE", "FILE*", "FILE**", register_size, TRUE);
prim_types = add_primitive(hold);
/* Define FUNCTION */
hold = new_primitive("FUNCTION", "FUNCTION*", "FUNCTION**", register_size, FALSE);
prim_types = add_primitive(hold);
/* Primitives mes.c wanted */
hold = new_primitive("size_t", "size_t*", "size_t**", register_size, FALSE);
prim_types = add_primitive(hold);
if(BOOTSTRAP_MODE)
{
/* Define FILE */
hold = new_primitive("FILE", "FILE*", "FILE**", register_size, TRUE);
prim_types = add_primitive(hold);
hold = new_primitive("ssize_t", "ssize_t*", "ssize_t**", register_size, FALSE);
prim_types = add_primitive(hold);
/* Primitives mes.c wanted */
hold = new_primitive("size_t", "size_t*", "size_t**", register_size, FALSE);
prim_types = add_primitive(hold);
hold = new_primitive("ssize_t", "ssize_t*", "ssize_t**", register_size, FALSE);
prim_types = add_primitive(hold);
}
global_types = prim_types;
}
@ -300,3 +303,28 @@ struct type* type_name()
return ret;
}
struct type* mirror_type(struct type* source, char* name)
{
struct type* head = calloc(1, sizeof(struct type));
require(NULL != head, "Exhusted memory while creating a struct\n");
struct type* i = calloc(1, sizeof(struct type));
require(NULL != i, "Exhusted memory while creating a struct indirection\n");
head->name = name;
i->name = name;
head->size = source->size;
i->size = source->indirect->size;
head->offset = source->offset;
i->offset = source->indirect->offset;
head->is_signed = source->is_signed;
i->is_signed = source->indirect->is_signed;
head->indirect = i;
i->indirect = head;
head->members = source->members;
i->members = source->indirect->members;
head->type = head;
i->type = i;
return head;
}

View File

@ -18,15 +18,15 @@
#include<stdlib.h>
#include<stdio.h>
char* copy_string(char* target, char* source)
void copy_string(char* target, char* source, int max)
{
while(0 != source[0])
int i = 0;
while(0 != source[i])
{
target[0] = source[0];
target = target + 1;
source = source + 1;
target[i] = source[i];
i = i + 1;
if(i == max) break;
}
return target;
}
int string_length(char* a)

View File

@ -120,11 +120,11 @@ b29aca7f0b63659915fe431e290f821cf17071983613021aacb8985d376bb206 test/results/t
f1795d82f5d39e5d2995882a627c74fa972bc749675d4a294732f9285a5ae3c2 test/results/test0020-knight-native-binary
d2e5a7672854bf190dd6e2f08081a5dbea22c08d77b4a62f76af68db033aea14 test/results/test0020-knight-posix-binary
1183247a4f714b9d1b0ec78b40f49631df3769ae95b0303fa9996208193c4ec9 test/results/test0020-x86-binary
baa510d2b782c31d1c9edd402271e2ddf00542aefd6f4780b6975db5a1665e0c test/results/test0021-aarch64-binary
f10d5378c91d716270ca8e876ed1acb0eb68b48a6e04d5d5e39b22dd4e3bf98c test/results/test0021-amd64-binary
a9c09864fd326b9b42bc5a32dc32d248dbfcfa87ccdd97cfd21ee95af39a3db9 test/results/test0021-armv7l-binary
0715ba9a1b0d6bb862fbd6ff11526455d2a7e85f4c38b7a021598701e3cf14f1 test/results/test0021-knight-posix-binary
fde9fb7fd3a1a19a8b1f4451cbdb98901adb6de468cd65bda2beb11408233b86 test/results/test0021-x86-binary
33f953a466ccf0e32a4d6fef6f3ad304a2c28c6195c68224def30198813b6d78 test/results/test0021-aarch64-binary
ad3cdef5615e8322c1785db33f19291491b4a23d5abffb436e8dd32fa01d86a5 test/results/test0021-amd64-binary
bde72b7ec387c8c001ac8ad0ea4ad07800867ec2057cedfc50aef6434122ccd9 test/results/test0021-armv7l-binary
b598bb72387459874a458b203eb6883e5360de9fcf60124c7dea8caef6a3d472 test/results/test0021-knight-posix-binary
77231592a7933196a9899f5d6d910aaacdcd02be83419b14f622c1034b136811 test/results/test0021-x86-binary
14b9a108bdee811c0e9ff3f1be1299767a0d8b49319efbfd9b5f269bf5a057ec test/results/test0022-aarch64-binary
4233f5b48b96e98bd83d30e63ce22420d6fe82dbebe9ac261c28760515efdfe8 test/results/test0022-amd64-binary
2d63c3a5a2c5b5ae2ea2e93c430027b4b418e229a963c66b9a3bc34307a55eba test/results/test0022-armv7l-binary
@ -145,11 +145,11 @@ cce24980c8557906660d6d404d6882e5a690c178afe9f097ba653facc254fdf5 test/results/t
252237eaaa9940b65aaf82a3667e8c59ccb78222c58e0b66b9a1dff6ee2e72e8 test/results/test0101-armv7l-binary
d120df140cc77037e3d16d1aee7482d270f55660a594c19be91cddc66de687f7 test/results/test0101-knight-posix-binary
cc36cf1c0a0ba6fb9e6578763266b1d3ef6580df3b2b3dad2ac03f0c98145e8b test/results/test0101-x86-binary
bdd6707d00c4798e9ff9ccd8cc30c8d747972c902f2df566463cfb8e1a248c8e test/results/test0102-aarch64-binary
6c7947fab2ea85f5d5f566cc2e0393daba64c84c7b2779041bffe20c311a777b test/results/test0102-amd64-binary
9b3e49b90e387c5f66160558b0bcce3cb0ce077ab4b35848a1b0809118b0d1b4 test/results/test0102-armv7l-binary
bf72fdc0514c83b93bf15f383a20b04f8ffd8c8b6c59b79c2963311b0657c6e9 test/results/test0102-knight-posix-binary
8d2cb0a0fb29b9852d18d1064d40a1af02b268fa81dc06ebcc58b00a7beae374 test/results/test0102-x86-binary
d6188080ebb725d5e2fa4061181ad00b02384db8d1d013fb80d2b3946d6d9f3c test/results/test0102-aarch64-binary
ff2c20511abe644022288d665f84282d66aa411545129cfa7d9a6603a796071d test/results/test0102-amd64-binary
1fdfff755396b9b6fd69b0e745d7625f058ff844319dff7940640f4de3593bde test/results/test0102-armv7l-binary
b7d9cbb37965dcd24fd69c06037c3f46e4c7a0338729224925275082d687a33e test/results/test0102-knight-posix-binary
310cfcef1f41ba6f9703bedbb076c528448b1523958b980aacb2e1aa6109b2a1 test/results/test0102-x86-binary
603fd4fe17f8ef9eac12116003941702849b720021da23dc32582ca41192a792 test/results/test0103-aarch64-binary
f2114b5217c12952a85d580ad5914dd679888d93d176ee132ace9e8773916b3b test/results/test0103-amd64-binary
79cbb69a747b07d729db736bc177b52b344106387831a0210ff18fce92edf1cc test/results/test0103-armv7l-binary
@ -169,8 +169,8 @@ a2a83f42119e646b389b98647cf6cf2aa9597185997c9453db746178c8c4c0bf test/results/t
698853b79efb30865a663c4863c050639eb21c7400008f7840830503928973d4 test/results/test0106-knight-native-binary
45c2ba61dc209d7ffa39de9ff0f0a7f8f3ea4d7e38598c72f982fcaf9a05c84a test/results/test0106-knight-posix-binary
944580ff4aae38aafac139faf6eed5bfe4ff68b01a7a3adfa346de8803101182 test/results/test0106-x86-binary
958fffb06538d20e51adefdd84f07f782caa032e4a5932e74632b34d940f86a5 test/results/test1000-aarch64-binary
e54038ac37bda078caa0ac74d5676e889976e37990ffc83f210d4ea476b8fc69 test/results/test1000-amd64-binary
a6c6d02d38b847f4d3209b6c92a8947ec7eeadfb9e358db0148d2036fe8f002b test/results/test1000-armv7l-binary
2818e781dae33eff98852ecc60b2135cd6b02bb6c1664493b79aa0493f76faf0 test/results/test1000-knight-posix-binary
d132b51923e78da58abdf5db157e3a4497fc26b74355be669b5b2b0a838b7b7e test/results/test1000-x86-binary
b20b981b871539b73ebb5034a12ddbc6da478ccc1e66f3d607f1f6133a6d8bd0 test/results/test1000-aarch64-binary
5307ff61ac4adb237d8ff403647283bb127b7226f61e07e68161bd3a8f8fec13 test/results/test1000-amd64-binary
b35fae63b64e85cf7e70f867f6eb0c38a7b70b616fc66b9dc900b2a04c2807fa test/results/test1000-armv7l-binary
3ce668b5d32a36198be73deccc9a4c3fefdb431c13e3f7adc2603241b92f717d test/results/test1000-knight-posix-binary
744b64abdeb09f2e8963e3189bfde1174a21943818853d2759b3d8a9ba34f7d1 test/results/test1000-x86-binary

View File

@ -21,6 +21,7 @@ set -ex
bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/putchar.c \
-f test/test0014/basic_args.c \
--bootstrap-mode \
-o test/test0014/basic_args.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -19,6 +19,7 @@ set -ex
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/putchar.c \
-f test/test0014/basic_args.c \
--bootstrap-mode \
-o test/test0014/basic_args.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -19,6 +19,7 @@ set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
-f test/test0014/basic_args.c \
--bootstrap-mode \
-o test/test0014/basic_args.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -19,6 +19,7 @@ set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
-f test/test0014/basic_args.c \
--bootstrap-mode \
-o test/test0014/basic_args.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -19,6 +19,7 @@ set -ex
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/putchar.c \
-f test/test0014/basic_args.c \
--bootstrap-mode \
-o test/test0014/basic_args.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -22,6 +22,7 @@ bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/file.c \
-f test/common_aarch64/functions/putchar.c \
-f test/test0015/file_read.c \
--bootstrap-mode \
-o test/test0015/file_read.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
-f test/common_amd64/functions/putchar.c \
-f test/test0015/file_read.c \
--bootstrap-mode \
-o test/test0015/file_read.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
-f test/common_armv7l/functions/putchar.c \
-f test/test0015/file_read.c \
--bootstrap-mode \
-o test/test0015/file_read.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c \
-f test/common_knight/functions/putchar.c \
-f test/test0015/file_read.c \
--bootstrap-mode \
-o test/test0015/file_read.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
-f test/common_x86/functions/putchar.c \
-f test/test0015/file_read.c \
--bootstrap-mode \
-o test/test0015/file_read.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -22,6 +22,7 @@ bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/file.c \
-f test/common_aarch64/functions/putchar.c \
-f test/test0016/file_write.c \
--bootstrap-mode \
-o test/test0016/file_write.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
-f test/common_amd64/functions/putchar.c \
-f test/test0016/file_write.c \
--bootstrap-mode \
-o test/test0016/file_write.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
-f test/common_armv7l/functions/putchar.c \
-f test/test0016/file_write.c \
--bootstrap-mode \
-o test/test0016/file_write.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c \
-f test/common_knight/functions/putchar.c \
-f test/test0016/file_write.c \
--bootstrap-mode \
-o test/test0016/file_write.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -20,6 +20,7 @@ set -ex
bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
-f test/common_x86/functions/putchar.c \
-f test/test0016/file_write.c \
--bootstrap-mode \
-o test/test0016/file_write.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -23,6 +23,7 @@ bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/malloc.c \
-f functions/calloc.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
-f test/common_amd64/functions/malloc.c \
-f functions/calloc.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
-f test/common_armv7l/functions/malloc.c \
-f functions/calloc.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -22,6 +22,7 @@ bin/M2-Planet --architecture knight-native -f test/common_knight/functions/file-
-f functions/calloc.c \
-f functions/match.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c
-f test/common_knight/functions/malloc.c \
-f functions/calloc.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
-f test/common_x86/functions/malloc.c \
-f functions/calloc.c \
-f test/test0018/math.c \
--bootstrap-mode \
-o test/test0018/math.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -28,6 +28,7 @@ bin/M2-Planet --architecture aarch64 \
-f functions/numerate_number.c \
-f functions/file_print.c \
-f test/test0019/getopt.c \
--bootstrap-mode \
-o test/test0019/getopt.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,6 +26,7 @@ bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
-f functions/numerate_number.c \
-f functions/file_print.c \
-f test/test0019/getopt.c \
--bootstrap-mode \
-o test/test0019/getopt.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,6 +26,7 @@ bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
-f functions/numerate_number.c \
-f functions/file_print.c \
-f test/test0019/getopt.c \
--bootstrap-mode \
-o test/test0019/getopt.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,6 +26,7 @@ bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c
-f functions/numerate_number.c \
-f functions/file_print.c \
-f test/test0019/getopt.c \
--bootstrap-mode \
-o test/test0019/getopt.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,6 +26,7 @@ bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
-f functions/numerate_number.c \
-f functions/file_print.c \
-f test/test0019/getopt.c \
--bootstrap-mode \
-o test/test0019/getopt.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -25,9 +25,19 @@
int match(char* a, char* b);
char* get_current_dir_name();
char* copy_string(char* target, char* source);
void file_print(char* s, FILE* f);
char* copy_string(char* target, char* source)
{
while(0 != source[0])
{
target[0] = source[0];
target = target + 1;
source = source + 1;
}
return target;
}
char* prepend_string(char* add, char* base)
{
char* ret = calloc(MAX_STRING, sizeof(char));

View File

@ -24,11 +24,11 @@ bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/exit.c \
-f test/common_aarch64/functions/file.c \
-f functions/calloc.c \
-f functions/string.c \
-f functions/match.c \
-f functions/file_print.c \
-f test/test0021/chdir.c \
--debug \
--bootstrap-mode \
-o test/test0021/chdir.M1 || exit 1
# Build debug footer

View File

@ -24,11 +24,11 @@ bin/M2-Planet --architecture amd64 \
-f test/common_amd64/functions/exit.c \
-f test/common_amd64/functions/file.c \
-f functions/calloc.c \
-f functions/string.c \
-f functions/match.c \
-f functions/file_print.c \
-f test/test0021/chdir.c \
--debug \
--bootstrap-mode \
-o test/test0021/chdir.M1 || exit 1
# Build debug footer

View File

@ -24,11 +24,11 @@ bin/M2-Planet --architecture armv7l \
-f test/common_armv7l/functions/exit.c \
-f test/common_armv7l/functions/file.c \
-f functions/calloc.c \
-f functions/string.c \
-f functions/match.c \
-f functions/file_print.c \
-f test/test0021/chdir.c \
--debug \
--bootstrap-mode \
-o test/test0021/chdir.M1 || exit 1
# Build debug footer

View File

@ -24,11 +24,11 @@ bin/M2-Planet --architecture knight-posix \
-f test/common_knight/functions/exit.c \
-f test/common_knight/functions/file.c \
-f functions/calloc.c \
-f functions/string.c \
-f functions/match.c \
-f functions/file_print.c \
-f test/test0021/chdir.c \
--debug \
--bootstrap-mode \
-o test/test0021/chdir.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,11 +26,11 @@ bin/M2-Planet --architecture x86 \
-f test/common_x86/functions/exit.c \
-f test/common_x86/functions/file.c \
-f functions/calloc.c \
-f functions/string.c \
-f functions/match.c \
-f functions/file_print.c \
-f test/test0021/chdir.c \
--debug \
--bootstrap-mode \
-o test/test0021/chdir.M1 || exit 1
# Build debug footer

View File

@ -27,6 +27,7 @@ bin/M2-Planet --architecture aarch64 \
-f functions/file_print.c \
-f test/test0022/continue.c \
--debug \
--bootstrap-mode \
-o test/test0022/continue.M1 || exit 1
# Build debug footer

View File

@ -27,6 +27,7 @@ bin/M2-Planet --architecture amd64 \
-f functions/file_print.c \
-f test/test0022/continue.c \
--debug \
--bootstrap-mode \
-o test/test0022/continue.M1 || exit 1
# Build debug footer

View File

@ -27,6 +27,7 @@ bin/M2-Planet --architecture armv7l \
-f functions/file_print.c \
-f test/test0022/continue.c \
--debug \
--bootstrap-mode \
-o test/test0022/continue.M1 || exit 1
# Build debug footer

View File

@ -26,6 +26,7 @@ bin/M2-Planet --architecture knight-posix \
-f functions/calloc.c \
-f functions/file_print.c \
-f test/test0022/continue.c \
--bootstrap-mode \
-o test/test0022/continue.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -27,6 +27,7 @@ bin/M2-Planet --architecture x86 \
-f functions/file_print.c \
-f test/test0022/continue.c \
--debug \
--bootstrap-mode \
-o test/test0022/continue.M1 || exit 1
# Build debug footer

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture aarch64 \
-f test/common_aarch64/functions/file.c \
-f test/test0023/fseek.c \
--debug \
--bootstrap-mode \
-o test/test0023/fseek.M1 || exit 1
# Build debug footer

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture amd64 \
-f test/common_amd64/functions/file.c \
-f test/test0023/fseek.c \
--debug \
--bootstrap-mode \
-o test/test0023/fseek.M1 || exit 1
# Build debug footer

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture armv7l \
-f test/common_armv7l/functions/file.c \
-f test/test0023/fseek.c \
--debug \
--bootstrap-mode \
-o test/test0023/fseek.M1 || exit 1
# Build debug footer

View File

@ -20,6 +20,7 @@ set -x
bin/M2-Planet --architecture knight-posix \
-f test/common_knight/functions/file.c \
-f test/test0023/fseek.c \
--bootstrap-mode \
-o test/test0023/fseek.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -21,6 +21,7 @@ bin/M2-Planet --architecture x86 \
-f test/common_x86/functions/file.c \
-f test/test0023/fseek.c \
--debug \
--bootstrap-mode \
-o test/test0023/fseek.M1 || exit 1
# Build debug footer

View File

@ -27,6 +27,7 @@ set -x
-f functions/match.c \
-f test/test0100/blood-elf.c \
--debug \
--bootstrap-mode \
-o test/test0100/blood-elf.M1 || exit 1
# Build debug footer

View File

@ -25,6 +25,7 @@ set -x
-f functions/match.c \
-f test/test0100/blood-elf.c \
--debug \
--bootstrap-mode \
-o test/test0100/blood-elf.M1 || exit 1
# Build debug footer

View File

@ -25,6 +25,7 @@ set -x
-f functions/match.c \
-f test/test0100/blood-elf.c \
--debug \
--bootstrap-mode \
-o test/test0100/blood-elf.M1 || exit 1
# Build debug footer

View File

@ -25,6 +25,7 @@ set -x
-f functions/calloc.c \
-f functions/match.c \
-f test/test0100/blood-elf.c \
--bootstrap-mode \
-o test/test0100/blood-elf.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -25,6 +25,7 @@ set -x
-f functions/match.c \
-f test/test0100/blood-elf.c \
--debug \
--bootstrap-mode \
-o test/test0100/blood-elf.M1 || exit 1
# Build debug footer

View File

@ -30,6 +30,7 @@ set -x
-f test/common_aarch64/functions/stat.c \
-f test/test0101/hex2_linker.c \
--debug \
--bootstrap-mode \
-o test/test0101/hex2_linker.M1 || exit 1
# Build debug footer

View File

@ -28,6 +28,7 @@ set -x
-f test/common_amd64/functions/stat.c \
-f test/test0101/hex2_linker.c \
--debug \
--bootstrap-mode \
-o test/test0101/hex2_linker.M1 || exit 1
# Build debug footer

View File

@ -28,6 +28,7 @@ set -x
-f test/common_armv7l/functions/stat.c \
-f test/test0101/hex2_linker.c \
--debug \
--bootstrap-mode \
-o test/test0101/hex2_linker.M1 || exit 1
# Build debug footer

View File

@ -27,6 +27,7 @@ set -x
-f functions/numerate_number.c \
-f test/common_knight/functions/stat.c \
-f test/test0101/hex2_linker.c \
--bootstrap-mode \
-o test/test0101/hex2_linker.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -28,6 +28,7 @@ set -x
-f test/common_x86/functions/stat.c \
-f test/test0101/hex2_linker.c \
--debug \
--bootstrap-mode \
-o test/test0101/hex2_linker.M1 || exit 1
# Build debug footer

View File

@ -31,6 +31,7 @@ set -x
-f functions/require.c \
-f test/test0102/M1-macro.c \
--debug \
--bootstrap-mode \
-o test/test0102/M1-macro.M1 || exit 1
# Build debug footer

View File

@ -29,6 +29,7 @@ set -x
-f functions/require.c \
-f test/test0102/M1-macro.c \
--debug \
--bootstrap-mode \
-o test/test0102/M1-macro.M1 || exit 1
# Build debug footer

View File

@ -29,6 +29,7 @@ set -x
-f functions/require.c \
-f test/test0102/M1-macro.c \
--debug \
--bootstrap-mode \
-o test/test0102/M1-macro.M1 || exit 1
# Build debug footer

View File

@ -28,6 +28,7 @@ set -x
-f functions/string.c \
-f functions/require.c \
-f test/test0102/M1-macro.c \
--bootstrap-mode \
-o test/test0102/M1-macro.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -29,6 +29,7 @@ set -x
-f functions/require.c \
-f test/test0102/M1-macro.c \
--debug \
--bootstrap-mode \
-o test/test0102/M1-macro.M1 || exit 1
# Build debug footer

View File

@ -28,6 +28,7 @@ set -x
-f functions/match.c \
-f test/test0103/get_machine.c \
--debug \
--bootstrap-mode \
-o test/test0103/get_machine.M1 || exit 1
# Build debug footer

View File

@ -26,6 +26,7 @@ set -x
-f functions/match.c \
-f test/test0103/get_machine.c \
--debug \
--bootstrap-mode \
-o test/test0103/get_machine.M1 || exit 1
# Build debug footer

View File

@ -26,6 +26,7 @@ set -x
-f functions/match.c \
-f test/test0103/get_machine.c \
--debug \
--bootstrap-mode \
-o test/test0103/get_machine.M1 || exit 1
# Build debug footer

View File

@ -25,6 +25,7 @@ set -x
-f test/common_knight/functions/uname.c \
-f functions/match.c \
-f test/test0103/get_machine.c \
--bootstrap-mode \
-o test/test0103/get_machine.M1 || exit 1
# Macro assemble with libc written in M1-Macro

View File

@ -26,6 +26,7 @@ set -x
-f functions/match.c \
-f test/test0103/get_machine.c \
--debug \
--bootstrap-mode \
-o test/test0103/get_machine.M1 || exit 1
# Build debug footer

View File

@ -31,6 +31,7 @@ set -x
-f test/common_aarch64/functions/execve.c \
-f test/test0104/kaem.c \
--debug \
--bootstrap-mode \
-o test/test0104/kaem.M1 || exit 1
# Build debug footer

View File

@ -29,6 +29,7 @@ set -x
-f test/common_amd64/functions/execve.c \
-f test/test0104/kaem.c \
--debug \
--bootstrap-mode \
-o test/test0104/kaem.M1 || exit 1
# Build debug footer

View File

@ -29,6 +29,7 @@ set -x
-f test/common_armv7l/functions/execve.c \
-f test/test0104/kaem.c \
--debug \
--bootstrap-mode \
-o test/test0104/kaem.M1 || exit 1
# Build debug footer

View File

@ -29,6 +29,7 @@ set -x
-f test/common_x86/functions/execve.c \
-f test/test0104/kaem.c \
--debug \
--bootstrap-mode \
-o test/test0104/kaem.M1 || exit 1
# Build debug footer

View File

@ -33,6 +33,7 @@ set -x
-f test/test0105/lisp_print.c \
-f test/test0105/lisp_read.c \
--debug \
--bootstrap-mode \
-o test/test0105/lisp.M1 || exit 1
# Build debug footer

View File

@ -32,6 +32,7 @@ set -x
-f test/test0105/lisp_print.c \
-f test/test0105/lisp_read.c \
--debug \
--bootstrap-mode \
-o test/test0105/lisp.M1 || exit 1
# Build debug footer

View File

@ -32,6 +32,7 @@ set -x
-f test/test0105/lisp_print.c \
-f test/test0105/lisp_read.c \
--debug \
--bootstrap-mode \
-o test/test0105/lisp.M1 || exit 1
# Build debug footer

View File

@ -32,6 +32,7 @@ set -x
-f test/test0105/lisp_print.c \
-f test/test0105/lisp_read.c \
--debug \
--bootstrap-mode \
-o test/test0105/lisp.M1 || exit 1
# Build debug footer

View File

@ -39,6 +39,7 @@ set -ex
-f cc_core.c \
-f cc.c \
--debug \
--bootstrap-mode \
-o test/test1000/cc.M1 || exit 1
# Build debug footer
@ -86,6 +87,7 @@ then
-f cc_types.c \
-f cc_core.c \
-f cc.c \
--bootstrap-mode \
-o test/test1000/proof || exit 5
. ./sha256.sh

View File

@ -38,6 +38,7 @@ set -ex
-f cc_core.c \
-f cc.c \
--debug \
--bootstrap-mode \
-o test/test1000/cc.M1 || exit 1
# Build debug footer
@ -85,6 +86,7 @@ then
-f cc_types.c \
-f cc_core.c \
-f cc.c \
--bootstrap-mode \
-o test/test1000/proof || exit 5
. ./sha256.sh

View File

@ -38,6 +38,7 @@ set -ex
-f cc_core.c \
-f cc.c \
--debug \
--bootstrap-mode \
-o test/test1000/cc.M1 || exit 1
# Build debug footer
@ -85,6 +86,7 @@ then
-f cc_types.c \
-f cc_core.c \
-f cc.c \
--bootstrap-mode \
-o test/test1000/proof || exit 5
. ./sha256.sh

View File

@ -38,6 +38,7 @@ set -ex
-f cc_core.c \
-f cc.c \
--debug \
--bootstrap-mode \
-o test/test1000/cc.M1 || exit 1
# Macro assemble with libc written in M1-Macro
@ -79,6 +80,7 @@ then
-f cc_types.c \
-f cc_core.c \
-f cc.c \
--bootstrap-mode \
-o test/test1000/proof || exit 4
. ./sha256.sh

View File

@ -38,6 +38,7 @@ set -ex
-f cc_core.c \
-f cc.c \
--debug \
--bootstrap-mode \
-o test/test1000/cc.M1 || exit 1
# Build debug footer
@ -85,6 +86,7 @@ then
-f cc_types.c \
-f cc_core.c \
-f cc.c \
--bootstrap-mode \
-o test/test1000/proof || exit 5
. ./sha256.sh

View File

@ -1 +1 @@
6e53436ce495370f6c8b3a114f3505f9787607bb42654d8e492a7eb533f749e3 test/test1000/proof
7d38cf1d5cd25d976cc39dcef8b46f95bb7ea4eefd15e97e3d8c3e66fa06281c test/test1000/proof