tests: prettier scripts

One line per flag for the major calls. This simplifies a bit the automated
patching for parallel testing that comes next.
This commit is contained in:
deesix 2021-01-12 00:00:00 +01:00
parent 4def464475
commit 3aa8327334
186 changed files with 3140 additions and 1119 deletions

View File

@ -18,26 +18,32 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
-o test/test0000/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.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
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0000/return.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0000-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,19 +17,32 @@
set -x
# Build the test
bin/M2-Planet --architecture amd64 -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
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 M2libc/amd64/amd64_defs.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
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
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
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

@ -17,19 +17,32 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
bin/M2-Planet \
--architecture armv7l \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0000/return.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0000/return.hex2 || exit 2
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0000/return.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0000-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0000/return.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0000-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,19 +17,31 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
bin/M2-Planet \
--architecture knight-native \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0000/return.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0000/return.hex2 || exit 2
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0000/return.hex2 --BigEndian --architecture knight-native --BaseAddress 0x0 -o test/results/test0000-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0000/return.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x0 \
-o test/results/test0000-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,19 +17,32 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
bin/M2-Planet \
--architecture knight-posix \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0000/return.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0000/return.hex2 || exit 2
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0000/return.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x0 -o test/results/test0000-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0000/return.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x0 \
-o test/results/test0000-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,19 +17,32 @@
set -x
# Build the test
bin/M2-Planet --architecture x86 -f test/test0000/return.c \
-o test/test0000/return.M1 || exit 1
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 M2libc/x86/x86_defs.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
-o test/test0000/return.hex2 \
|| exit 2
# Resolve all linkages
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
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

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 || exit 1
-o test/test0001/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0001/library_call.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0001/library_call.hex2 || exit 2
-o test/test0001/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0001/library_call.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0001-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 || exit 1
-o test/test0001/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0001/library_call.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0001/library_call.hex2 || exit 2
-o test/test0001/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0001/library_call.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0001-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0001/library_call.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0001-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 || exit 1
-o test/test0001/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0001/library_call.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0001/library_call.hex2 || exit 2
-o test/test0001/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0001/library_call.hex2 --BigEndian --architecture knight-native --BaseAddress 0x0 -o test/results/test0001-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0001/library_call.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x0 \
-o test/results/test0001-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 || exit 1
-o test/test0001/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0001/library_call.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0001/library_call.hex2 || exit 2
-o test/test0001/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0001/library_call.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x0 -o test/results/test0001-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0001/library_call.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x0 \
-o test/results/test0001-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 || exit 1
-o test/test0002/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0002/if.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0002/if.hex2 || exit 2
-o test/test0002/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0002/if.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0002-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 || exit 1
-o test/test0002/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0002/if.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0002/if.hex2 || exit 2
-o test/test0002/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0002/if.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0002-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0002/if.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0002-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 || exit 1
-o test/test0002/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0002/if.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0002/if.hex2 || exit 2
-o test/test0002/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0002/if.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0002-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0002/if.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0002-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 || exit 1
-o test/test0002/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0002/if.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0002/if.hex2 || exit 2
-o test/test0002/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0002/if.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0002-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0002/if.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0002-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 || exit 1
-o test/test0003/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0003/constant.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0003/constant.hex2 || exit 2
-o test/test0003/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0003/constant.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0003-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 || exit 1
-o test/test0003/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0003/constant.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0003/constant.hex2 || exit 2
-o test/test0003/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0003/constant.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0003-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0003/constant.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0003-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 || exit 1
-o test/test0003/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0003/constant.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0003/constant.hex2 || exit 2
-o test/test0003/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0003/constant.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0003-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0003/constant.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0003-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 || exit 1
-o test/test0003/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0003/constant.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0003/constant.hex2 || exit 2
-o test/test0003/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0003/constant.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0003-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0003/constant.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0003-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 || exit 1
-o test/test0004/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0004/call.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0004/call.hex2 || exit 2
-o test/test0004/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0004/call.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0004-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 || exit 1
-o test/test0004/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0004/call.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0004/call.hex2 || exit 2
-o test/test0004/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0004/call.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0004-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0004/call.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0004-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 || exit 1
-o test/test0004/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0004/call.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0004/call.hex2 || exit 2
-o test/test0004/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0004/call.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0004-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0004/call.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0004-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 || exit 1
-o test/test0004/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0004/call.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0004/call.hex2 || exit 2
-o test/test0004/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0004/call.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0004-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0004/call.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0004-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0005/string.c \
-o test/test0005/string.M1 || exit 1
-o test/test0005/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0005/string.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0005/string.hex2 || exit 2
-o test/test0005/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0005/string.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0005-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,25 +17,41 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0005/string.c \
--debug \
-o test/test0005/string.M1 || exit 1
-o test/test0005/string.M1 \
|| exit 1
blood-elf -f test/test0005/string.M1 -o test/test0005/string-footer.M1 || exit 2
blood-elf \
-f test/test0005/string.M1 \
-o test/test0005/string-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0005/string.M1 \
-f test/test0005/string-footer.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0005/string.hex2 || exit 3
-o test/test0005/string.hex2 \
|| exit 3
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l-debug.hex2 -f test/test0005/string.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0005-armv7l-binary --exec_enable || exit 4
hex2 \
-f test/common_armv7l/ELF-armv7l-debug.hex2 \
-f test/test0005/string.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0005-armv7l-binary \
--exec_enable \
|| exit 4
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0005/string.c \
-o test/test0005/string.M1 || exit 1
-o test/test0005/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0005/string.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0005/string.hex2 || exit 2
-o test/test0005/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0005/string.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0005-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0005/string.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0005-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0005/string.c \
-o test/test0005/string.M1 || exit 1
-o test/test0005/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0005/string.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0005/string.hex2 || exit 2
-o test/test0005/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0005/string.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0005-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0005/string.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0005-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0006/for.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0006/for.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0006-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,20 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/putchar.c \
bin/M2-Planet \
--architecture amd64 \
-f test/common_amd64/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0006/for.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0006/for.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0006-amd64-binary --exec_enable || exit 3
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0006/for.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \
-o test/results/test0006-amd64-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -17,20 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0006/for.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0006/for.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0006-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0006/for.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0006-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,20 +17,32 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0006/for.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0006/for.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0006-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0006/for.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0006-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight" ]

View File

@ -17,20 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0006/for.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0006/for.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0006-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0006/for.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0006-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight" ]

View File

@ -17,20 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/putchar.c \
bin/M2-Planet \
--architecture x86 \
-f test/common_x86/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 || exit 1
-o test/test0006/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0006/for.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0006/for.hex2 || exit 2
-o test/test0006/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0006/for.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0006-x86-binary --exec_enable || exit 3
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0006/for.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o test/results/test0006-x86-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -18,38 +18,47 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0007/do.c \
--debug \
-o test/test0007/do.M1 || exit 1
-o test/test0007/do.M1 \
|| exit 1
# Build debug footer
blood-elf --64 -f test/test0007/do.M1 \
blood-elf \
--64 \
-f test/test0007/do.M1 \
--entry _start \
-o test/test0007/do-footer.M1 || exit 2
-o test/test0007/do-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0007/do.M1 \
-f test/test0007/do-footer.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0007/do.hex2 || exit 2
-o test/test0007/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64-debug.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64-debug.hex2 \
-f test/test0007/do.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0007-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0007/do.c \
-o test/test0007/do.M1 || exit 1
-o test/test0007/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0007/do.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0007/do.hex2 || exit 2
-o test/test0007/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0007/do.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0007-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0007/do.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0007-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0007/do.c \
-o test/test0007/do.M1 || exit 1
-o test/test0007/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0007/do.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0007/do.hex2 || exit 2
-o test/test0007/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0007/do.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0007-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0007/do.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0007-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0007/do.c \
-o test/test0007/do.M1 || exit 1
-o test/test0007/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0007/do.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0007/do.hex2 || exit 2
-o test/test0007/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0007/do.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0007-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0007/do.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0007-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight" ]

View File

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

View File

@ -18,37 +18,46 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--debug \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Build debug footer
blood-elf --64 -f test/test0008/struct.M1 \
blood-elf \
--64 \
-f test/test0008/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 || exit 2
-o test/test0008/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0008/struct.hex2 || exit 2
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64-debug.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64-debug.hex2 \
-f test/test0008/struct.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0008-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,31 +17,46 @@
set -x
# Build the test
bin/M2-Planet --architecture amd64 \
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 \
--debug \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Build debug footer
blood-elf --64 -f test/test0008/struct.M1 \
blood-elf \
--64 \
-f test/test0008/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 || exit 2
-o test/test0008/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/amd64/amd64_defs.M1 \
M1 \
-f M2libc/amd64/amd64_defs.M1 \
-f M2libc/amd64/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0008/struct.hex2 || exit 2
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
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
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,36 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/common_armv7l/functions/malloc.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0008/struct.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0008/struct.hex2 || exit 2
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0008/struct.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0008-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0008/struct.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0008-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,23 +17,35 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
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 test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0008/struct.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0008/struct.hex2 || exit 2
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0008/struct.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0008-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0008/struct.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0008-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,23 +17,36 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/common_knight/functions/malloc.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0008/struct.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0008/struct.hex2 || exit 2
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0008/struct.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0008-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0008/struct.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0008-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,31 +17,45 @@
set -x
# Build the test
bin/M2-Planet --architecture x86 \
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 \
--debug \
-o test/test0008/struct.M1 || exit 1
-o test/test0008/struct.M1 \
|| exit 1
# Build debug footer
blood-elf -f test/test0008/struct.M1 \
blood-elf \
-f test/test0008/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 || exit 2
-o test/test0008/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/x86/x86_defs.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
-o test/test0008/struct.hex2 \
|| exit 2
# Resolve all linkages
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
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" ]

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 || exit 1
-o test/test0009/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0009/goto.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0009/goto.hex2 || exit 2
-o test/test0009/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0009/goto.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0009-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 || exit 1
-o test/test0009/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0009/goto.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0009/goto.hex2 || exit 2
-o test/test0009/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0009/goto.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0009-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0009/goto.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0009-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 || exit 1
-o test/test0009/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0009/goto.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0009/goto.hex2 || exit 2
-o test/test0009/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0009/goto.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0009-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0009/goto.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0009-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 || exit 1
-o test/test0009/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0009/goto.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0009/goto.hex2 || exit 2
-o test/test0009/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0009/goto.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0009-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0009/goto.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0009-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -x
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0010/nested_struct.c \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0010/nested_struct.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0010/nested_struct.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0010-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,23 +17,36 @@
set -x
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/putchar.c \
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 \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0010/nested_struct.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0010-amd64-binary --exec_enable || exit 3
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0010/nested_struct.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \
-o test/results/test0010-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,36 @@
set -x
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/common_armv7l/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0010/nested_struct.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0010-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0010/nested_struct.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0010-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,23 +17,35 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
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 test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0010/nested_struct.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0010/nested_struct.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0010-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0010/nested_struct.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0010-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,23 +17,36 @@
set -x
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/common_knight/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0010/nested_struct.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0010-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0010/nested_struct.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0010-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,23 +17,36 @@
set -x
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/putchar.c \
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 \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 || exit 1
-o test/test0010/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0010/nested_struct.hex2 || exit 2
-o test/test0010/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0010/nested_struct.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0010-x86-binary --exec_enable || exit 3
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0010/nested_struct.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o test/results/test0010-x86-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 || exit 1
-o test/test0011/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0011/break-do.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0011/break-do.hex2 || exit 2
-o test/test0011/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0011/break-do.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0011-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 || exit 1
-o test/test0011/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0011/break-do.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0011/break-do.hex2 || exit 2
-o test/test0011/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0011/break-do.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0011-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0011/break-do.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0011-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 || exit 1
-o test/test0011/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0011/break-do.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0011/break-do.hex2 || exit 2
-o test/test0011/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0011/break-do.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0011-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0011/break-do.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0011-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 || exit 1
-o test/test0011/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0011/break-do.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0011/break-do.hex2 || exit 2
-o test/test0011/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0011/break-do.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0011-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0011/break-do.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0011-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0012/break-for.c \
-o test/test0012/break-for.M1 || exit 1
-o test/test0012/break-for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0012/break-for.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0012/break-for.hex2 || exit 2
-o test/test0012/break-for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0012/break-for.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0012-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0012/break-for.c \
-o test/test0012/break-for.M1 || exit 1
-o test/test0012/break-for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0012/break-for.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0012/break-for.hex2 || exit 2
-o test/test0012/break-for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0012/break-for.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0012-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0012/break-for.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0012-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0012/break-for.c \
-o test/test0012/break-for.M1 || exit 1
-o test/test0012/break-for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0012/break-for.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0012/break-for.hex2 || exit 2
-o test/test0012/break-for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0012/break-for.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0012-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0012/break-for.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0012-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0012/break-for.c \
-o test/test0012/break-for.M1 || exit 1
-o test/test0012/break-for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0012/break-for.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0012/break-for.hex2 || exit 2
-o test/test0012/break-for.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0012/break-for.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0012-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0012/break-for.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0012-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0013/break-while.c \
-o test/test0013/break-while.M1 || exit 1
-o test/test0013/break-while.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0013/break-while.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0013/break-while.hex2 || exit 2
-o test/test0013/break-while.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0013/break-while.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0013-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

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

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/common_armv7l/functions/exit.c \
-f test/test0013/break-while.c \
-o test/test0013/break-while.M1 || exit 1
-o test/test0013/break-while.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0013/break-while.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0013/break-while.hex2 || exit 2
-o test/test0013/break-while.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0013/break-while.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0013-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0013/break-while.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0013-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,33 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-native -f test/common_knight/functions/putchar-native.c \
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0013/break-while.c \
-o test/test0013/break-while.M1 || exit 1
-o test/test0013/break-while.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight-native_defs.M1 \
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0013/break-while.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0013/break-while.hex2 || exit 2
-o test/test0013/break-while.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/test0013/break-while.hex2 --BigEndian --architecture knight-native --BaseAddress 0x00 -o test/results/test0013-knight-native-binary --exec_enable || exit 3
hex2 \
-f test/test0013/break-while.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \
-o test/results/test0013-knight-native-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/common_knight/functions/exit.c \
-f test/test0013/break-while.c \
-o test/test0013/break-while.M1 || exit 1
-o test/test0013/break-while.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0013/break-while.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0013/break-while.hex2 || exit 2
-o test/test0013/break-while.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0013/break-while.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0013-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0013/break-while.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0013-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

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

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0014/basic_args.c \
-o test/test0014/basic_args.M1 || exit 1
-o test/test0014/basic_args.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0014/basic_args.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0014/basic_args.hex2 || exit 2
-o test/test0014/basic_args.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0014/basic_args.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0014-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/putchar.c \
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
-o test/test0014/basic_args.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0014/basic_args.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0014/basic_args.hex2 || exit 2
-o test/test0014/basic_args.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0014/basic_args.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0014-amd64-binary --exec_enable || exit 3
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0014/basic_args.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \
-o test/results/test0014-amd64-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/putchar.c \
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
-o test/test0014/basic_args.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0014/basic_args.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0014/basic_args.hex2 || exit 2
-o test/test0014/basic_args.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0014/basic_args.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0014-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0014/basic_args.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0014-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/putchar.c \
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
-o test/test0014/basic_args.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0014/basic_args.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0014/basic_args.hex2 || exit 2
-o test/test0014/basic_args.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0014/basic_args.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0014-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0014/basic_args.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0014-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,21 +17,34 @@
set -ex
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/putchar.c \
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
-o test/test0014/basic_args.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0014/basic_args.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0014/basic_args.hex2 || exit 2
-o test/test0014/basic_args.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0014/basic_args.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0014-x86-binary --exec_enable || exit 3
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0014/basic_args.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o test/results/test0014-x86-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0015/file_read.c \
-o test/test0015/file_read.M1 || exit 1
-o test/test0015/file_read.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0015/file_read.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0015/file_read.hex2 || exit 2
-o test/test0015/file_read.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0015/file_read.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0015-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
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
-o test/test0015/file_read.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0015/file_read.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0015/file_read.hex2 || exit 2
-o test/test0015/file_read.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0015/file_read.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0015-amd64-binary --exec_enable || exit 3
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0015/file_read.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \
-o test/results/test0015-amd64-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
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
-o test/test0015/file_read.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0015/file_read.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0015/file_read.hex2 || exit 2
-o test/test0015/file_read.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0015/file_read.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0015-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0015/file_read.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0015-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c \
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
-o test/test0015/file_read.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0015/file_read.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0015/file_read.hex2 || exit 2
-o test/test0015/file_read.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0015/file_read.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0015-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0015/file_read.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0015-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "Knight*" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
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
-o test/test0015/file_read.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0015/file_read.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0015/file_read.hex2 || exit 2
-o test/test0015/file_read.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0015/file_read.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0015-x86-binary --exec_enable || exit 3
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0015/file_read.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o test/results/test0015-x86-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0016/file_write.c \
-o test/test0016/file_write.M1 || exit 1
-o test/test0016/file_write.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0016/file_write.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0016/file_write.hex2 || exit 2
-o test/test0016/file_write.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0016/file_write.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0016-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture amd64 -f test/common_amd64/functions/file.c \
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
-o test/test0016/file_write.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_amd64/amd64_defs.M1 \
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0016/file_write.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0016/file_write.hex2 || exit 2
-o test/test0016/file_write.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_amd64/ELF-amd64.hex2 -f test/test0016/file_write.hex2 --LittleEndian --architecture amd64 --BaseAddress 0x00600000 -o test/results/test0016-amd64-binary --exec_enable || exit 3
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0016/file_write.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \
-o test/results/test0016-amd64-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "amd64" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture armv7l -f test/common_armv7l/functions/file.c \
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
-o test/test0016/file_write.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_armv7l/armv7l_defs.M1 \
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0016/file_write.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0016/file_write.hex2 || exit 2
-o test/test0016/file_write.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_armv7l/ELF-armv7l.hex2 -f test/test0016/file_write.hex2 --LittleEndian --architecture armv7l --BaseAddress 0x10000 -o test/results/test0016-armv7l-binary --exec_enable || exit 3
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0016/file_write.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \
-o test/results/test0016-armv7l-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "armv7l" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture knight-posix -f test/common_knight/functions/file.c \
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
-o test/test0016/file_write.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_knight/knight_defs.M1 \
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0016/file_write.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0016/file_write.hex2 || exit 2
-o test/test0016/file_write.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_knight/ELF-knight.hex2 -f test/test0016/file_write.hex2 --BigEndian --architecture knight-posix --BaseAddress 0x00 -o test/results/test0016-knight-posix-binary --exec_enable || exit 3
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0016/file_write.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \
-o test/results/test0016-knight-posix-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "knight*" ]

View File

@ -17,22 +17,35 @@
set -ex
# Build the test
bin/M2-Planet --architecture x86 -f test/common_x86/functions/file.c \
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
-o test/test0016/file_write.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f test/common_x86/x86_defs.M1 \
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0016/file_write.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0016/file_write.hex2 || exit 2
-o test/test0016/file_write.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f test/common_x86/ELF-i386.hex2 -f test/test0016/file_write.hex2 --LittleEndian --architecture x86 --BaseAddress 0x8048000 -o test/results/test0016-x86-binary --exec_enable || exit 3
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0016/file_write.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \
-o test/results/test0016-x86-binary \
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "x86" ]

View File

@ -18,30 +18,36 @@
set -ex
# Build the test
bin/M2-Planet --architecture aarch64 \
bin/M2-Planet \
--architecture aarch64 \
-f M2libc/AArch64/Linux/unistd.h \
-f M2libc/stdlib.c \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0017/memset.c \
-o test/test0017/memset.M1 || exit 1
-o test/test0017/memset.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 -f M2libc/AArch64/aarch64_defs.M1 \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0017/memset.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0017/memset.hex2 || exit 2
-o test/test0017/memset.hex2 \
|| exit 2
# Resolve all linkages
hex2 -f M2libc/AArch64/ELF-aarch64.hex2 \
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0017/memset.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \
-o test/results/test0017-aarch64-binary \
--exec_enable || exit 3
--exec_enable \
|| exit 3
# Ensure binary works if host machine supports test
if [ "$(get_machine ${GET_MACHINE_FLAGS})" = "aarch64" ]

Some files were not shown because too many files have changed in this diff Show More