Update first few tests to use M2libc

This commit is contained in:
Sanne Wouda 2021-01-10 16:33:25 +00:00
parent 810d7da9fc
commit 45685d0c30
6 changed files with 41 additions and 25 deletions

View File

@ -47,11 +47,11 @@ dc543f40901704ce9f352308c7759c8b581395f8683cfa248a03410dc3dc24bd test/results/t
3095d9a11eddbc875f13051825eef622cfc08fe1f93963c00c32af155982f480 test/results/test0007-knight-posix-binary
fede201188d1b997e7c0bace34ff09cfe0d1cd4c718f0a15adaa5956264a15b1 test/results/test0007-x86-binary
d6a4c229f38cd1a838ca9a2353fa705bd87ecd493aee2bfbdfd59bb92cf4bada test/results/test0008-aarch64-binary
2d0f89e696b4526f71887f2d3a5d0d14d79b811dea436821d3d876a23fb24f20 test/results/test0008-amd64-binary
eccff9f69a17a3b060a366fc2a71f9f736fcae02205d97d68c6a4ccf5d023d4e test/results/test0008-amd64-binary
371e2c7b12829e9081c720eea917dc78c039996b7881f799882c59c89eb22cdd test/results/test0008-armv7l-binary
b54dd7a53e4e7619e7fe1761b827cfdf0c24b2317084ec7c06a7403c5d51c651 test/results/test0008-knight-native-binary
3ea254522d01978f53a5ce8f88f145afdc1fec447bfc5e3ffc3057ab6968a07b test/results/test0008-knight-posix-binary
0e73537c5c41d94395e6a626c7f0846935de5ff9ca25b004750b9798d539ae92 test/results/test0008-x86-binary
469ffa6eb87391a6d1617ac8a273d0ba58e62a6e9741d97e4ebc6444b23cff6d test/results/test0008-x86-binary
d595865be0821679a9885e897fa57ffe8d559a0750113930e6466985f907dd53 test/results/test0009-aarch64-binary
5de426db9e0cc0943563a5f2464010b1aa27d4b72677945dd237fc3311691906 test/results/test0009-amd64-binary
5f037d86c6e0c352579ce223157963090fe56a72bf65467508f36fd3dd5bd7b2 test/results/test0009-armv7l-binary

View File

@ -23,15 +23,15 @@ bin/M2-Planet --architecture aarch64 \
-o test/test0000/return.M1 || exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_aarch64/aarch64_defs.M1 \
-f test/common_aarch64/libc-core.M1 \
M1 -f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-core.M1 \
-f test/test0000/return.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0000/return.hex2 || exit 2
# Resolve all linkages
hex2 -f test/common_aarch64/ELF-aarch64.hex2 \
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0000/return.hex2 \
--LittleEndian \
--architecture aarch64 \

View File

@ -21,15 +21,15 @@ bin/M2-Planet --architecture amd64 -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
M1 -f M2libc/amd64/amd64_defs.M1 \
-f M2libc/amd64/libc-core.M1 \
-f test/test0000/return.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0000/return.hex2 || exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0000/return.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0000-amd64-binary --exec_enable || exit 3
hex2 -f M2libc/amd64/ELF-amd64.hex2 -f test/test0000/return.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0000-amd64-binary --exec_enable || exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -21,15 +21,15 @@ bin/M2-Planet --architecture x86 -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
M1 -f M2libc/x86/x86_defs.M1 \
-f M2libc/x86/libc-core.M1 \
-f test/test0000/return.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0000/return.hex2 || exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0000/return.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0000-x86-binary --exec_enable || exit 3
hex2 -f M2libc/x86/ELF-i386.hex2 -f test/test0000/return.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0000-x86-binary --exec_enable || exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -17,23 +17,31 @@
set -x
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/putchar.c \
-f test/common_amd64/functions/exit.c \
-f test/common_amd64/functions/malloc.c \
bin/M2-Planet --architecture amd64 \
-f M2libc/amd64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/amd64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--bootstrap-mode \
--debug \
-o test/test0008/struct.M1 || exit 1
# Build debug footer
blood-elf --64 -f test/test0008/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 || exit 2
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
M1 -f M2libc/amd64/amd64_defs.M1 \
-f M2libc/amd64/libc-core.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0008/struct.hex2 || exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0008/struct.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0008-amd64-binary --exec_enable || exit 3
hex2 -f M2libc/amd64/ELF-amd64-debug.hex2 -f test/test0008/struct.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0008-amd64-binary --exec_enable || exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -17,23 +17,31 @@
set -x
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/putchar.c \
-f test/common_x86/functions/exit.c \
-f test/common_x86/functions/malloc.c \
bin/M2-Planet --architecture x86 \
-f M2libc/x86/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/x86/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--bootstrap-mode \
--debug \
-o test/test0008/struct.M1 || exit 1
# Build debug footer
blood-elf -f test/test0008/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 || exit 2
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
M1 -f M2libc/x86/x86_defs.M1 \
-f M2libc/x86/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0008/struct.hex2 || exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0008/struct.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0008-x86-binary --exec_enable || exit 3
hex2 -f test/common_x86/ELF-i386-debug.hex2 -f test/test0008/struct.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0008-x86-binary --exec_enable || exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]