From c6a04002384221cbd6f8bc3fe83b7d1d4b6a2832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Tup=C3=BD?= Date: Sun, 18 Feb 2024 19:43:46 +0100 Subject: [PATCH] Updated submodules to the latest versions. --- source/compiler/test/main.s | 37 +------------------ .../target/arch/architecture.h | 2 +- .../target/outputs/coff.cpp | 2 +- source/tests/main.cpp | 2 +- source/utility | 2 +- 5 files changed, 6 insertions(+), 39 deletions(-) diff --git a/source/compiler/test/main.s b/source/compiler/test/main.s index ee43ee4..b895877 100644 --- a/source/compiler/test/main.s +++ b/source/compiler/test/main.s @@ -12,40 +12,7 @@ // - add namespaces to messages, whenever applicable (ie. x::y::test) // - BUGS: -struct nested { - u8 a; - u64 b; - u32 c; -}; - -struct complex { - nested nest; - u32 x; - u16 y; -}; - -struct container { - complex comp; - u64 z; -}; - -void print(container cont) { - printf("Values: %llu %u %u %u %hu %llu\n", cont.comp.nest.b, cont.comp.nest.c, cont.comp.x, cont.comp.nest.a, cont.comp.y, cont.z); -} - u64 main() { - container a; - - a.comp.nest.a = 10; - a.comp.nest.b = 123456789012345; - a.comp.nest.c = 3000; - a.comp.x = 100; - a.comp.y = 50; - a.z = 99999; - - printf("Values: %llu %u %u %u %hu %llu\n", a.comp.nest.b, a.comp.nest.c, a.comp.x, a.comp.nest.a, a.comp.y, a.z); - print(a); - printf("Values: %llu %u %u %u %hu %llu\n", a.comp.nest.b, a.comp.nest.c, a.comp.x, a.comp.nest.a, a.comp.y, a.z); - - ret 0; + printf("abcd\n"); + ret 0; } diff --git a/source/intermediate_representation/target/arch/architecture.h b/source/intermediate_representation/target/arch/architecture.h index c38e563..969f80b 100644 --- a/source/intermediate_representation/target/arch/architecture.h +++ b/source/intermediate_representation/target/arch/architecture.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include "intermediate_representation/codegen/codegen_context.h" diff --git a/source/intermediate_representation/target/outputs/coff.cpp b/source/intermediate_representation/target/outputs/coff.cpp index 56b6f0b..a3addb6 100644 --- a/source/intermediate_representation/target/outputs/coff.cpp +++ b/source/intermediate_representation/target/outputs/coff.cpp @@ -230,7 +230,7 @@ namespace sigma::ir { for (const init_object& object : global->objects) { u64 actual_pos = global->position + object.offset; - if (object.type == init_object::RELOCATION) { + if(object.type == init_object::RELOCATION) { *relocations_ptr++ = coff_image_relocation{ .virtual_address = static_cast(actual_pos), .symbol_table_index = static_cast(object.relocation->id), diff --git a/source/tests/main.cpp b/source/tests/main.cpp index fc09eaf..c0c2f72 100644 --- a/source/tests/main.cpp +++ b/source/tests/main.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/source/utility b/source/utility index 20d0c9c..be4b52e 160000 --- a/source/utility +++ b/source/utility @@ -1 +1 @@ -Subproject commit 20d0c9cd026df1785aab61d6ade73eef92b158be +Subproject commit be4b52e4e8a5060c726a4dc61f6b34f2627af4da