diff --git a/src/codegen/arm/assembler.cpp b/src/codegen/arm/assembler.cpp index ac00fdb5cb..511f7ccc32 100644 --- a/src/codegen/arm/assembler.cpp +++ b/src/codegen/arm/assembler.cpp @@ -60,11 +60,9 @@ const unsigned StackAlignmentInBytes = 8; const unsigned StackAlignmentInWords = StackAlignmentInBytes / TargetBytesPerWord; -void -resolve(MyBlock*); +void resolve(MyBlock*); -unsigned -padding(MyBlock*, unsigned); +unsigned padding(MyBlock*, unsigned); class ConstantPoolEntry; diff --git a/src/codegen/powerpc/assembler.cpp b/src/codegen/powerpc/assembler.cpp index 39405769bf..cda4fdbc96 100644 --- a/src/codegen/powerpc/assembler.cpp +++ b/src/codegen/powerpc/assembler.cpp @@ -178,12 +178,6 @@ resolve(MyBlock* b) using namespace isa; -inline void -write4(uint8_t* dst, uint32_t v) -{ - memcpy(dst, &v, 4); -} - // END OPERATION COMPILERS unsigned diff --git a/src/codegen/powerpc/fixup.cpp b/src/codegen/powerpc/fixup.cpp index eb8a4aac6d..06075c00e6 100644 --- a/src/codegen/powerpc/fixup.cpp +++ b/src/codegen/powerpc/fixup.cpp @@ -21,7 +21,7 @@ using namespace isa; unsigned padding(MyBlock*, unsigned); -inline int ha16(int32_t i); +int ha16(int32_t i); bool bounded(int right, int left, int32_t v) { return ((v << left) >> left) == v and ((v >> right) << right) == v; diff --git a/src/codegen/x86/assembler.cpp b/src/codegen/x86/assembler.cpp index 79b5377959..a568430f91 100644 --- a/src/codegen/x86/assembler.cpp +++ b/src/codegen/x86/assembler.cpp @@ -8,25 +8,36 @@ There is NO WARRANTY for this software. See license.txt for details. */ +#include +#include +#include + #include "environment.h" #include "target.h" #include "alloc-vector.h" - -#include -#include - -#include "codegen/x86/context.h" -#include "codegen/x86/block.h" -#include "codegen/x86/fixup.h" -#include "codegen/x86/padding.h" -#include "codegen/x86/registers.h" -#include "codegen/x86/encode.h" -#include "codegen/x86/operations.h" -#include "codegen/x86/detect.h" -#include "codegen/x86/multimethod.h" +#include "common.h" +#include "allocator.h" +#include "zone.h" #include #include +#include + +#include +#include +#include +#include + +#include + +#include "context.h" +#include "block.h" +#include "fixup.h" +#include "padding.h" +#include "registers.h" +#include "operations.h" +#include "detect.h" +#include "multimethod.h" #define CAST1(x) reinterpret_cast(x) #define CAST2(x) reinterpret_cast(x) diff --git a/src/codegen/x86/block.cpp b/src/codegen/x86/block.cpp index 97bac8dbf1..5c2b125283 100644 --- a/src/codegen/x86/block.cpp +++ b/src/codegen/x86/block.cpp @@ -8,8 +8,9 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include "codegen/x86/block.h" -#include "common.h" +#include "block.h" + +#include namespace avian { namespace codegen { diff --git a/src/codegen/x86/context.cpp b/src/codegen/x86/context.cpp index 4c996f2b75..88de52a2d1 100644 --- a/src/codegen/x86/context.cpp +++ b/src/codegen/x86/context.cpp @@ -8,8 +8,11 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include "codegen/x86/context.h" -#include "codegen/x86/block.h" +#include "allocator.h" +#include "zone.h" + +#include "context.h" +#include "block.h" namespace avian { namespace codegen { diff --git a/src/codegen/x86/context.h b/src/codegen/x86/context.h index d85eb58758..ce1a3c1e70 100644 --- a/src/codegen/x86/context.h +++ b/src/codegen/x86/context.h @@ -15,9 +15,14 @@ #define CAST2(x) reinterpret_cast(x) #define CAST_BRANCH(x) reinterpret_cast(x) +#include + +#include "alloc-vector.h" + #include #include -#include "alloc-vector.h" + +#include namespace vm { class System; diff --git a/src/codegen/x86/detect.cpp b/src/codegen/x86/detect.cpp index eaf6af54ac..9f154aff0a 100644 --- a/src/codegen/x86/detect.cpp +++ b/src/codegen/x86/detect.cpp @@ -9,8 +9,9 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include "codegen/x86/context.h" -#include "codegen/x86/block.h" +#include "target.h" + +#include "context.h" namespace avian { namespace codegen { diff --git a/src/codegen/x86/encode.cpp b/src/codegen/x86/encode.cpp index 8293550be6..730d71fdc9 100644 --- a/src/codegen/x86/encode.cpp +++ b/src/codegen/x86/encode.cpp @@ -9,11 +9,18 @@ details. */ #include "target.h" +#include "alloc-vector.h" -#include "codegen/x86/context.h" -#include "codegen/x86/encode.h" -#include "codegen/x86/registers.h" -#include "codegen/x86/fixup.h" +#include +#include + +#include +#include + +#include "context.h" +#include "encode.h" +#include "registers.h" +#include "fixup.h" using namespace avian::util; diff --git a/src/codegen/x86/encode.h b/src/codegen/x86/encode.h index e8fb3f9d7f..853d7324e4 100644 --- a/src/codegen/x86/encode.h +++ b/src/codegen/x86/encode.h @@ -11,12 +11,20 @@ #ifndef AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H #define AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H -#include -#include "codegen/x86/registers.h" +#include + +#include "common.h" + +#include + +#include "registers.h" namespace avian { namespace codegen { namespace x86 { + +class Context; + void maybeRex(Context* c, unsigned size, int a, int index, int base, bool always); void maybeRex(Context* c, unsigned size, lir::Register* a, lir::Register* b); diff --git a/src/codegen/x86/fixup.cpp b/src/codegen/x86/fixup.cpp index d914a22bdb..5e85d7c062 100644 --- a/src/codegen/x86/fixup.cpp +++ b/src/codegen/x86/fixup.cpp @@ -8,12 +8,20 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include - -#include "codegen/x86/context.h" -#include "codegen/x86/fixup.h" -#include "codegen/x86/padding.h" -#include "codegen/x86/block.h" +#include + +#include "allocator.h" +#include "alloc-vector.h" +#include "common.h" +#include "zone.h" + +#include +#include + +#include "context.h" +#include "fixup.h" +#include "padding.h" +#include "block.h" namespace avian { namespace codegen { diff --git a/src/codegen/x86/fixup.h b/src/codegen/x86/fixup.h index 2bf8ff3481..78f77b3044 100644 --- a/src/codegen/x86/fixup.h +++ b/src/codegen/x86/fixup.h @@ -11,17 +11,19 @@ #ifndef AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H #define AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H +#include + +#include + namespace vm { class System; } namespace avian { namespace codegen { - -class Promise; - namespace x86 { +class Context; class MyBlock; class AlignmentPadding; diff --git a/src/codegen/x86/multimethod.cpp b/src/codegen/x86/multimethod.cpp index 5c4663c7f9..f0ad4621b2 100644 --- a/src/codegen/x86/multimethod.cpp +++ b/src/codegen/x86/multimethod.cpp @@ -10,11 +10,13 @@ #include "common.h" +#include + #include -#include "codegen/x86/context.h" -#include "codegen/x86/multimethod.h" -#include "codegen/x86/operations.h" +#include "context.h" +#include "multimethod.h" +#include "operations.h" namespace avian { namespace codegen { diff --git a/src/codegen/x86/multimethod.h b/src/codegen/x86/multimethod.h index 5a73850f29..6ede17f17a 100644 --- a/src/codegen/x86/multimethod.h +++ b/src/codegen/x86/multimethod.h @@ -11,6 +11,10 @@ #ifndef AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H #define AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H +#include "common.h" + +#include + namespace avian { namespace codegen { namespace x86 { diff --git a/src/codegen/x86/operations.cpp b/src/codegen/x86/operations.cpp index 56eb77c127..60d33adedc 100644 --- a/src/codegen/x86/operations.cpp +++ b/src/codegen/x86/operations.cpp @@ -8,13 +8,25 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include "codegen/x86/context.h" -#include "codegen/x86/encode.h" -#include "codegen/x86/registers.h" -#include "codegen/x86/detect.h" -#include "codegen/x86/operations.h" -#include "codegen/x86/padding.h" -#include "codegen/x86/fixup.h" +#include + +#include "target.h" +#include "alloc-vector.h" +#include "allocator.h" +#include "zone.h" + +#include + +#include +#include + +#include "context.h" +#include "encode.h" +#include "registers.h" +#include "detect.h" +#include "operations.h" +#include "padding.h" +#include "fixup.h" using namespace avian::util; diff --git a/src/codegen/x86/operations.h b/src/codegen/x86/operations.h index 52d0d8dc0f..2b5081591c 100644 --- a/src/codegen/x86/operations.h +++ b/src/codegen/x86/operations.h @@ -11,6 +11,12 @@ #ifndef AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H #define AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H +#include "common.h" + +#include + +#include "context.h" + namespace avian { namespace codegen { namespace x86 { diff --git a/src/codegen/x86/padding.cpp b/src/codegen/x86/padding.cpp index 7873145bb4..e31e8626e9 100644 --- a/src/codegen/x86/padding.cpp +++ b/src/codegen/x86/padding.cpp @@ -8,12 +8,11 @@ There is NO WARRANTY for this software. See license.txt for details. */ -#include +#include "alloc-vector.h" -#include "codegen/x86/context.h" -#include "codegen/x86/fixup.h" -#include "codegen/x86/padding.h" -#include "codegen/x86/block.h" +#include "context.h" +#include "padding.h" +#include "block.h" namespace avian { namespace codegen { diff --git a/src/codegen/x86/padding.h b/src/codegen/x86/padding.h index 32fc358142..ef9f834f18 100644 --- a/src/codegen/x86/padding.h +++ b/src/codegen/x86/padding.h @@ -15,6 +15,7 @@ namespace avian { namespace codegen { namespace x86 { +class Context; class AlignmentPadding { public: