Commit aff4ccf9 by John Porto

Renames the assembler* files.

Renames the assembler* files to IceAssembler*. Fixes whatever breaks. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4077 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/1179563004.
parent f8b4cc84
......@@ -163,8 +163,8 @@ LDFLAGS := $(HOST_FLAGS) -L$(LIBCXX_INSTALL_PATH)/lib -Wl,--gc-sections \
SB_LDFLAGS := $(LINKOPTLEVEL) $(LD_EXTRA)
SRCS = \
assembler.cpp \
assembler_ia32.cpp \
IceAssembler.cpp \
IceAssemblerX8632.cpp \
IceBrowserCompileServer.cpp \
IceCfg.cpp \
IceCfgNode.cpp \
......
//===- subzero/src/assembler.cpp - Assembler base class -------------------===//
//===- subzero/src/IceAssembler.cpp - Assembler base class ----------------===//
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
......@@ -18,81 +18,81 @@
//
//===----------------------------------------------------------------------===//
//
// This file implements the Assembler class.
// This file implements the Assembler base class.
//
//===----------------------------------------------------------------------===//
#include "assembler.h"
#include "IceAssembler.h"
#include "IceGlobalContext.h"
#include "IceOperand.h"
namespace Ice {
static uintptr_t NewContents(Assembler &assembler, intptr_t capacity) {
uintptr_t result = assembler.AllocateBytes(capacity);
return result;
static uintptr_t NewContents(Assembler &Assemblr, intptr_t Capacity) {
uintptr_t Result = Assemblr.allocateBytes(Capacity);
return Result;
}
AssemblerFixup *AssemblerBuffer::createFixup(FixupKind Kind,
const Constant *Value) {
AssemblerFixup *F =
new (assembler_.Allocate<AssemblerFixup>()) AssemblerFixup();
new (Assemblr.allocate<AssemblerFixup>()) AssemblerFixup();
F->set_position(0);
F->set_kind(Kind);
F->set_value(Value);
if (!assembler_.getPreliminary())
fixups_.push_back(F);
if (!Assemblr.getPreliminary())
Fixups.push_back(F);
return F;
}
#ifndef NDEBUG
AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer *buffer) {
if (buffer->cursor() >= buffer->limit())
buffer->ExtendCapacity();
buffer->extendCapacity();
// In debug mode, we save the assembler buffer along with the gap
// size before we start emitting to the buffer. This allows us to
// check that any single generated instruction doesn't overflow the
// limit implied by the minimum gap size.
buffer_ = buffer;
gap_ = ComputeGap();
Buffer = buffer;
Gap = computeGap();
// Make sure that extending the capacity leaves a big enough gap
// for any kind of instruction.
assert(gap_ >= kMinimumGap);
assert(Gap >= kMinimumGap);
// Mark the buffer as having ensured the capacity.
assert(!buffer->HasEnsuredCapacity()); // Cannot nest.
buffer->has_ensured_capacity_ = true;
assert(!buffer->hasEnsuredCapacity()); // Cannot nest.
buffer->HasEnsuredCapacity = true;
}
AssemblerBuffer::EnsureCapacity::~EnsureCapacity() {
// Unmark the buffer, so we cannot emit after this.
buffer_->has_ensured_capacity_ = false;
Buffer->HasEnsuredCapacity = false;
// Make sure the generated instruction doesn't take up more
// space than the minimum gap.
intptr_t delta = gap_ - ComputeGap();
intptr_t delta = Gap - computeGap();
assert(delta <= kMinimumGap);
}
#endif // !NDEBUG
AssemblerBuffer::AssemblerBuffer(Assembler &assembler) : assembler_(assembler) {
AssemblerBuffer::AssemblerBuffer(Assembler &Asm) : Assemblr(Asm) {
const intptr_t OneKB = 1024;
static const intptr_t kInitialBufferCapacity = 4 * OneKB;
contents_ = NewContents(assembler_, kInitialBufferCapacity);
cursor_ = contents_;
limit_ = ComputeLimit(contents_, kInitialBufferCapacity);
Contents = NewContents(Assemblr, kInitialBufferCapacity);
Cursor = Contents;
Limit = computeLimit(Contents, kInitialBufferCapacity);
#ifndef NDEBUG
has_ensured_capacity_ = false;
HasEnsuredCapacity = false;
#endif // !NDEBUG
// Verify internal state.
assert(Capacity() == kInitialBufferCapacity);
assert(Size() == 0);
assert(capacity() == kInitialBufferCapacity);
assert(size() == 0);
}
AssemblerBuffer::~AssemblerBuffer() {}
void AssemblerBuffer::ExtendCapacity() {
intptr_t old_size = Size();
intptr_t old_capacity = Capacity();
void AssemblerBuffer::extendCapacity() {
intptr_t old_size = size();
intptr_t old_capacity = capacity();
const intptr_t OneMB = 1 << 20;
intptr_t new_capacity = std::min(old_capacity * 2, old_capacity + OneMB);
if (new_capacity < old_capacity) {
......@@ -101,42 +101,42 @@ void AssemblerBuffer::ExtendCapacity() {
}
// Allocate the new data area and copy contents of the old one to it.
uintptr_t new_contents = NewContents(assembler_, new_capacity);
uintptr_t new_contents = NewContents(Assemblr, new_capacity);
memmove(reinterpret_cast<void *>(new_contents),
reinterpret_cast<void *>(contents_), old_size);
reinterpret_cast<void *>(Contents), old_size);
// Compute the relocation delta and switch to the new contents area.
intptr_t delta = new_contents - contents_;
contents_ = new_contents;
intptr_t delta = new_contents - Contents;
Contents = new_contents;
// Update the cursor and recompute the limit.
cursor_ += delta;
limit_ = ComputeLimit(new_contents, new_capacity);
Cursor += delta;
Limit = computeLimit(new_contents, new_capacity);
// Verify internal state.
assert(Capacity() == new_capacity);
assert(Size() == old_size);
assert(capacity() == new_capacity);
assert(size() == old_size);
}
llvm::StringRef Assembler::getBufferView() const {
return llvm::StringRef(reinterpret_cast<const char *>(buffer_.contents()),
buffer_.Size());
return llvm::StringRef(reinterpret_cast<const char *>(Buffer.contents()),
Buffer.size());
}
void Assembler::emitIASBytes(GlobalContext *Ctx) const {
Ostream &Str = Ctx->getStrEmit();
intptr_t EndPosition = buffer_.Size();
intptr_t EndPosition = Buffer.size();
intptr_t CurPosition = 0;
const intptr_t FixupSize = 4;
for (const AssemblerFixup *NextFixup : fixups()) {
intptr_t NextFixupLoc = NextFixup->position();
for (intptr_t i = CurPosition; i < NextFixupLoc; ++i) {
Str << "\t.byte 0x";
Str.write_hex(buffer_.Load<uint8_t>(i));
Str.write_hex(Buffer.load<uint8_t>(i));
Str << "\n";
}
Str << "\t.long ";
NextFixup->emit(Ctx, buffer_.Load<RelocOffsetT>(NextFixupLoc));
NextFixup->emit(Ctx, Buffer.load<RelocOffsetT>(NextFixupLoc));
if (fixupIsPCRel(NextFixup->kind()))
Str << " - .";
Str << "\n";
......@@ -146,7 +146,7 @@ void Assembler::emitIASBytes(GlobalContext *Ctx) const {
// Handle any bytes that are not prefixed by a fixup.
for (intptr_t i = CurPosition; i < EndPosition; ++i) {
Str << "\t.byte 0x";
Str.write_hex(buffer_.Load<uint8_t>(i));
Str.write_hex(Buffer.load<uint8_t>(i));
Str << "\n";
}
}
......
//===- subzero/src/assembler.h - Integrated assembler -----------*- C++ -*-===//
//===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===//
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
......@@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef SUBZERO_SRC_ASSEMBLER_H
#define SUBZERO_SRC_ASSEMBLER_H
#ifndef SUBZERO_SRC_ICEASSEMBLER_H
#define SUBZERO_SRC_ICEASSEMBLER_H
#include "IceDefs.h"
#include "IceFixups.h"
......@@ -38,30 +38,30 @@ public:
~AssemblerBuffer();
// Basic support for emitting, loading, and storing.
template <typename T> void Emit(T value) {
assert(HasEnsuredCapacity());
*reinterpret_cast<T *>(cursor_) = value;
cursor_ += sizeof(T);
template <typename T> void emit(T Value) {
assert(hasEnsuredCapacity());
*reinterpret_cast<T *>(Cursor) = Value;
Cursor += sizeof(T);
}
template <typename T> T Load(intptr_t position) const {
assert(position >= 0 &&
position <= (Size() - static_cast<intptr_t>(sizeof(T))));
return *reinterpret_cast<T *>(contents_ + position);
template <typename T> T load(intptr_t Position) const {
assert(Position >= 0 &&
Position <= (size() - static_cast<intptr_t>(sizeof(T))));
return *reinterpret_cast<T *>(Contents + Position);
}
template <typename T> void Store(intptr_t position, T value) {
assert(position >= 0 &&
position <= (Size() - static_cast<intptr_t>(sizeof(T))));
*reinterpret_cast<T *>(contents_ + position) = value;
template <typename T> void store(intptr_t Position, T Value) {
assert(Position >= 0 &&
Position <= (size() - static_cast<intptr_t>(sizeof(T))));
*reinterpret_cast<T *>(Contents + Position) = Value;
}
// Emit a fixup at the current location.
void EmitFixup(AssemblerFixup *fixup) { fixup->set_position(Size()); }
void emitFixup(AssemblerFixup *Fixup) { Fixup->set_position(size()); }
// Get the size of the emitted code.
intptr_t Size() const { return cursor_ - contents_; }
uintptr_t contents() const { return contents_; }
intptr_t size() const { return Cursor - Contents; }
uintptr_t contents() const { return Contents; }
// To emit an instruction to the assembler buffer, the EnsureCapacity helper
// must be used to guarantee that the underlying data area is big enough to
......@@ -77,47 +77,47 @@ public:
EnsureCapacity &operator=(const EnsureCapacity &) = delete;
public:
explicit EnsureCapacity(AssemblerBuffer *buffer);
explicit EnsureCapacity(AssemblerBuffer *Buffer);
~EnsureCapacity();
private:
AssemblerBuffer *buffer_;
intptr_t gap_;
AssemblerBuffer *Buffer;
intptr_t Gap;
intptr_t ComputeGap() { return buffer_->Capacity() - buffer_->Size(); }
intptr_t computeGap() { return Buffer->capacity() - Buffer->size(); }
};
bool has_ensured_capacity_;
bool HasEnsuredCapacity() const { return has_ensured_capacity_; }
bool HasEnsuredCapacity;
bool hasEnsuredCapacity() const { return HasEnsuredCapacity; }
#else // NDEBUG
class EnsureCapacity {
EnsureCapacity(const EnsureCapacity &) = delete;
EnsureCapacity &operator=(const EnsureCapacity &) = delete;
public:
explicit EnsureCapacity(AssemblerBuffer *buffer) {
if (buffer->cursor() >= buffer->limit())
buffer->ExtendCapacity();
explicit EnsureCapacity(AssemblerBuffer *Buffer) {
if (Buffer->cursor() >= buffer->limit())
buffer->extendCapacity();
}
};
// When building the C++ tests, assertion code is enabled. To allow
// asserting that the user of the assembler buffer has ensured the
// capacity needed for emitting, we add a dummy method in non-debug mode.
bool HasEnsuredCapacity() const { return true; }
bool hasEnsuredCapacity() const { return true; }
#endif // NDEBUG
// Returns the position in the instruction stream.
intptr_t GetPosition() const { return cursor_ - contents_; }
intptr_t getPosition() const { return Cursor - Contents; }
// Create and track a fixup in the current function.
AssemblerFixup *createFixup(FixupKind Kind, const Constant *Value);
const FixupRefList &fixups() const { return fixups_; }
const FixupRefList &fixups() const { return Fixups; }
void setSize(intptr_t NewSize) {
assert(NewSize <= Size());
cursor_ = contents_ + NewSize;
assert(NewSize <= size());
Cursor = Contents + NewSize;
}
private:
......@@ -126,27 +126,28 @@ private:
// for a single, fast space check per instruction.
static const intptr_t kMinimumGap = 32;
uintptr_t contents_;
uintptr_t cursor_;
uintptr_t limit_;
Assembler &assembler_;
uintptr_t Contents;
uintptr_t Cursor;
uintptr_t Limit;
// The member variable is named Assemblr to avoid hiding the class Assembler.
Assembler &Assemblr;
// List of pool-allocated fixups relative to the current function.
FixupRefList fixups_;
FixupRefList Fixups;
uintptr_t cursor() const { return cursor_; }
uintptr_t limit() const { return limit_; }
intptr_t Capacity() const {
assert(limit_ >= contents_);
return (limit_ - contents_) + kMinimumGap;
uintptr_t cursor() const { return Cursor; }
uintptr_t limit() const { return Limit; }
intptr_t capacity() const {
assert(Limit >= Contents);
return (Limit - Contents) + kMinimumGap;
}
// Compute the limit based on the data area and the capacity. See
// description of kMinimumGap for the reasoning behind the value.
static uintptr_t ComputeLimit(uintptr_t data, intptr_t capacity) {
return data + capacity - kMinimumGap;
static uintptr_t computeLimit(uintptr_t Data, intptr_t Capacity) {
return Data + Capacity - kMinimumGap;
}
void ExtendCapacity();
void extendCapacity();
};
class Assembler {
......@@ -155,12 +156,12 @@ class Assembler {
public:
Assembler()
: FunctionName(""), IsInternal(false), Preliminary(false),
buffer_(*this) {}
virtual ~Assembler() {}
: Buffer(*this), FunctionName(""), IsInternal(false),
Preliminary(false) {}
virtual ~Assembler() = default;
// Allocate a chunk of bytes using the per-Assembler allocator.
uintptr_t AllocateBytes(size_t bytes) {
uintptr_t allocateBytes(size_t bytes) {
// For now, alignment is not related to NaCl bundle alignment, since
// the buffer's GetPosition is relative to the base. So NaCl bundle
// alignment checks can be relative to that base. Later, the buffer
......@@ -172,7 +173,7 @@ public:
}
// Allocate data of type T using the per-Assembler allocator.
template <typename T> T *Allocate() { return Allocator.Allocate<T>(); }
template <typename T> T *allocate() { return Allocator.Allocate<T>(); }
// Align the tail end of the function to the required target alignment.
virtual void alignFunction() = 0;
......@@ -187,17 +188,17 @@ public:
// Mark the current text location as the start of a CFG node
// (represented by NodeNumber).
virtual void BindCfgNodeLabel(SizeT NodeNumber) = 0;
virtual void bindCfgNodeLabel(SizeT NodeNumber) = 0;
virtual bool fixupIsPCRel(FixupKind Kind) const = 0;
// Return a view of all the bytes of code for the current function.
llvm::StringRef getBufferView() const;
const FixupRefList &fixups() const { return buffer_.fixups(); }
const FixupRefList &fixups() const { return Buffer.fixups(); }
AssemblerFixup *createFixup(FixupKind Kind, const Constant *Value) {
return buffer_.createFixup(Kind, Value);
return Buffer.createFixup(Kind, Value);
}
void emitIASBytes(GlobalContext *Ctx) const;
......@@ -205,12 +206,15 @@ public:
void setInternal(bool Internal) { IsInternal = Internal; }
const IceString &getFunctionName() { return FunctionName; }
void setFunctionName(const IceString &NewName) { FunctionName = NewName; }
intptr_t getBufferSize() const { return buffer_.Size(); }
intptr_t getBufferSize() const { return Buffer.size(); }
// Roll back to a (smaller) size.
void setBufferSize(intptr_t NewSize) { buffer_.setSize(NewSize); }
void setBufferSize(intptr_t NewSize) { Buffer.setSize(NewSize); }
void setPreliminary(bool Value) { Preliminary = Value; }
bool getPreliminary() const { return Preliminary; }
protected:
AssemblerBuffer Buffer;
private:
ArenaAllocator<32 * 1024> Allocator;
// FunctionName and IsInternal are transferred from the original Cfg
......@@ -223,11 +227,8 @@ private:
// final pass where all changes to label bindings, label links, and
// relocation fixups are fully committed (Preliminary=false).
bool Preliminary;
protected:
AssemblerBuffer buffer_;
};
} // end of namespace Ice
#endif // SUBZERO_SRC_ASSEMBLER_H_
#endif // SUBZERO_SRC_ICEASSEMBLER_H_
//===- subzero/src/assembler_arm32.h - Assembler for ARM32 ------*- C++ -*-===//
//===- subzero/src/IceAssemblerARM32.h - Assembler for ARM32 ----*- C++ -*-===//
//
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
......@@ -19,14 +19,13 @@
//
//===----------------------------------------------------------------------===//
#ifndef SUBZERO_SRC_ASSEMBLER_ARM32_H
#define SUBZERO_SRC_ASSEMBLER_ARM32_H
#ifndef SUBZERO_SRC_ICEASSEMBLERARM32_H
#define SUBZERO_SRC_ICEASSEMBLERARM32_H
#include "IceAssembler.h"
#include "IceDefs.h"
#include "IceFixups.h"
#include "assembler.h"
namespace Ice {
namespace ARM32 {
......@@ -60,7 +59,7 @@ public:
llvm_unreachable("Not yet implemented.");
}
void BindCfgNodeLabel(SizeT NodeNumber) override {
void bindCfgNodeLabel(SizeT NodeNumber) override {
(void)NodeNumber;
llvm_unreachable("Not yet implemented.");
}
......@@ -74,4 +73,4 @@ public:
} // end of namespace ARM32
} // end of namespace Ice
#endif // SUBZERO_SRC_ASSEMBLER_ARM32_H
#endif // SUBZERO_SRC_ICEASSEMBLERARM32_H
......@@ -19,9 +19,10 @@
//
//===----------------------------------------------------------------------===//
#ifndef SUBZERO_SRC_ASSEMBLER_IA32_H
#define SUBZERO_SRC_ASSEMBLER_IA32_H
#ifndef SUBZERO_SRC_ICEASSEMBLERX8632_H
#define SUBZERO_SRC_ICEASSEMBLERX8632_H
#include "IceAssembler.h"
#include "IceConditionCodesX8632.h"
#include "IceDefs.h"
#include "IceOperand.h"
......@@ -29,8 +30,6 @@
#include "IceTypes.h"
#include "IceUtils.h"
#include "assembler.h"
namespace Ice {
using RegX8632::GPRRegister;
......@@ -369,7 +368,7 @@ public:
}
Label *GetOrCreateCfgNodeLabel(SizeT NodeNumber);
void BindCfgNodeLabel(SizeT NodeNumber) override;
void bindCfgNodeLabel(SizeT NodeNumber) override;
Label *GetOrCreateLocalLabel(SizeT Number);
void BindLocalLabel(SizeT Number);
......@@ -820,35 +819,35 @@ public:
void xadd(Type Ty, const Address &address, GPRRegister reg, bool Locked);
void xchg(Type Ty, const Address &address, GPRRegister reg);
void EmitSegmentOverride(uint8_t prefix);
void emitSegmentOverride(uint8_t prefix);
intptr_t PreferredLoopAlignment() { return 16; }
void Align(intptr_t alignment, intptr_t offset);
void Bind(Label *label);
intptr_t preferredLoopAlignment() { return 16; }
void align(intptr_t alignment, intptr_t offset);
void bind(Label *label);
intptr_t CodeSize() const { return buffer_.Size(); }
intptr_t CodeSize() const { return Buffer.size(); }
private:
inline void EmitUint8(uint8_t value);
inline void EmitInt16(int16_t value);
inline void EmitInt32(int32_t value);
inline void EmitRegisterOperand(int rm, int reg);
inline void EmitXmmRegisterOperand(int rm, XmmRegister reg);
inline void EmitFixup(AssemblerFixup *fixup);
inline void EmitOperandSizeOverride();
void EmitOperand(int rm, const Operand &operand);
void EmitImmediate(Type ty, const Immediate &imm);
void EmitComplexI8(int rm, const Operand &operand,
inline void emitUint8(uint8_t value);
inline void emitInt16(int16_t value);
inline void emitInt32(int32_t value);
inline void emitRegisterOperand(int rm, int reg);
inline void emitXmmRegisterOperand(int rm, XmmRegister reg);
inline void emitFixup(AssemblerFixup *fixup);
inline void emitOperandSizeOverride();
void emitOperand(int rm, const Operand &operand);
void emitImmediate(Type ty, const Immediate &imm);
void emitComplexI8(int rm, const Operand &operand,
const Immediate &immediate);
void EmitComplex(Type Ty, int rm, const Operand &operand,
void emitComplex(Type Ty, int rm, const Operand &operand,
const Immediate &immediate);
void EmitLabel(Label *label, intptr_t instruction_size);
void EmitLabelLink(Label *label);
void EmitNearLabelLink(Label *label);
void emitLabel(Label *label, intptr_t instruction_size);
void emitLabelLink(Label *label);
void emitNearLabelLink(Label *label);
void EmitGenericShift(int rm, Type Ty, GPRRegister reg, const Immediate &imm);
void EmitGenericShift(int rm, Type Ty, const Operand &operand,
void emitGenericShift(int rm, Type Ty, GPRRegister reg, const Immediate &imm);
void emitGenericShift(int rm, Type Ty, const Operand &operand,
GPRRegister shifter);
typedef std::vector<Label *> LabelVector;
......@@ -860,34 +859,34 @@ private:
Label *GetOrCreateLabel(SizeT Number, LabelVector &Labels);
};
inline void AssemblerX8632::EmitUint8(uint8_t value) {
buffer_.Emit<uint8_t>(value);
inline void AssemblerX8632::emitUint8(uint8_t value) {
Buffer.emit<uint8_t>(value);
}
inline void AssemblerX8632::EmitInt16(int16_t value) {
buffer_.Emit<int16_t>(value);
inline void AssemblerX8632::emitInt16(int16_t value) {
Buffer.emit<int16_t>(value);
}
inline void AssemblerX8632::EmitInt32(int32_t value) {
buffer_.Emit<int32_t>(value);
inline void AssemblerX8632::emitInt32(int32_t value) {
Buffer.emit<int32_t>(value);
}
inline void AssemblerX8632::EmitRegisterOperand(int rm, int reg) {
inline void AssemblerX8632::emitRegisterOperand(int rm, int reg) {
assert(rm >= 0 && rm < 8);
buffer_.Emit<uint8_t>(0xC0 + (rm << 3) + reg);
Buffer.emit<uint8_t>(0xC0 + (rm << 3) + reg);
}
inline void AssemblerX8632::EmitXmmRegisterOperand(int rm, XmmRegister reg) {
EmitRegisterOperand(rm, static_cast<GPRRegister>(reg));
inline void AssemblerX8632::emitXmmRegisterOperand(int rm, XmmRegister reg) {
emitRegisterOperand(rm, static_cast<GPRRegister>(reg));
}
inline void AssemblerX8632::EmitFixup(AssemblerFixup *fixup) {
buffer_.EmitFixup(fixup);
inline void AssemblerX8632::emitFixup(AssemblerFixup *fixup) {
Buffer.emitFixup(fixup);
}
inline void AssemblerX8632::EmitOperandSizeOverride() { EmitUint8(0x66); }
inline void AssemblerX8632::emitOperandSizeOverride() { emitUint8(0x66); }
} // end of namespace X8632
} // end of namespace Ice
#endif // SUBZERO_SRC_ASSEMBLER_IA32_H
#endif // SUBZERO_SRC_ICEASSEMBLERX8632_H
......@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "assembler.h"
#include "IceAssembler.h"
#include "IceCfg.h"
#include "IceCfgNode.h"
#include "IceClFlags.h"
......
......@@ -15,7 +15,7 @@
#ifndef SUBZERO_SRC_ICECFG_H
#define SUBZERO_SRC_ICECFG_H
#include "assembler.h"
#include "IceAssembler.h"
#include "IceClFlags.h"
#include "IceDefs.h"
#include "IceGlobalContext.h"
......
......@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "assembler.h"
#include "IceAssembler.h"
#include "IceCfg.h"
#include "IceCfgNode.h"
#include "IceGlobalInits.h"
......@@ -1062,7 +1062,7 @@ void CfgNode::emitIAS(Cfg *Func) const {
// TODO(stichnot): When sandboxing, defer binding the node label
// until just before the first instruction is emitted, to reduce the
// chance that a padding nop is a branch target.
Asm->BindCfgNodeLabel(getIndex());
Asm->bindCfgNodeLabel(getIndex());
for (const Inst &I : Phis) {
if (I.isDeleted())
continue;
......
......@@ -13,7 +13,7 @@
#include "llvm/Support/MathExtras.h"
#include "assembler.h"
#include "IceAssembler.h"
#include "IceDefs.h"
#include "IceELFObjectWriter.h"
#include "IceELFSection.h"
......
......@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "assembler_arm32.h"
#include "IceAssemblerARM32.h"
#include "IceCfg.h"
#include "IceCfgNode.h"
#include "IceInst.h"
......
......@@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "assembler_ia32.h"
#include "IceAssemblerX8632.h"
#include "IceCfg.h"
#include "IceCfgNode.h"
#include "IceConditionCodesX8632.h"
......@@ -2927,7 +2927,7 @@ void OperandX8632Mem::dump(const Cfg *Func, Ostream &Str) const {
void OperandX8632Mem::emitSegmentOverride(X8632::AssemblerX8632 *Asm) const {
if (SegmentReg != DefaultSegment) {
assert(SegmentReg >= 0 && SegmentReg < SegReg_NUM);
Asm->EmitSegmentOverride(InstX8632SegmentPrefixes[SegmentReg]);
Asm->emitSegmentOverride(InstX8632SegmentPrefixes[SegmentReg]);
}
}
......
......@@ -16,7 +16,7 @@
#ifndef SUBZERO_SRC_ICEINSTX8632_H
#define SUBZERO_SRC_ICEINSTX8632_H
#include "assembler_ia32.h"
#include "IceAssemblerX8632.h"
#include "IceConditionCodesX8632.h"
#include "IceDefs.h"
#include "IceInst.h"
......
......@@ -15,8 +15,8 @@
//
//===----------------------------------------------------------------------===//
#include "assembler_arm32.h"
#include "assembler_ia32.h"
#include "IceAssemblerARM32.h"
#include "IceAssemblerX8632.h"
#include "IceCfg.h" // setError()
#include "IceCfgNode.h"
#include "IceOperand.h"
......
......@@ -18,7 +18,7 @@
#include <unordered_map>
#include "assembler_ia32.h"
#include "IceAssemblerX8632.h"
#include "IceDefs.h"
#include "IceInst.h"
#include "IceInstX8632.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment