mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
fix include-what-you-use violations in x86 assembler
This commit is contained in:
parent
900b447e27
commit
3d1ae1d517
@ -60,11 +60,9 @@ const unsigned StackAlignmentInBytes = 8;
|
|||||||
const unsigned StackAlignmentInWords
|
const unsigned StackAlignmentInWords
|
||||||
= StackAlignmentInBytes / TargetBytesPerWord;
|
= StackAlignmentInBytes / TargetBytesPerWord;
|
||||||
|
|
||||||
void
|
void resolve(MyBlock*);
|
||||||
resolve(MyBlock*);
|
|
||||||
|
|
||||||
unsigned
|
unsigned padding(MyBlock*, unsigned);
|
||||||
padding(MyBlock*, unsigned);
|
|
||||||
|
|
||||||
class ConstantPoolEntry;
|
class ConstantPoolEntry;
|
||||||
|
|
||||||
|
@ -178,12 +178,6 @@ resolve(MyBlock* b)
|
|||||||
|
|
||||||
using namespace isa;
|
using namespace isa;
|
||||||
|
|
||||||
inline void
|
|
||||||
write4(uint8_t* dst, uint32_t v)
|
|
||||||
{
|
|
||||||
memcpy(dst, &v, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
// END OPERATION COMPILERS
|
// END OPERATION COMPILERS
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
@ -21,7 +21,7 @@ using namespace isa;
|
|||||||
|
|
||||||
unsigned padding(MyBlock*, unsigned);
|
unsigned padding(MyBlock*, unsigned);
|
||||||
|
|
||||||
inline int ha16(int32_t i);
|
int ha16(int32_t i);
|
||||||
|
|
||||||
bool bounded(int right, int left, int32_t v) {
|
bool bounded(int right, int left, int32_t v) {
|
||||||
return ((v << left) >> left) == v and ((v >> right) << right) == v;
|
return ((v << left) >> left) == v and ((v >> right) << right) == v;
|
||||||
|
@ -8,25 +8,36 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "alloc-vector.h"
|
#include "alloc-vector.h"
|
||||||
|
#include "common.h"
|
||||||
#include <avian/vm/codegen/assembler.h>
|
#include "allocator.h"
|
||||||
#include <avian/vm/codegen/registers.h>
|
#include "zone.h"
|
||||||
|
|
||||||
#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 <avian/util/runtime-array.h>
|
#include <avian/util/runtime-array.h>
|
||||||
#include <avian/util/abort.h>
|
#include <avian/util/abort.h>
|
||||||
|
#include <avian/util/math.h>
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/assembler.h>
|
||||||
|
#include <avian/vm/codegen/registers.h>
|
||||||
|
#include <avian/vm/codegen/lir.h>
|
||||||
|
#include <avian/vm/codegen/promise.h>
|
||||||
|
|
||||||
|
#include <avian/vm/system/system.h>
|
||||||
|
|
||||||
|
#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<UnaryOperationType>(x)
|
#define CAST1(x) reinterpret_cast<UnaryOperationType>(x)
|
||||||
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
|
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
|
||||||
|
@ -8,8 +8,9 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include "codegen/x86/block.h"
|
#include "block.h"
|
||||||
#include "common.h"
|
|
||||||
|
#include <avian/vm/codegen/assembler.h>
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -8,8 +8,11 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include "allocator.h"
|
||||||
#include "codegen/x86/block.h"
|
#include "zone.h"
|
||||||
|
|
||||||
|
#include "context.h"
|
||||||
|
#include "block.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -15,9 +15,14 @@
|
|||||||
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
|
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
|
||||||
#define CAST_BRANCH(x) reinterpret_cast<BranchOperationType>(x)
|
#define CAST_BRANCH(x) reinterpret_cast<BranchOperationType>(x)
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "alloc-vector.h"
|
||||||
|
|
||||||
#include <avian/vm/codegen/lir.h>
|
#include <avian/vm/codegen/lir.h>
|
||||||
#include <avian/vm/codegen/assembler.h>
|
#include <avian/vm/codegen/assembler.h>
|
||||||
#include "alloc-vector.h"
|
|
||||||
|
#include <avian/vm/system/system.h>
|
||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
class System;
|
class System;
|
||||||
|
@ -9,8 +9,9 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include "target.h"
|
||||||
#include "codegen/x86/block.h"
|
|
||||||
|
#include "context.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -9,11 +9,18 @@
|
|||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
#include "alloc-vector.h"
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include <avian/util/abort.h>
|
||||||
#include "codegen/x86/encode.h"
|
#include <avian/util/math.h>
|
||||||
#include "codegen/x86/registers.h"
|
|
||||||
#include "codegen/x86/fixup.h"
|
#include <avian/vm/codegen/assembler.h>
|
||||||
|
#include <avian/vm/codegen/promise.h>
|
||||||
|
|
||||||
|
#include "context.h"
|
||||||
|
#include "encode.h"
|
||||||
|
#include "registers.h"
|
||||||
|
#include "fixup.h"
|
||||||
|
|
||||||
using namespace avian::util;
|
using namespace avian::util;
|
||||||
|
|
||||||
|
@ -11,12 +11,20 @@
|
|||||||
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H
|
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H
|
||||||
#define AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H
|
#define AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H
|
||||||
|
|
||||||
#include <avian/vm/codegen/assembler.h>
|
#include <stdint.h>
|
||||||
#include "codegen/x86/registers.h"
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/lir.h>
|
||||||
|
|
||||||
|
#include "registers.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
namespace x86 {
|
namespace x86 {
|
||||||
|
|
||||||
|
class Context;
|
||||||
|
|
||||||
void maybeRex(Context* c, unsigned size, int a, int index, int base, bool always);
|
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);
|
void maybeRex(Context* c, unsigned size, lir::Register* a, lir::Register* b);
|
||||||
|
@ -8,12 +8,20 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <avian/vm/codegen/assembler.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include "allocator.h"
|
||||||
#include "codegen/x86/fixup.h"
|
#include "alloc-vector.h"
|
||||||
#include "codegen/x86/padding.h"
|
#include "common.h"
|
||||||
#include "codegen/x86/block.h"
|
#include "zone.h"
|
||||||
|
|
||||||
|
#include <avian/util/abort.h>
|
||||||
|
#include <avian/vm/system/system.h>
|
||||||
|
|
||||||
|
#include "context.h"
|
||||||
|
#include "fixup.h"
|
||||||
|
#include "padding.h"
|
||||||
|
#include "block.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -11,17 +11,19 @@
|
|||||||
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H
|
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H
|
||||||
#define AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H
|
#define AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/promise.h>
|
||||||
|
|
||||||
namespace vm {
|
namespace vm {
|
||||||
class System;
|
class System;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
|
||||||
class Promise;
|
|
||||||
|
|
||||||
namespace x86 {
|
namespace x86 {
|
||||||
|
|
||||||
|
class Context;
|
||||||
class MyBlock;
|
class MyBlock;
|
||||||
class AlignmentPadding;
|
class AlignmentPadding;
|
||||||
|
|
||||||
|
@ -10,11 +10,13 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <avian/util/abort.h>
|
||||||
|
|
||||||
#include <avian/vm/codegen/lir.h>
|
#include <avian/vm/codegen/lir.h>
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include "context.h"
|
||||||
#include "codegen/x86/multimethod.h"
|
#include "multimethod.h"
|
||||||
#include "codegen/x86/operations.h"
|
#include "operations.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H
|
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H
|
||||||
#define AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H
|
#define AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/lir.h>
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
namespace x86 {
|
namespace x86 {
|
||||||
|
@ -8,13 +8,25 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include <stdint.h>
|
||||||
#include "codegen/x86/encode.h"
|
|
||||||
#include "codegen/x86/registers.h"
|
#include "target.h"
|
||||||
#include "codegen/x86/detect.h"
|
#include "alloc-vector.h"
|
||||||
#include "codegen/x86/operations.h"
|
#include "allocator.h"
|
||||||
#include "codegen/x86/padding.h"
|
#include "zone.h"
|
||||||
#include "codegen/x86/fixup.h"
|
|
||||||
|
#include <avian/util/abort.h>
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/assembler.h>
|
||||||
|
#include <avian/vm/codegen/promise.h>
|
||||||
|
|
||||||
|
#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;
|
using namespace avian::util;
|
||||||
|
|
||||||
|
@ -11,6 +11,12 @@
|
|||||||
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H
|
#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H
|
||||||
#define AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H
|
#define AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H
|
||||||
|
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <avian/vm/codegen/lir.h>
|
||||||
|
|
||||||
|
#include "context.h"
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
namespace x86 {
|
namespace x86 {
|
||||||
|
@ -8,12 +8,11 @@
|
|||||||
There is NO WARRANTY for this software. See license.txt for
|
There is NO WARRANTY for this software. See license.txt for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#include <avian/vm/codegen/assembler.h>
|
#include "alloc-vector.h"
|
||||||
|
|
||||||
#include "codegen/x86/context.h"
|
#include "context.h"
|
||||||
#include "codegen/x86/fixup.h"
|
#include "padding.h"
|
||||||
#include "codegen/x86/padding.h"
|
#include "block.h"
|
||||||
#include "codegen/x86/block.h"
|
|
||||||
|
|
||||||
namespace avian {
|
namespace avian {
|
||||||
namespace codegen {
|
namespace codegen {
|
||||||
|
@ -15,6 +15,7 @@ namespace avian {
|
|||||||
namespace codegen {
|
namespace codegen {
|
||||||
namespace x86 {
|
namespace x86 {
|
||||||
|
|
||||||
|
class Context;
|
||||||
|
|
||||||
class AlignmentPadding {
|
class AlignmentPadding {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user