From da050c082cf83806e83c2a8043d58362e0a6e4be Mon Sep 17 00:00:00 2001 From: ProgramSnail Date: Sun, 3 Nov 2024 12:52:25 +0300 Subject: [PATCH] build fixes --- byterun/.gitignore | 4 ++-- byterun/dune | 3 ++- byterun/include/runtime_externs.h | 2 -- byterun/src/interpreter.c | 6 +++--- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/byterun/.gitignore b/byterun/.gitignore index 551995343..b53f86413 100644 --- a/byterun/.gitignore +++ b/byterun/.gitignore @@ -1,4 +1,5 @@ -/byterun.exe +byterun.exe +byterun build/ .xmake/ @@ -8,4 +9,3 @@ compile_commands.json .cache/ *.a *.o -byterun diff --git a/byterun/dune b/byterun/dune index 24b025a52..27655b0ba 100644 --- a/byterun/dune +++ b/byterun/dune @@ -1,6 +1,7 @@ (rule (target byterun.exe) (deps + (:include (source_tree include)) (:main src/cli.c src/interpreter.c) (:parser src/parser.c) (:utils src/utils.c src/types.c src/stack.c) @@ -8,4 +9,4 @@ (mode (promote (until-clean))) (action - (run gcc -g -Iinclude/ %{main} %{runtime} -o %{target}))) + (run gcc -Iinclude/ -g %{main} %{parser} %{utils} %{runtime} -o %{target}))) diff --git a/byterun/include/runtime_externs.h b/byterun/include/runtime_externs.h index 9d3cf7e3b..aee167767 100644 --- a/byterun/include/runtime_externs.h +++ b/byterun/include/runtime_externs.h @@ -14,8 +14,6 @@ #include "../../runtime/runtime_common.h" -#define WORD_SIZE (CHAR_BIT * sizeof(int)) - // --- void Lassert(void *f, char *s, ...); diff --git a/byterun/src/interpreter.c b/byterun/src/interpreter.c index 4ae206cac..8874bb998 100644 --- a/byterun/src/interpreter.c +++ b/byterun/src/interpreter.c @@ -92,12 +92,12 @@ void run(bytefile *bf) { Bsexp((aint*)s.sp, ip_read_int(&s.ip)); // TODO: check order break; - case 3: // STI + case 3: // STI - write by ref (?) // TODO break; - case 4: // STA - // TODO + case 4: // STA - write to array elem + // Bsta // TODO break; case 5: // JMP 0x%.8x