From d8d9dfa855c83fe52c7b8d26ef1f52dafdec8fa0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 31 Mar 2021 23:16:01 -0700 Subject: some hacky checks for common errors They're not really baked into the regular compilation process; I have to remember to run them if I see strange behavior. --- misc_checks | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 misc_checks (limited to 'misc_checks') diff --git a/misc_checks b/misc_checks new file mode 100755 index 00000000..91384ea3 --- /dev/null +++ b/misc_checks @@ -0,0 +1,22 @@ +#!/bin/sh +# Hackily check for certain kinds of errors. +# +# We still rely exclusively on linux/bootstrap/bootstrap for some static +# checks on bare SubX code that aren't implemented yet in the self-hosted +# translator phases. +# +# However, boot.subx uses instructions that bootstrap doesn't recognize. So we +# won't check it. + +set -e + +cat $* [0-9]*.mu |linux/mu > a.subx + +cat misc_checks.subx mu-init.subx [0-9]*.subx a.subx |linux/braces > a.braces +cat a.braces |linux/calls > a.calls +cat a.calls |linux/sigils > a.sigils + +CXXFLAGS=-g linux/bootstrap/bootstrap --debug translate a.sigils -o a.elf +# Translation will never succeed, +# but if we get to "missing reference to global" errors, they're expected and +# we've gotten to the end of what bootstrap can check for us. -- cgit 1.4.1-2-gfad0