Skip to content

Commit

Permalink
Updated submodules to the latest versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Goubermouche committed Feb 18, 2024
1 parent 5327c80 commit c6a0400
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 39 deletions.
37 changes: 2 additions & 35 deletions source/compiler/test/main.s
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <utility/containers/byte_buffer.h>
#include <utility/string/const_string.h>
#include <utility/string/string_view.h>

#include "intermediate_representation/codegen/codegen_context.h"

Expand Down
2 changes: 1 addition & 1 deletion source/intermediate_representation/target/outputs/coff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>(actual_pos),
.symbol_table_index = static_cast<u32>(object.relocation->id),
Expand Down
2 changes: 1 addition & 1 deletion source/tests/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <parametric/parametric.h>
#include <utility/filesystem/filesystem.h>
#include <utility/string/const_string.h>
#include <utility/string/string_view.h>
#include <utility/diagnostics.h>
#include <utility/shell.h>

Expand Down

0 comments on commit c6a0400

Please sign in to comment.