tests: support for make -j

For any test there's a directory with a script for each architecture.

These scripts generate intermediate files in the dir during compilation,
with the same names no matter the arch. So if one tries to execute the
scripts in parallel they all fight for the files.

To allow for parallel testing, now we create a temporal dir named after
the arch to isolate the intermediate files. Scripts are patched
accordingly.

This also allows easier clean-up: now, removing the temporal dirs is
almost all that we need (and the per-test .gitignore files are replaced
with a couple of lines in test/.gitignore). A common script replaces
the per-test cleanup.sh. It gets the number of the test as an argument
and takes care of some minor special cases. The makefile is adapted to
use this new test/cleanup_test.sh script.

Those special files are created during the last stage of each test, but
only if the host arch matches the test. They're _not_ isolated here
because it's harder (due to how we do the checksum) and they cannot
collide unless emulation is used and several calls to make are made at
the same time.
This commit is contained in:
deesix 2021-01-12 00:00:00 +01:00
parent 3aa8327334
commit 9f26dbcc68
256 changed files with 1881 additions and 2406 deletions

View File

@ -1,5 +1,5 @@
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -70,40 +70,40 @@ M2-minimal: bin results cc.h cc_reader.c cc_strings.c cc_types.c cc_core.c cc-mi
.PHONY: clean
clean:
rm -rf bin/ test/results/
./test/test0000/cleanup.sh
./test/test0001/cleanup.sh
./test/test0002/cleanup.sh
./test/test0003/cleanup.sh
./test/test0004/cleanup.sh
./test/test0005/cleanup.sh
./test/test0006/cleanup.sh
./test/test0007/cleanup.sh
./test/test0008/cleanup.sh
./test/test0009/cleanup.sh
./test/test0010/cleanup.sh
./test/test0011/cleanup.sh
./test/test0012/cleanup.sh
./test/test0013/cleanup.sh
./test/test0014/cleanup.sh
./test/test0015/cleanup.sh
./test/test0016/cleanup.sh
./test/test0017/cleanup.sh
./test/test0018/cleanup.sh
./test/test0019/cleanup.sh
./test/test0020/cleanup.sh
./test/test0021/cleanup.sh
./test/test0022/cleanup.sh
./test/test0023/cleanup.sh
./test/test0024/cleanup.sh
./test/test0025/cleanup.sh
./test/test0100/cleanup.sh
./test/test0101/cleanup.sh
./test/test0102/cleanup.sh
./test/test0103/cleanup.sh
./test/test0104/cleanup.sh
./test/test0105/cleanup.sh
./test/test0106/cleanup.sh
./test/test1000/cleanup.sh
./test/cleanup_test.sh 0000
./test/cleanup_test.sh 0001
./test/cleanup_test.sh 0002
./test/cleanup_test.sh 0003
./test/cleanup_test.sh 0004
./test/cleanup_test.sh 0005
./test/cleanup_test.sh 0006
./test/cleanup_test.sh 0007
./test/cleanup_test.sh 0008
./test/cleanup_test.sh 0009
./test/cleanup_test.sh 0010
./test/cleanup_test.sh 0011
./test/cleanup_test.sh 0012
./test/cleanup_test.sh 0013
./test/cleanup_test.sh 0014
./test/cleanup_test.sh 0015
./test/cleanup_test.sh 0016
./test/cleanup_test.sh 0017
./test/cleanup_test.sh 0018
./test/cleanup_test.sh 0019
./test/cleanup_test.sh 0020
./test/cleanup_test.sh 0021
./test/cleanup_test.sh 0022
./test/cleanup_test.sh 0023
./test/cleanup_test.sh 0024
./test/cleanup_test.sh 0025
./test/cleanup_test.sh 0100
./test/cleanup_test.sh 0101
./test/cleanup_test.sh 0102
./test/cleanup_test.sh 0103
./test/cleanup_test.sh 0104
./test/cleanup_test.sh 0105
./test/cleanup_test.sh 0106
./test/cleanup_test.sh 1000
# Directories
bin:

9
test/.gitignore vendored
View File

@ -1,4 +1,5 @@
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -13,5 +14,13 @@
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore all generated contents of tests
results/
test????/tmp-*/
test????/proof
test0106/cc1
test0106/cc2
# A place to put a good run for comparison
test????/actual.M1

View File

@ -1,5 +1,5 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -15,6 +15,16 @@
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0003/constant.M1
rm -f test/test0003/constant.hex2
for ARCH in aarch64 amd64 armv7l knight-native knight-posix x86; do
rm -rf "test/test$1/tmp-$ARCH"
done
# Not all, but most tests generate a 'proof' file.
rm -f "test/test$1/proof"
# Test 0106 generates these two files when the host is x86.
if [ "0106" = "$1" ] ; then
rm -f "test/test$1/cc1" "test/test$1/cc2"
fi
exit 0

View File

@ -1,21 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,19 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0000/return.M1
rm -f test/test0000/return.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-core.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture amd64 \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/amd64/amd64_defs.M1 \
-f M2libc/amd64/libc-core.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/amd64/ELF-amd64.hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture armv7l \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,26 +17,30 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x0 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-posix \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x0 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0000/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture x86 \
-f test/test0000/return.c \
-o test/test0000/return.M1 \
-o ${TMPDIR}/return.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/x86/x86_defs.M1 \
-f M2libc/x86/libc-core.M1 \
-f test/test0000/return.M1 \
-f ${TMPDIR}/return.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0000/return.hex2 \
-o ${TMPDIR}/return.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/x86/ELF-i386.hex2 \
-f test/test0000/return.hex2 \
-f ${TMPDIR}/return.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,21 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0001/library_call.M1
rm -f test/test0001/library_call.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0001/library_call.c \
-o test/test0001/library_call.M1 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x0 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x0 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0001/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/library_call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0001/library_call.M1 \
-f ${TMPDIR}/library_call.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0001/library_call.hex2 \
-o ${TMPDIR}/library_call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0001/library_call.hex2 \
-f ${TMPDIR}/library_call.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0002/if.M1
rm -f test/test0002/if.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0002/if.c \
-o test/test0002/if.M1 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0002/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/if.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0002/if.M1 \
-f ${TMPDIR}/if.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0002/if.hex2 \
-o ${TMPDIR}/if.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0002/if.hex2 \
-f ${TMPDIR}/if.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0003/constant.c \
-o test/test0003/constant.M1 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0003/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/constant.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0003/constant.M1 \
-f ${TMPDIR}/constant.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0003/constant.hex2 \
-o ${TMPDIR}/constant.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0003/constant.hex2 \
-f ${TMPDIR}/constant.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0004/call.M1
rm -f test/test0004/call.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0004/call.c \
-o test/test0004/call.M1 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0004/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/call.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0004/call.M1 \
-f ${TMPDIR}/call.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0004/call.hex2 \
-o ${TMPDIR}/call.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0004/call.hex2 \
-f ${TMPDIR}/call.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0005/string.M1
rm -f test/test0005/string.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0005/string.c \
-o test/test0005/string.M1 \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0005/string.M1 \
-f ${TMPDIR}/string.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0005/string.M1 \
-f ${TMPDIR}/string.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture armv7l \
@ -23,29 +28,29 @@ bin/M2-Planet \
-f test/common_armv7l/functions/exit.c \
-f test/test0005/string.c \
--debug \
-o test/test0005/string.M1 \
-o ${TMPDIR}/string.M1 \
|| exit 1
blood-elf \
-f test/test0005/string.M1 \
-o test/test0005/string-footer.M1 \
-f ${TMPDIR}/string.M1 \
-o ${TMPDIR}/string-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
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 \
-f ${TMPDIR}/string.M1 \
-f ${TMPDIR}/string-footer.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 3
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l-debug.hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0005/string.c \
-o test/test0005/string.M1 \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0005/string.M1 \
-f ${TMPDIR}/string.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0005/string.M1 \
-f ${TMPDIR}/string.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0005/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/string.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0005/string.M1 \
-f ${TMPDIR}/string.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0005/string.hex2 \
-o ${TMPDIR}/string.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0005/string.hex2 \
-f ${TMPDIR}/string.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,23 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
for.M1
for.hex2
proof
# A place to put a good run for comparison
actual.M1

View File

@ -1,21 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0006/for.M1
rm -f test/test0006/for.hex2
rm -f test/test0006/proof
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture amd64 \
-f test/common_amd64/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture armv7l \
-f test/common_armv7l/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,27 +17,31 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-posix \
-f test/common_knight/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0006/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture x86 \
-f test/common_x86/functions/putchar.c \
-f test/test0006/for.c \
-o test/test0006/for.M1 \
-o ${TMPDIR}/for.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0006/for.M1 \
-f ${TMPDIR}/for.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0006/for.hex2 \
-o ${TMPDIR}/for.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0006/for.hex2 \
-f ${TMPDIR}/for.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,23 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
proof
# A place to put a good run for comparison
actual.M1

View File

@ -1,21 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0007/do.M1
rm -f test/test0007/do.hex2
rm -f test/test0007/proof
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -26,15 +30,15 @@ bin/M2-Planet \
-f M2libc/stdio.c \
-f test/test0007/do.c \
--debug \
-o test/test0007/do.M1 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Build debug footer
blood-elf \
--64 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--entry _start \
-o test/test0007/do-footer.M1 \
-o ${TMPDIR}/do-footer.M1 \
|| exit 2
@ -42,17 +46,17 @@ blood-elf \
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0007/do.M1 \
-f test/test0007/do-footer.M1 \
-f ${TMPDIR}/do.M1 \
-f ${TMPDIR}/do-footer.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64-debug.hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0007/do.c \
-o test/test0007/do.M1 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0007/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0007/do.M1 \
-f ${TMPDIR}/do.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0007/do.hex2 \
-o ${TMPDIR}/do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0007/do.hex2 \
-f ${TMPDIR}/do.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0008/struct.M1
rm -f test/test0008/struct.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -26,32 +30,32 @@ bin/M2-Planet \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--debug \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Build debug footer
blood-elf \
--64 \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 \
-o ${TMPDIR}/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
-f ${TMPDIR}/struct.M1 \
-f ${TMPDIR}/struct-footer.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64-debug.hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture amd64 \
@ -25,32 +30,32 @@ bin/M2-Planet \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--debug \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Build debug footer
blood-elf \
--64 \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 \
-o ${TMPDIR}/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/amd64/amd64_defs.M1 \
-f M2libc/amd64/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
-f ${TMPDIR}/struct.M1 \
-f ${TMPDIR}/struct-footer.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/amd64/ELF-amd64-debug.hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture armv7l \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_armv7l/functions/malloc.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
@ -24,22 +29,22 @@ bin/M2-Planet \
-f test/common_knight/functions/malloc.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-posix \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_knight/functions/malloc.c \
-f test/test0008/struct.c \
--bootstrap-mode \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0008/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture x86 \
@ -25,31 +30,31 @@ bin/M2-Planet \
-f M2libc/stdio.c \
-f test/test0008/struct.c \
--debug \
-o test/test0008/struct.M1 \
-o ${TMPDIR}/struct.M1 \
|| exit 1
# Build debug footer
blood-elf \
-f test/test0008/struct.M1 \
-f ${TMPDIR}/struct.M1 \
--entry _start \
-o test/test0008/struct-footer.M1 \
-o ${TMPDIR}/struct-footer.M1 \
|| exit 2
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/x86/x86_defs.M1 \
-f M2libc/x86/libc-full.M1 \
-f test/test0008/struct.M1 \
-f test/test0008/struct-footer.M1 \
-f ${TMPDIR}/struct.M1 \
-f ${TMPDIR}/struct-footer.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0008/struct.hex2 \
-o ${TMPDIR}/struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386-debug.hex2 \
-f test/test0008/struct.hex2 \
-f ${TMPDIR}/struct.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0009/goto.M1
rm -f test/test0009/goto.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0009/goto.c \
-o test/test0009/goto.M1 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0009/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/goto.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0009/goto.M1 \
-f ${TMPDIR}/goto.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0009/goto.hex2 \
-o ${TMPDIR}/goto.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0009/goto.hex2 \
-f ${TMPDIR}/goto.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,22 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
# A place to put a good run for comparison
actual.M1

View File

@ -1,20 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0010/nested_struct.M1
rm -f test/test0010/nested_struct.hex2
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0010/nested_struct.c \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture amd64 \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_amd64/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture armv7l \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_armv7l/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
@ -24,22 +29,22 @@ bin/M2-Planet \
-f test/common_knight/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-posix \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_knight/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -x
TMPDIR="test/test0010/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture x86 \
@ -24,23 +29,23 @@ bin/M2-Planet \
-f test/common_x86/functions/malloc.c \
-f test/test0010/nested_struct.c \
--bootstrap-mode \
-o test/test0010/nested_struct.M1 \
-o ${TMPDIR}/nested_struct.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0010/nested_struct.M1 \
-f ${TMPDIR}/nested_struct.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0010/nested_struct.hex2 \
-o ${TMPDIR}/nested_struct.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0010/nested_struct.hex2 \
-f ${TMPDIR}/nested_struct.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,23 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
proof
# A place to put a good run for comparison
actual.M1

View File

@ -1,21 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0011/break-do.M1
rm -f test/test0011/break-do.hex2
rm -f test/test0011/proof
exit 0

View File

@ -1,6 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2020 deesix <deesix@tuta.io>
## Copyright (C) 2020-2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -17,6 +17,10 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-aarch64"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture aarch64 \
@ -25,23 +29,23 @@ bin/M2-Planet \
-f M2libc/AArch64/Linux/fcntl.h \
-f M2libc/stdio.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f M2libc/AArch64/aarch64_defs.M1 \
-f M2libc/AArch64/libc-full.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--LittleEndian \
--architecture aarch64 \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f M2libc/AArch64/ELF-aarch64.hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--LittleEndian \
--architecture aarch64 \
--BaseAddress 0x400000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-amd64"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_amd64/amd64_defs.M1 \
-f test/common_amd64/libc-core.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--LittleEndian \
--architecture amd64 \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_amd64/ELF-amd64.hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--LittleEndian \
--architecture amd64 \
--BaseAddress 0x00600000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-armv7l"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_armv7l/armv7l_defs.M1 \
-f test/common_armv7l/libc-core.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--LittleEndian \
--architecture armv7l \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_armv7l/ELF-armv7l.hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--LittleEndian \
--architecture armv7l \
--BaseAddress 0x10000 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,28 +17,32 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-knight-native"
mkdir -p ${TMPDIR}
# Build the test
bin/M2-Planet \
--architecture knight-native \
-f test/common_knight/functions/putchar-native.c \
-f test/common_knight/functions/exit-native.c \
-f test/test0011/break-do.c \
-o test/test0011/break-do.M1 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight-native_defs.M1 \
-f test/common_knight/libc-native.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--BigEndian \
--architecture knight-native \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--BigEndian \
--architecture knight-native \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-knight-posix"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_knight/knight_defs.M1 \
-f test/common_knight/libc-core.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--BigEndian \
--architecture knight-posix \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_knight/ELF-knight.hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--BigEndian \
--architecture knight-posix \
--BaseAddress 0x00 \

View File

@ -1,5 +1,6 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## Copyright (C) 2021 deesix <deesix@tuta.io>
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
@ -16,29 +17,33 @@
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
set -ex
TMPDIR="test/test0011/tmp-x86"
mkdir -p ${TMPDIR}
# Build the test
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 \
-o ${TMPDIR}/break-do.M1 \
|| exit 1
# Macro assemble with libc written in M1-Macro
M1 \
-f test/common_x86/x86_defs.M1 \
-f test/common_x86/libc-core.M1 \
-f test/test0011/break-do.M1 \
-f ${TMPDIR}/break-do.M1 \
--LittleEndian \
--architecture x86 \
-o test/test0011/break-do.hex2 \
-o ${TMPDIR}/break-do.hex2 \
|| exit 2
# Resolve all linkages
hex2 \
-f test/common_x86/ELF-i386.hex2 \
-f test/test0011/break-do.hex2 \
-f ${TMPDIR}/break-do.hex2 \
--LittleEndian \
--architecture x86 \
--BaseAddress 0x8048000 \

View File

@ -1,23 +0,0 @@
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
# Ignore the files created by script
*.M1
*.hex2
proof
# A place to put a good run for comparison
actual.M1

View File

@ -1,21 +0,0 @@
#! /bin/sh
## Copyright (C) 2017 Jeremiah Orians
## This file is part of M2-Planet.
##
## M2-Planet is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## M2-Planet is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with M2-Planet. If not, see <http://www.gnu.org/licenses/>.
rm -f test/test0012/break-for.M1
rm -f test/test0012/break-for.hex2
rm -f test/test0012/proof
exit 0

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