Make whether or not a Code object should be created by masm explicit
We always want to have an Isolate, so just use an extra ctor arg BUG=2487 R=yangguo@chromium.org,mstarzinger@chromium.org LOG=n Review URL: https://codereview.chromium.org/1476763002 Cr-Commit-Position: refs/heads/master@{#32277}
This commit is contained in:
parent
87177738ce
commit
aa9cfc8222
@ -109,9 +109,8 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
}
|
||||
|
||||
static void Patch(Code* stub, Mode mode) {
|
||||
MacroAssembler masm(NULL,
|
||||
stub->instruction_start(),
|
||||
stub->instruction_size());
|
||||
MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(),
|
||||
stub->instruction_size(), CodeObjectRequired::kNo);
|
||||
switch (mode) {
|
||||
case STORE_BUFFER_ONLY:
|
||||
DCHECK(GetMode(stub) == INCREMENTAL ||
|
||||
|
@ -33,7 +33,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
DwVfpRegister input = d0;
|
||||
@ -88,7 +89,8 @@ MemCopyUint8Function CreateMemCopyUint8Function(MemCopyUint8Function stub) {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return stub;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
Register dest = r0;
|
||||
Register src = r1;
|
||||
@ -245,7 +247,8 @@ MemCopyUint16Uint8Function CreateMemCopyUint16Uint8Function(
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return stub;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
Register dest = r0;
|
||||
Register src = r1;
|
||||
@ -330,7 +333,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
__ MovFromFloatParameter(d0);
|
||||
__ vsqrt(d0, d0);
|
||||
|
@ -19,11 +19,12 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -3621,12 +3622,11 @@ bool AreAliased(Register reg1,
|
||||
#endif
|
||||
|
||||
|
||||
CodePatcher::CodePatcher(byte* address,
|
||||
int instructions,
|
||||
CodePatcher::CodePatcher(byte* address, int instructions,
|
||||
FlushICache flush_cache)
|
||||
: address_(address),
|
||||
size_(instructions * Assembler::kInstrSize),
|
||||
masm_(NULL, address, size_ + Assembler::kGap),
|
||||
masm_(NULL, address, size_ + Assembler::kGap, CodeObjectRequired::kNo),
|
||||
flush_cache_(flush_cache) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
|
@ -88,11 +88,8 @@ enum TargetAddressStorageMode {
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
|
||||
// Returns the size of a call in instructions. Note, the value returned is
|
||||
|
@ -38,7 +38,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
|
||||
ExternalReference::InitializeMathExpData();
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
masm.SetStackPointer(csp);
|
||||
|
||||
// The argument will be in d0 on entry.
|
||||
|
@ -22,9 +22,9 @@ namespace internal {
|
||||
#define __
|
||||
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate,
|
||||
byte * buffer,
|
||||
unsigned buffer_size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, byte* buffer,
|
||||
unsigned buffer_size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, buffer_size),
|
||||
generating_stub_(false),
|
||||
#if DEBUG
|
||||
@ -35,7 +35,7 @@ MacroAssembler::MacroAssembler(Isolate* arg_isolate,
|
||||
sp_(jssp),
|
||||
tmp_list_(DefaultTmpList()),
|
||||
fptmp_list_(DefaultFPTmpList()) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
|
@ -146,7 +146,8 @@ enum SeqStringSetCharCheckIndexType { kIndexIsSmi, kIndexIsInteger32 };
|
||||
|
||||
class MacroAssembler : public Assembler {
|
||||
public:
|
||||
MacroAssembler(Isolate* isolate, byte * buffer, unsigned buffer_size);
|
||||
MacroAssembler(Isolate* isolate, byte* buffer, unsigned buffer_size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
inline Handle<Object> CodeObject();
|
||||
|
||||
|
@ -55,6 +55,9 @@ class StatsCounter;
|
||||
// -----------------------------------------------------------------------------
|
||||
// Platform independent assembler base class.
|
||||
|
||||
enum class CodeObjectRequired { kNo, kYes };
|
||||
|
||||
|
||||
class AssemblerBase: public Malloced {
|
||||
public:
|
||||
AssemblerBase(Isolate* isolate, void* buffer, int buffer_size);
|
||||
|
@ -2306,7 +2306,8 @@ void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) {
|
||||
// separate code object for each one.
|
||||
for (int i = 0; i < builtin_count; i++) {
|
||||
if (create_heap_objects) {
|
||||
MacroAssembler masm(isolate, u.buffer, sizeof u.buffer);
|
||||
MacroAssembler masm(isolate, u.buffer, sizeof u.buffer,
|
||||
CodeObjectRequired::kYes);
|
||||
// Generate the code/adaptor.
|
||||
typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments);
|
||||
Generator g = FUNCTION_CAST<Generator>(functions[i].generator);
|
||||
|
@ -250,7 +250,7 @@ Handle<Code> HydrogenCodeStub::GenerateLightweightMissCode(
|
||||
Factory* factory = isolate()->factory();
|
||||
|
||||
// Generate the new code.
|
||||
MacroAssembler masm(isolate(), NULL, 256);
|
||||
MacroAssembler masm(isolate(), NULL, 256, CodeObjectRequired::kYes);
|
||||
|
||||
{
|
||||
// Update the static counter each time a new code stub is generated.
|
||||
|
@ -108,7 +108,7 @@ Handle<Code> PlatformCodeStub::GenerateCode() {
|
||||
Factory* factory = isolate()->factory();
|
||||
|
||||
// Generate the new code.
|
||||
MacroAssembler masm(isolate(), NULL, 256);
|
||||
MacroAssembler masm(isolate(), NULL, 256, CodeObjectRequired::kYes);
|
||||
|
||||
{
|
||||
// Update the static counter each time a new code stub is generated.
|
||||
|
@ -41,7 +41,7 @@ CodeGenerator::CodeGenerator(Frame* frame, Linkage* linkage,
|
||||
labels_(zone()->NewArray<Label>(code->InstructionBlockCount())),
|
||||
current_block_(RpoNumber::Invalid()),
|
||||
current_source_position_(SourcePosition::Unknown()),
|
||||
masm_(info->isolate(), NULL, 0),
|
||||
masm_(info->isolate(), NULL, 0, CodeObjectRequired::kYes),
|
||||
resolver_(this),
|
||||
safepoints_(code->zone()),
|
||||
handlers_(code->zone()),
|
||||
|
@ -502,7 +502,8 @@ LChunk* LChunk::NewChunk(HGraph* graph) {
|
||||
|
||||
|
||||
Handle<Code> LChunk::Codegen() {
|
||||
MacroAssembler assembler(info()->isolate(), NULL, 0);
|
||||
MacroAssembler assembler(info()->isolate(), NULL, 0,
|
||||
CodeObjectRequired::kYes);
|
||||
LOG_CODE_EVENT(info()->isolate(),
|
||||
CodeStartLinePosInfoRecordEvent(
|
||||
assembler.positions_recorder()));
|
||||
|
@ -1831,7 +1831,7 @@ void Deoptimizer::EnsureCodeForDeoptimizationEntry(Isolate* isolate,
|
||||
while (max_entry_id >= entry_count) entry_count *= 2;
|
||||
CHECK(entry_count <= Deoptimizer::kMaxNumberOfEntries);
|
||||
|
||||
MacroAssembler masm(isolate, NULL, 16 * KB);
|
||||
MacroAssembler masm(isolate, NULL, 16 * KB, CodeObjectRequired::kYes);
|
||||
masm.set_emit_debug_code(false);
|
||||
GenerateDeoptimizationEntries(&masm, entry_count, type);
|
||||
CodeDesc desc;
|
||||
|
@ -38,7 +38,8 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
|
||||
}
|
||||
CodeGenerator::MakeCodePrologue(info, "full");
|
||||
const int kInitialBufferSize = 4 * KB;
|
||||
MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize);
|
||||
MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize,
|
||||
CodeObjectRequired::kYes);
|
||||
if (info->will_serialize()) masm.enable_serializer();
|
||||
|
||||
LOG_CODE_EVENT(isolate,
|
||||
|
@ -41,7 +41,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// esp[1 * kPointerSize]: raw double input
|
||||
// esp[0 * kPointerSize]: return address
|
||||
{
|
||||
@ -76,7 +77,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
byte* buffer =
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// esp[1 * kPointerSize]: raw double input
|
||||
// esp[0 * kPointerSize]: return address
|
||||
// Move double input into registers.
|
||||
@ -191,7 +193,8 @@ MemMoveFunction CreateMemMoveFunction() {
|
||||
byte* buffer =
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return NULL;
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
LabelConverter conv(buffer);
|
||||
|
||||
// Generated code is put into a fixed, unmovable buffer, and not into
|
||||
|
@ -19,11 +19,12 @@ namespace internal {
|
||||
// -------------------------------------------------------------------------
|
||||
// MacroAssembler implementation.
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -2792,7 +2793,7 @@ bool AreAliased(Register reg1,
|
||||
CodePatcher::CodePatcher(byte* address, int size)
|
||||
: address_(address),
|
||||
size_(size),
|
||||
masm_(NULL, address, size + Assembler::kGap) {
|
||||
masm_(NULL, address, size + Assembler::kGap, CodeObjectRequired::kNo) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
// bytes of instructions without failing with buffer size constraints.
|
||||
|
@ -63,11 +63,8 @@ bool AreAliased(Register reg1,
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
void Load(Register dst, const Operand& src, Representation r);
|
||||
void Store(Register src, const Operand& dst, Representation r);
|
||||
|
@ -40,7 +40,7 @@ class PropertyAccessCompiler BASE_EMBEDDED {
|
||||
kind_(kind),
|
||||
cache_holder_(cache_holder),
|
||||
isolate_(isolate),
|
||||
masm_(isolate, NULL, 256) {
|
||||
masm_(isolate, NULL, 256, CodeObjectRequired::kYes) {
|
||||
// TODO(yangguo): remove this once we can serialize IC stubs.
|
||||
masm_.enable_serializer();
|
||||
}
|
||||
|
@ -140,9 +140,8 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
}
|
||||
|
||||
static void Patch(Code* stub, Mode mode) {
|
||||
MacroAssembler masm(NULL,
|
||||
stub->instruction_start(),
|
||||
stub->instruction_size());
|
||||
MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(),
|
||||
stub->instruction_size(), CodeObjectRequired::kNo);
|
||||
switch (mode) {
|
||||
case STORE_BUFFER_ONLY:
|
||||
DCHECK(GetMode(stub) == INCREMENTAL ||
|
||||
|
@ -32,7 +32,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
DoubleRegister input = f12;
|
||||
@ -82,7 +83,8 @@ MemCopyUint8Function CreateMemCopyUint8Function(MemCopyUint8Function stub) {
|
||||
|
||||
// This code assumes that cache lines are 32 bytes and if the cache line is
|
||||
// larger it will not work correctly.
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
Label lastb, unaligned, aligned, chkw,
|
||||
@ -611,7 +613,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
__ MovFromFloatParameter(f12);
|
||||
__ sqrt_d(f0, f12);
|
||||
|
@ -19,12 +19,13 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false),
|
||||
has_double_zero_reg_set_(false) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -5754,12 +5755,11 @@ bool AreAliased(Register reg1,
|
||||
}
|
||||
|
||||
|
||||
CodePatcher::CodePatcher(byte* address,
|
||||
int instructions,
|
||||
CodePatcher::CodePatcher(byte* address, int instructions,
|
||||
FlushICache flush_cache)
|
||||
: address_(address),
|
||||
size_(instructions * Assembler::kInstrSize),
|
||||
masm_(NULL, address, size_ + Assembler::kGap),
|
||||
masm_(NULL, address, size_ + Assembler::kGap, CodeObjectRequired::kNo),
|
||||
flush_cache_(flush_cache) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
|
@ -141,11 +141,8 @@ inline MemOperand CFunctionArgumentOperand(int index) {
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
// Arguments macros.
|
||||
#define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2
|
||||
|
@ -141,9 +141,8 @@ class RecordWriteStub: public PlatformCodeStub {
|
||||
}
|
||||
|
||||
static void Patch(Code* stub, Mode mode) {
|
||||
MacroAssembler masm(NULL,
|
||||
stub->instruction_start(),
|
||||
stub->instruction_size());
|
||||
MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(),
|
||||
stub->instruction_size(), CodeObjectRequired::kNo);
|
||||
switch (mode) {
|
||||
case STORE_BUFFER_ONLY:
|
||||
DCHECK(GetMode(stub) == INCREMENTAL ||
|
||||
|
@ -32,7 +32,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
DoubleRegister input = f12;
|
||||
@ -82,7 +83,8 @@ MemCopyUint8Function CreateMemCopyUint8Function(MemCopyUint8Function stub) {
|
||||
|
||||
// This code assumes that cache lines are 32 bytes and if the cache line is
|
||||
// larger it will not work correctly.
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
Label lastb, unaligned, aligned, chkw,
|
||||
@ -612,7 +614,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
__ MovFromFloatParameter(f12);
|
||||
__ sqrt_d(f0, f12);
|
||||
|
@ -17,12 +17,13 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false),
|
||||
has_double_zero_reg_set_(false) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -6161,12 +6162,11 @@ bool AreAliased(Register reg1,
|
||||
}
|
||||
|
||||
|
||||
CodePatcher::CodePatcher(byte* address,
|
||||
int instructions,
|
||||
CodePatcher::CodePatcher(byte* address, int instructions,
|
||||
FlushICache flush_cache)
|
||||
: address_(address),
|
||||
size_(instructions * Assembler::kInstrSize),
|
||||
masm_(NULL, address, size_ + Assembler::kGap),
|
||||
masm_(NULL, address, size_ + Assembler::kGap, CodeObjectRequired::kNo),
|
||||
flush_cache_(flush_cache) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
|
@ -169,11 +169,8 @@ inline MemOperand CFunctionArgumentOperand(int index) {
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
// Arguments macros.
|
||||
#define COND_TYPED_ARGS Condition cond, Register r1, const Operand& r2
|
||||
|
@ -127,8 +127,8 @@ class RecordWriteStub : public PlatformCodeStub {
|
||||
}
|
||||
|
||||
static void Patch(Code* stub, Mode mode) {
|
||||
MacroAssembler masm(NULL, stub->instruction_start(),
|
||||
stub->instruction_size());
|
||||
MacroAssembler masm(stub->GetIsolate(), stub->instruction_start(),
|
||||
stub->instruction_size(), CodeObjectRequired::kNo);
|
||||
switch (mode) {
|
||||
case STORE_BUFFER_ONLY:
|
||||
DCHECK(GetMode(stub) == INCREMENTAL ||
|
||||
|
@ -33,7 +33,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
{
|
||||
DoubleRegister input = d1;
|
||||
@ -82,7 +83,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
|
||||
// Called from C
|
||||
__ function_descriptor();
|
||||
|
@ -20,11 +20,12 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -4344,7 +4345,7 @@ CodePatcher::CodePatcher(byte* address, int instructions,
|
||||
FlushICache flush_cache)
|
||||
: address_(address),
|
||||
size_(instructions * Assembler::kInstrSize),
|
||||
masm_(NULL, address, size_ + Assembler::kGap),
|
||||
masm_(NULL, address, size_ + Assembler::kGap, CodeObjectRequired::kNo),
|
||||
flush_cache_(flush_cache) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
|
@ -114,7 +114,8 @@ class MacroAssembler : public Assembler {
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
|
||||
// Returns the size of a call in instructions. Note, the value returned is
|
||||
|
@ -98,7 +98,8 @@ RegExpMacroAssemblerARM::RegExpMacroAssemblerARM(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -113,7 +113,8 @@ RegExpMacroAssemblerARM64::RegExpMacroAssemblerARM64(Isolate* isolate,
|
||||
Zone* zone, Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -81,7 +81,8 @@ RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -97,7 +97,8 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -133,7 +133,8 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -100,7 +100,8 @@ RegExpMacroAssemblerPPC::RegExpMacroAssemblerPPC(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -95,7 +95,7 @@ RegExpMacroAssemblerX64::RegExpMacroAssemblerX64(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(isolate, NULL, kRegExpCodeSize),
|
||||
masm_(isolate, NULL, kRegExpCodeSize, CodeObjectRequired::kYes),
|
||||
no_root_array_scope_(&masm_),
|
||||
code_relative_fixup_positions_(4, zone),
|
||||
mode_(mode),
|
||||
|
@ -81,7 +81,8 @@ RegExpMacroAssemblerX87::RegExpMacroAssemblerX87(Isolate* isolate, Zone* zone,
|
||||
Mode mode,
|
||||
int registers_to_save)
|
||||
: NativeRegExpMacroAssembler(isolate, zone),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize)),
|
||||
masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
|
||||
CodeObjectRequired::kYes)),
|
||||
mode_(mode),
|
||||
num_registers_(registers_to_save),
|
||||
num_saved_registers_(registers_to_save),
|
||||
|
@ -39,7 +39,8 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
||||
if (buffer == nullptr) return nullptr;
|
||||
ExternalReference::InitializeMathExpData();
|
||||
|
||||
MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// xmm0: raw double input.
|
||||
XMMRegister input = xmm0;
|
||||
XMMRegister result = xmm1;
|
||||
@ -70,7 +71,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// xmm0: raw double input.
|
||||
// Move double input into registers.
|
||||
__ Sqrtsd(xmm0, xmm0);
|
||||
@ -94,7 +96,8 @@ ModuloFunction CreateModuloFunction() {
|
||||
byte* buffer = static_cast<byte*>(
|
||||
base::OS::Allocate(Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// Generated code is put into a fixed, unmovable, buffer, and not into
|
||||
// the V8 heap. We can't, and don't, refer to any relocatable addresses
|
||||
// (e.g. the JavaScript nan-object).
|
||||
|
@ -17,12 +17,13 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false),
|
||||
root_array_available_(true) {
|
||||
if (isolate() != NULL) {
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -5201,7 +5202,7 @@ bool AreAliased(Register reg1,
|
||||
CodePatcher::CodePatcher(byte* address, int size)
|
||||
: address_(address),
|
||||
size_(size),
|
||||
masm_(NULL, address, size + Assembler::kGap) {
|
||||
masm_(NULL, address, size + Assembler::kGap, CodeObjectRequired::kNo) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
// bytes of instructions without failing with buffer size constraints.
|
||||
|
@ -85,11 +85,8 @@ struct SmiIndex {
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
// Prevent the use of the RootArray during the lifetime of this
|
||||
// scope object.
|
||||
|
@ -46,7 +46,8 @@ UnaryMathFunction CreateSqrtFunction() {
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return &std::sqrt;
|
||||
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
// Load double input into registers.
|
||||
__ fld_d(MemOperand(esp, 4));
|
||||
__ X87SetFPUCW(0x027F);
|
||||
@ -100,7 +101,8 @@ MemMoveFunction CreateMemMoveFunction() {
|
||||
byte* buffer =
|
||||
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
||||
if (buffer == NULL) return NULL;
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
||||
CodeObjectRequired::kNo);
|
||||
LabelConverter conv(buffer);
|
||||
|
||||
// Generated code is put into a fixed, unmovable buffer, and not into
|
||||
|
@ -19,12 +19,12 @@ namespace internal {
|
||||
// -------------------------------------------------------------------------
|
||||
// MacroAssembler implementation.
|
||||
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
|
||||
MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object)
|
||||
: Assembler(arg_isolate, buffer, size),
|
||||
generating_stub_(false),
|
||||
has_frame_(false) {
|
||||
if (isolate() != NULL) {
|
||||
// TODO(titzer): should we just use a null handle here instead?
|
||||
if (create_code_object == CodeObjectRequired::kYes) {
|
||||
code_object_ =
|
||||
Handle<Object>::New(isolate()->heap()->undefined_value(), isolate());
|
||||
}
|
||||
@ -2663,7 +2663,7 @@ bool AreAliased(Register reg1,
|
||||
CodePatcher::CodePatcher(byte* address, int size)
|
||||
: address_(address),
|
||||
size_(size),
|
||||
masm_(NULL, address, size + Assembler::kGap) {
|
||||
masm_(NULL, address, size + Assembler::kGap, CodeObjectRequired::kNo) {
|
||||
// Create a new macro assembler pointing to the address of the code to patch.
|
||||
// The size is adjusted with kGap on order for the assembler to generate size
|
||||
// bytes of instructions without failing with buffer size constraints.
|
||||
|
@ -63,11 +63,8 @@ bool AreAliased(Register reg1,
|
||||
// MacroAssembler implements a collection of frequently used macros.
|
||||
class MacroAssembler: public Assembler {
|
||||
public:
|
||||
// The isolate parameter can be NULL if the macro assembler should
|
||||
// not use isolate-dependent functionality. In this case, it's the
|
||||
// responsibility of the caller to never invoke such function on the
|
||||
// macro assembler.
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size);
|
||||
MacroAssembler(Isolate* isolate, void* buffer, int size,
|
||||
CodeObjectRequired create_code_object);
|
||||
|
||||
void Load(Register dst, const Operand& src, Representation r);
|
||||
void Store(Register src, const Operand& dst, Representation r);
|
||||
|
@ -117,16 +117,17 @@ static void InitializeVM() {
|
||||
#ifdef USE_SIMULATOR
|
||||
|
||||
// Run tests with the simulator.
|
||||
#define SETUP_SIZE(buf_size) \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(isolate != NULL); \
|
||||
byte* buf = new byte[buf_size]; \
|
||||
MacroAssembler masm(isolate, buf, buf_size); \
|
||||
Decoder<DispatchingDecoderVisitor>* decoder = \
|
||||
new Decoder<DispatchingDecoderVisitor>(); \
|
||||
Simulator simulator(decoder); \
|
||||
PrintDisassembler* pdis = NULL; \
|
||||
#define SETUP_SIZE(buf_size) \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(isolate != NULL); \
|
||||
byte* buf = new byte[buf_size]; \
|
||||
MacroAssembler masm(isolate, buf, buf_size, \
|
||||
v8::internal::CodeObjectRequired::kYes); \
|
||||
Decoder<DispatchingDecoderVisitor>* decoder = \
|
||||
new Decoder<DispatchingDecoderVisitor>(); \
|
||||
Simulator simulator(decoder); \
|
||||
PrintDisassembler* pdis = NULL; \
|
||||
RegisterDump core;
|
||||
|
||||
/* if (Cctest::trace_sim()) { \
|
||||
@ -171,12 +172,13 @@ static void InitializeVM() {
|
||||
|
||||
#else // ifdef USE_SIMULATOR.
|
||||
// Run the test on real hardware or models.
|
||||
#define SETUP_SIZE(buf_size) \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(isolate != NULL); \
|
||||
byte* buf = new byte[buf_size]; \
|
||||
MacroAssembler masm(isolate, buf, buf_size); \
|
||||
#define SETUP_SIZE(buf_size) \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
DCHECK(isolate != NULL); \
|
||||
byte* buf = new byte[buf_size]; \
|
||||
MacroAssembler masm(isolate, buf, buf_size, \
|
||||
v8::internal::CodeObjectRequired::kYes); \
|
||||
RegisterDump core;
|
||||
|
||||
#define RESET() \
|
||||
|
@ -313,7 +313,8 @@ TEST(AssemblerIa329) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
enum { kEqual = 0, kGreater = 1, kLess = 2, kNaN = 3, kUndefined = 4 };
|
||||
Label equal_l, less_l, greater_l, nan_l;
|
||||
__ fld_d(Operand(esp, 3 * kPointerSize));
|
||||
@ -535,7 +536,8 @@ TEST(AssemblerIa32Extractps) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{ CpuFeatureScope fscope41(&assm, SSE4_1);
|
||||
__ movsd(xmm1, Operand(esp, 4));
|
||||
__ extractps(eax, xmm1, 0x1);
|
||||
@ -566,7 +568,8 @@ TEST(AssemblerIa32SSE) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
__ movss(xmm0, Operand(esp, kPointerSize));
|
||||
__ movss(xmm1, Operand(esp, 2 * kPointerSize));
|
||||
@ -603,7 +606,8 @@ TEST(AssemblerX64FMA_sd) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, FMA3);
|
||||
Label exit;
|
||||
@ -831,7 +835,8 @@ TEST(AssemblerX64FMA_ss) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, FMA3);
|
||||
Label exit;
|
||||
@ -1058,7 +1063,8 @@ TEST(AssemblerIa32BMI1) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, BMI1);
|
||||
Label exit;
|
||||
@ -1165,7 +1171,8 @@ TEST(AssemblerIa32LZCNT) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, LZCNT);
|
||||
Label exit;
|
||||
@ -1212,7 +1219,8 @@ TEST(AssemblerIa32POPCNT) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, POPCNT);
|
||||
Label exit;
|
||||
@ -1259,7 +1267,8 @@ TEST(AssemblerIa32BMI2) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[2048];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, BMI2);
|
||||
Label exit;
|
||||
|
@ -60,7 +60,7 @@ TEST(MIPS0) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Addition.
|
||||
__ addu(v0, a0, a1);
|
||||
@ -83,7 +83,7 @@ TEST(MIPS1) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label L, C;
|
||||
|
||||
__ mov(a1, a0);
|
||||
@ -119,7 +119,7 @@ TEST(MIPS2) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label exit, error;
|
||||
|
||||
@ -280,7 +280,7 @@ TEST(MIPS3) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label L, C;
|
||||
|
||||
// Double precision floating point instructions.
|
||||
@ -618,7 +618,7 @@ TEST(MIPS7) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label neither_is_nan, less_than, outa_here;
|
||||
|
||||
__ ldc1(f4, MemOperand(a0, offsetof(T, a)) );
|
||||
@ -709,7 +709,8 @@ TEST(MIPS8) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Basic word load.
|
||||
__ lw(t0, MemOperand(a0, offsetof(T, input)) );
|
||||
@ -793,7 +794,7 @@ TEST(MIPS9) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label exit, exit2, exit3;
|
||||
|
||||
__ Branch(&exit, ge, a0, Operand(zero_reg));
|
||||
@ -1067,7 +1068,7 @@ TEST(MIPS12) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ mov(t6, fp); // Save frame pointer.
|
||||
__ mov(fp, a0); // Access struct T by fp.
|
||||
@ -1156,7 +1157,7 @@ TEST(MIPS13) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ sw(t0, MemOperand(a0, offsetof(T, cvt_small_in)));
|
||||
__ Cvt_d_uw(f10, t0, f4);
|
||||
@ -1233,7 +1234,7 @@ TEST(MIPS14) {
|
||||
|
||||
#undef ROUND_STRUCT_ELEMENT
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Save FCSR.
|
||||
__ cfc1(a1, FCSR);
|
||||
@ -1349,7 +1350,8 @@ TEST(seleqz_selnez) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
int a;
|
||||
@ -1450,7 +1452,8 @@ TEST(min_max) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -1527,7 +1530,8 @@ TEST(rint_d) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -1632,7 +1636,8 @@ TEST(sel) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
double dd;
|
||||
@ -1706,7 +1711,8 @@ TEST(rint_s) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -1812,7 +1818,8 @@ TEST(mina_maxa) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double double_nan = std::numeric_limits<double>::quiet_NaN();
|
||||
const float float_nan = std::numeric_limits<float>::quiet_NaN();
|
||||
|
||||
@ -1909,7 +1916,8 @@ TEST(trunc_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -1969,7 +1977,8 @@ TEST(movz_movn) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
int64_t rt;
|
||||
@ -2098,7 +2107,8 @@ TEST(movt_movd) {
|
||||
test.fcsr = 1 << (24+condition_flags[j]);
|
||||
}
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
__ ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)) );
|
||||
__ lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)) );
|
||||
__ lw(t1, MemOperand(a0, offsetof(TestFloat, fcsr)) );
|
||||
@ -2151,7 +2161,7 @@ TEST(cvt_w_d) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2228,7 +2238,7 @@ TEST(trunc_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2285,7 +2295,7 @@ TEST(round_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2343,7 +2353,8 @@ TEST(round_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2402,7 +2413,7 @@ TEST(sub) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2475,7 +2486,7 @@ TEST(sqrt_rsqrt_recip) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2575,7 +2586,7 @@ TEST(neg) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2628,7 +2639,7 @@ TEST(mul) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2687,7 +2698,7 @@ TEST(mov) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2741,7 +2752,7 @@ TEST(floor_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2799,7 +2810,8 @@ TEST(floor_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2857,7 +2869,7 @@ TEST(ceil_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2915,7 +2927,8 @@ TEST(ceil_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -3264,7 +3277,8 @@ TEST(class_fmt) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
|
||||
__ class_d(f6, f4);
|
||||
@ -3412,7 +3426,7 @@ TEST(ABS) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
int64_t fir;
|
||||
@ -3509,7 +3523,7 @@ TEST(ADD_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -3579,7 +3593,8 @@ TEST(C_COND_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double dOp1;
|
||||
@ -3790,7 +3805,8 @@ TEST(CMP_COND_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double dOp1;
|
||||
@ -4006,7 +4022,7 @@ TEST(CVT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float cvt_d_s_in;
|
||||
@ -4252,7 +4268,7 @@ TEST(DIV_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
double dOp1;
|
||||
@ -4374,7 +4390,7 @@ uint32_t run_align(uint32_t rs_value, uint32_t rt_value, uint8_t bp) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ align(v0, a0, a1, bp);
|
||||
__ jr(ra);
|
||||
@ -4427,7 +4443,7 @@ uint32_t run_aluipc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ aluipc(v0, offset);
|
||||
__ jr(ra);
|
||||
@ -4481,7 +4497,7 @@ uint32_t run_auipc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ auipc(v0, offset);
|
||||
__ jr(ra);
|
||||
@ -4535,7 +4551,7 @@ uint32_t run_lwpc(int offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// 256k instructions; 2^8k
|
||||
// addiu t7, t0, 0xffff; (0x250fffff)
|
||||
@ -4611,7 +4627,7 @@ uint32_t run_jic(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label get_program_counter, stop_execution;
|
||||
__ push(ra);
|
||||
@ -4692,7 +4708,7 @@ uint64_t run_beqzc(int32_t value, int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label stop_execution;
|
||||
__ li(v0, 0);
|
||||
@ -4765,7 +4781,7 @@ uint32_t run_jialc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label main_block, get_program_counter;
|
||||
__ push(ra);
|
||||
@ -4857,7 +4873,7 @@ uint64_t run_addiupc(int32_t imm19) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ addiupc(v0, imm19);
|
||||
__ jr(ra);
|
||||
@ -4911,7 +4927,7 @@ int32_t run_bc(int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label continue_1, stop_execution;
|
||||
__ push(ra);
|
||||
@ -4992,7 +5008,7 @@ int32_t run_balc(int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label continue_1, stop_execution;
|
||||
__ push(ra);
|
||||
@ -5073,7 +5089,7 @@ uint32_t run_bal(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ mov(t0, ra);
|
||||
__ bal(offset); // Equivalent for "BGEZAL zero_reg, offset".
|
||||
@ -5129,7 +5145,8 @@ TEST(Trampoline) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, nullptr, 0);
|
||||
MacroAssembler assm(isolate, nullptr, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
Label done;
|
||||
size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2;
|
||||
|
||||
|
@ -60,7 +60,7 @@ TEST(MIPS0) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Addition.
|
||||
__ addu(v0, a0, a1);
|
||||
@ -83,7 +83,7 @@ TEST(MIPS1) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label L, C;
|
||||
|
||||
__ mov(a1, a0);
|
||||
@ -119,7 +119,7 @@ TEST(MIPS2) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label exit, error;
|
||||
|
||||
@ -289,7 +289,7 @@ TEST(MIPS3) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label L, C;
|
||||
|
||||
// Double precision floating point instructions.
|
||||
@ -628,7 +628,7 @@ TEST(MIPS7) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label neither_is_nan, less_than, outa_here;
|
||||
|
||||
__ ldc1(f4, MemOperand(a0, offsetof(T, a)) );
|
||||
@ -716,7 +716,8 @@ TEST(MIPS8) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Basic word load.
|
||||
__ lw(a4, MemOperand(a0, offsetof(T, input)) );
|
||||
@ -800,7 +801,7 @@ TEST(MIPS9) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
Label exit, exit2, exit3;
|
||||
|
||||
__ Branch(&exit, ge, a0, Operand(zero_reg));
|
||||
@ -1097,7 +1098,7 @@ TEST(MIPS12) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ mov(t2, fp); // Save frame pointer.
|
||||
__ mov(fp, a0); // Access struct T by fp.
|
||||
@ -1186,7 +1187,7 @@ TEST(MIPS13) {
|
||||
} T;
|
||||
T t;
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ sw(a4, MemOperand(a0, offsetof(T, cvt_small_in)));
|
||||
__ Cvt_d_uw(f10, a4);
|
||||
@ -1263,7 +1264,7 @@ TEST(MIPS14) {
|
||||
|
||||
#undef ROUND_STRUCT_ELEMENT
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// Save FCSR.
|
||||
__ cfc1(a1, FCSR);
|
||||
@ -1479,7 +1480,8 @@ TEST(seleqz_selnez) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
int a;
|
||||
@ -1581,7 +1583,8 @@ TEST(min_max) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -1658,7 +1661,8 @@ TEST(rint_d) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -1761,7 +1765,8 @@ TEST(sel) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
double dd;
|
||||
@ -1835,7 +1840,8 @@ TEST(rint_s) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -1941,7 +1947,8 @@ TEST(mina_maxa) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double double_nan = std::numeric_limits<double>::quiet_NaN();
|
||||
const float float_nan = std::numeric_limits<float>::quiet_NaN();
|
||||
|
||||
@ -2040,7 +2047,8 @@ TEST(trunc_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2100,7 +2108,8 @@ TEST(movz_movn) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
int64_t rt;
|
||||
@ -2228,7 +2237,8 @@ TEST(movt_movd) {
|
||||
test.fcsr = 1 << (24+condition_flags[j]);
|
||||
}
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
__ ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)) );
|
||||
__ lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)) );
|
||||
__ lw(t1, MemOperand(a0, offsetof(TestFloat, fcsr)) );
|
||||
@ -2282,7 +2292,7 @@ TEST(cvt_w_d) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2359,7 +2369,7 @@ TEST(trunc_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2416,7 +2426,7 @@ TEST(round_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2473,7 +2483,8 @@ TEST(round_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2532,7 +2543,7 @@ TEST(sub) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2605,7 +2616,7 @@ TEST(sqrt_rsqrt_recip) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2697,7 +2708,7 @@ TEST(neg) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2751,7 +2762,7 @@ TEST(mul) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float a;
|
||||
@ -2810,7 +2821,7 @@ TEST(mov) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2863,7 +2874,7 @@ TEST(floor_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2920,7 +2931,8 @@ TEST(floor_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -2977,7 +2989,7 @@ TEST(ceil_w) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -3034,7 +3046,8 @@ TEST(ceil_l) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -3424,7 +3437,8 @@ TEST(class_fmt) {
|
||||
|
||||
// Create a function that accepts &t, and loads, manipulates, and stores
|
||||
// the doubles t.a ... t.f.
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
|
||||
__ class_d(f6, f4);
|
||||
@ -3573,7 +3587,7 @@ TEST(ABS) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
int64_t fir;
|
||||
@ -3671,7 +3685,7 @@ TEST(ADD_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double a;
|
||||
@ -3741,7 +3755,8 @@ TEST(C_COND_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double dOp1;
|
||||
@ -3952,7 +3967,8 @@ TEST(CMP_COND_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
double dOp1;
|
||||
@ -4168,7 +4184,7 @@ TEST(CVT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test_float {
|
||||
float cvt_d_s_in;
|
||||
@ -4366,7 +4382,7 @@ TEST(DIV_FMT) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
typedef struct test {
|
||||
double dOp1;
|
||||
@ -4486,7 +4502,7 @@ uint64_t run_align(uint64_t rs_value, uint64_t rt_value, uint8_t bp) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ align(v0, a0, a1, bp);
|
||||
__ jr(ra);
|
||||
@ -4539,7 +4555,7 @@ uint64_t run_dalign(uint64_t rs_value, uint64_t rt_value, uint8_t bp) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ dalign(v0, a0, a1, bp);
|
||||
__ jr(ra);
|
||||
@ -4597,7 +4613,7 @@ uint64_t run_aluipc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ aluipc(v0, offset);
|
||||
__ jr(ra);
|
||||
@ -4651,7 +4667,7 @@ uint64_t run_auipc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ auipc(v0, offset);
|
||||
__ jr(ra);
|
||||
@ -4705,7 +4721,7 @@ uint64_t run_lwpc(int offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// 256k instructions; 2^8k
|
||||
// addiu t3, a4, 0xffff; (0x250fffff)
|
||||
@ -4781,7 +4797,7 @@ uint64_t run_lwupc(int offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// 256k instructions; 2^8k
|
||||
// addiu t3, a4, 0xffff; (0x250fffff)
|
||||
@ -4857,7 +4873,7 @@ uint64_t run_jic(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label get_program_counter, stop_execution;
|
||||
__ push(ra);
|
||||
@ -4938,7 +4954,7 @@ uint64_t run_beqzc(int32_t value, int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label stop_execution;
|
||||
__ li(v0, 0);
|
||||
@ -5011,7 +5027,7 @@ uint64_t run_jialc(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label main_block, get_program_counter;
|
||||
__ push(ra);
|
||||
@ -5105,7 +5121,7 @@ uint64_t run_addiupc(int32_t imm19) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ addiupc(v0, imm19);
|
||||
__ jr(ra);
|
||||
@ -5159,7 +5175,7 @@ uint64_t run_ldpc(int offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
// 256k instructions; 2 * 2^7k = 2^8k
|
||||
// addiu t3, a4, 0xffff; (0x250fffff)
|
||||
@ -5234,7 +5250,7 @@ int64_t run_bc(int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label continue_1, stop_execution;
|
||||
__ push(ra);
|
||||
@ -5315,7 +5331,7 @@ int64_t run_balc(int32_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
Label continue_1, stop_execution;
|
||||
__ push(ra);
|
||||
@ -5396,7 +5412,7 @@ uint64_t run_dsll(uint64_t rt_value, uint16_t sa_value) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ dsll(v0, a0, sa_value);
|
||||
__ jr(ra);
|
||||
@ -5444,7 +5460,7 @@ uint64_t run_bal(int16_t offset) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, NULL, 0);
|
||||
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
__ mov(t0, ra);
|
||||
__ bal(offset); // Equivalent for "BGEZAL zero_reg, offset".
|
||||
@ -5500,7 +5516,8 @@ TEST(Trampoline) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
MacroAssembler assm(isolate, nullptr, 0);
|
||||
MacroAssembler assm(isolate, nullptr, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
Label done;
|
||||
size_t nr_calls = kMaxBranchOffset / (2 * Instruction::kInstrSize) + 2;
|
||||
|
||||
|
@ -721,7 +721,8 @@ TEST(AssemblerX64SSE) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
__ shufps(xmm0, xmm0, 0x0); // brocast first argument
|
||||
__ shufps(xmm1, xmm1, 0x0); // brocast second argument
|
||||
@ -758,7 +759,8 @@ TEST(AssemblerX64FMA_sd) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, FMA3);
|
||||
Label exit;
|
||||
@ -983,7 +985,8 @@ TEST(AssemblerX64FMA_ss) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, FMA3);
|
||||
Label exit;
|
||||
@ -1608,7 +1611,8 @@ TEST(AssemblerX64BMI1) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[1024];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, BMI1);
|
||||
Label exit;
|
||||
@ -1797,7 +1801,8 @@ TEST(AssemblerX64LZCNT) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, LZCNT);
|
||||
Label exit;
|
||||
@ -1856,7 +1861,8 @@ TEST(AssemblerX64POPCNT) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, POPCNT);
|
||||
Label exit;
|
||||
@ -1915,7 +1921,8 @@ TEST(AssemblerX64BMI2) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[2048];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
{
|
||||
CpuFeatureScope fscope(&assm, BMI2);
|
||||
Label exit;
|
||||
@ -2175,7 +2182,8 @@ TEST(AssemblerX64JumpTables1) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, nullptr, 0);
|
||||
MacroAssembler assm(isolate, nullptr, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
const int kNumCases = 512;
|
||||
int values[kNumCases];
|
||||
@ -2222,7 +2230,8 @@ TEST(AssemblerX64JumpTables2) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assm(isolate, nullptr, 0);
|
||||
MacroAssembler assm(isolate, nullptr, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
const int kNumCases = 512;
|
||||
int values[kNumCases];
|
||||
|
@ -188,7 +188,8 @@ TEST(AssemblerIa329) {
|
||||
Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
|
||||
HandleScope scope(isolate);
|
||||
v8::internal::byte buffer[256];
|
||||
MacroAssembler assm(isolate, buffer, sizeof buffer);
|
||||
MacroAssembler assm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
enum { kEqual = 0, kGreater = 1, kLess = 2, kNaN = 3, kUndefined = 4 };
|
||||
Label equal_l, less_l, greater_l, nan_l;
|
||||
__ fld_d(Operand(esp, 3 * kPointerSize));
|
||||
|
@ -54,7 +54,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
|
||||
inline_fastpath);
|
||||
|
||||
|
@ -54,7 +54,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
v8::base::OS::Allocate(actual_size, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
|
||||
inline_fastpath);
|
||||
|
||||
|
@ -54,7 +54,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
int offset =
|
||||
source_reg.is(esp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
|
||||
|
@ -56,7 +56,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
|
||||
inline_fastpath);
|
||||
|
||||
|
@ -56,7 +56,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
|
||||
inline_fastpath);
|
||||
|
||||
|
@ -54,7 +54,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
int offset =
|
||||
source_reg.is(rsp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
|
||||
|
@ -54,7 +54,8 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
||||
Assembler::kMinimalBufferSize, &actual_size, true));
|
||||
CHECK(buffer);
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
int offset =
|
||||
source_reg.is(esp) ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
|
||||
DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
|
||||
|
@ -48,20 +48,31 @@ using namespace v8::internal;
|
||||
|
||||
#define EXP_SIZE (256)
|
||||
#define INSTR_SIZE (1024)
|
||||
#define SET_UP_CLASS(ASMCLASS) \
|
||||
#define SET_UP_MASM() \
|
||||
InitializeVM(); \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
byte* buf = static_cast<byte*>(malloc(INSTR_SIZE)); \
|
||||
uint32_t encoding = 0; \
|
||||
MacroAssembler* assm = new MacroAssembler( \
|
||||
isolate, buf, INSTR_SIZE, v8::internal::CodeObjectRequired::kYes); \
|
||||
Decoder<DispatchingDecoderVisitor>* decoder = \
|
||||
new Decoder<DispatchingDecoderVisitor>(); \
|
||||
DisassemblingDecoder* disasm = new DisassemblingDecoder(); \
|
||||
decoder->AppendVisitor(disasm)
|
||||
|
||||
#define SET_UP_ASM() \
|
||||
InitializeVM(); \
|
||||
Isolate* isolate = CcTest::i_isolate(); \
|
||||
HandleScope scope(isolate); \
|
||||
byte* buf = static_cast<byte*>(malloc(INSTR_SIZE)); \
|
||||
uint32_t encoding = 0; \
|
||||
ASMCLASS* assm = new ASMCLASS(isolate, buf, INSTR_SIZE); \
|
||||
Assembler* assm = new Assembler(isolate, buf, INSTR_SIZE); \
|
||||
Decoder<DispatchingDecoderVisitor>* decoder = \
|
||||
new Decoder<DispatchingDecoderVisitor>(); \
|
||||
DisassemblingDecoder* disasm = new DisassemblingDecoder(); \
|
||||
decoder->AppendVisitor(disasm)
|
||||
|
||||
#define SET_UP() SET_UP_CLASS(Assembler)
|
||||
|
||||
#define COMPARE(ASM, EXP) \
|
||||
assm->Reset(); \
|
||||
assm->ASM; \
|
||||
@ -105,7 +116,7 @@ static void InitializeVM() {
|
||||
|
||||
|
||||
TEST_(bootstrap) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
// Instructions generated by C compiler, disassembled by objdump, and
|
||||
// reformatted to suit our disassembly style.
|
||||
@ -135,7 +146,7 @@ TEST_(bootstrap) {
|
||||
|
||||
|
||||
TEST_(mov_mvn) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
COMPARE(Mov(w0, Operand(0x1234)), "movz w0, #0x1234");
|
||||
COMPARE(Mov(x1, Operand(0x1234)), "movz x1, #0x1234");
|
||||
@ -169,7 +180,7 @@ TEST_(mov_mvn) {
|
||||
|
||||
|
||||
TEST_(move_immediate) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(movz(w0, 0x1234), "movz w0, #0x1234");
|
||||
COMPARE(movz(x1, 0xabcd0000), "movz x1, #0xabcd0000");
|
||||
@ -206,7 +217,7 @@ TEST_(move_immediate) {
|
||||
|
||||
|
||||
TEST(move_immediate_2) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
// Move instructions expected for certain immediates. This is really a macro
|
||||
// assembler test, to ensure it generates immediates efficiently.
|
||||
@ -262,7 +273,7 @@ TEST(move_immediate_2) {
|
||||
|
||||
|
||||
TEST_(add_immediate) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(add(w0, w1, Operand(0xff)), "add w0, w1, #0xff (255)");
|
||||
COMPARE(add(x2, x3, Operand(0x3ff)), "add x2, x3, #0x3ff (1023)");
|
||||
@ -292,7 +303,7 @@ TEST_(add_immediate) {
|
||||
|
||||
|
||||
TEST_(sub_immediate) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(sub(w0, w1, Operand(0xff)), "sub w0, w1, #0xff (255)");
|
||||
COMPARE(sub(x2, x3, Operand(0x3ff)), "sub x2, x3, #0x3ff (1023)");
|
||||
@ -320,7 +331,7 @@ TEST_(sub_immediate) {
|
||||
|
||||
|
||||
TEST_(add_shifted) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(add(w0, w1, Operand(w2)), "add w0, w1, w2");
|
||||
COMPARE(add(x3, x4, Operand(x5)), "add x3, x4, x5");
|
||||
@ -346,7 +357,7 @@ TEST_(add_shifted) {
|
||||
|
||||
|
||||
TEST_(sub_shifted) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(sub(w0, w1, Operand(w2)), "sub w0, w1, w2");
|
||||
COMPARE(sub(x3, x4, Operand(x5)), "sub x3, x4, x5");
|
||||
@ -376,7 +387,7 @@ TEST_(sub_shifted) {
|
||||
|
||||
|
||||
TEST_(add_extended) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(add(w0, w1, Operand(w2, UXTB)), "add w0, w1, w2, uxtb");
|
||||
COMPARE(adds(x3, x4, Operand(w5, UXTB, 1)), "adds x3, x4, w5, uxtb #1");
|
||||
@ -402,7 +413,7 @@ TEST_(add_extended) {
|
||||
|
||||
|
||||
TEST_(sub_extended) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(sub(w0, w1, Operand(w2, UXTB)), "sub w0, w1, w2, uxtb");
|
||||
COMPARE(subs(x3, x4, Operand(w5, UXTB, 1)), "subs x3, x4, w5, uxtb #1");
|
||||
@ -428,7 +439,7 @@ TEST_(sub_extended) {
|
||||
|
||||
|
||||
TEST_(adc_subc_ngc) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(adc(w0, w1, Operand(w2)), "adc w0, w1, w2");
|
||||
COMPARE(adc(x3, x4, Operand(x5)), "adc x3, x4, x5");
|
||||
@ -448,7 +459,7 @@ TEST_(adc_subc_ngc) {
|
||||
|
||||
|
||||
TEST_(mul_and_div) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(mul(w0, w1, w2), "mul w0, w1, w2");
|
||||
COMPARE(mul(x3, x4, x5), "mul x3, x4, x5");
|
||||
@ -481,7 +492,7 @@ TEST_(mul_and_div) {
|
||||
|
||||
|
||||
TEST(maddl_msubl) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(smaddl(x0, w1, w2, x3), "smaddl x0, w1, w2, x3");
|
||||
COMPARE(smaddl(x25, w21, w22, x16), "smaddl x25, w21, w22, x16");
|
||||
@ -498,7 +509,7 @@ TEST(maddl_msubl) {
|
||||
|
||||
|
||||
TEST_(dp_1_source) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(rbit(w0, w1), "rbit w0, w1");
|
||||
COMPARE(rbit(x2, x3), "rbit x2, x3");
|
||||
@ -517,7 +528,7 @@ TEST_(dp_1_source) {
|
||||
|
||||
|
||||
TEST_(bitfield) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(sxtb(w0, w1), "sxtb w0, w1");
|
||||
COMPARE(sxtb(x2, x3), "sxtb x2, w3");
|
||||
@ -559,7 +570,7 @@ TEST_(bitfield) {
|
||||
|
||||
|
||||
TEST_(extract) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(extr(w0, w1, w2, 0), "extr w0, w1, w2, #0");
|
||||
COMPARE(extr(x3, x4, x5, 1), "extr x3, x4, x5, #1");
|
||||
@ -573,7 +584,7 @@ TEST_(extract) {
|
||||
|
||||
|
||||
TEST_(logical_immediate) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
#define RESULT_SIZE (256)
|
||||
|
||||
char result[RESULT_SIZE];
|
||||
@ -699,7 +710,7 @@ TEST_(logical_immediate) {
|
||||
|
||||
|
||||
TEST_(logical_shifted) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(and_(w0, w1, Operand(w2)), "and w0, w1, w2");
|
||||
COMPARE(and_(x3, x4, Operand(x5, LSL, 1)), "and x3, x4, x5, lsl #1");
|
||||
@ -769,7 +780,7 @@ TEST_(logical_shifted) {
|
||||
|
||||
|
||||
TEST_(dp_2_source) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(lslv(w0, w1, w2), "lsl w0, w1, w2");
|
||||
COMPARE(lslv(x3, x4, x5), "lsl x3, x4, x5");
|
||||
@ -785,7 +796,7 @@ TEST_(dp_2_source) {
|
||||
|
||||
|
||||
TEST_(adr) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE_PREFIX(adr(x0, 0), "adr x0, #+0x0");
|
||||
COMPARE_PREFIX(adr(x1, 1), "adr x1, #+0x1");
|
||||
@ -801,7 +812,7 @@ TEST_(adr) {
|
||||
|
||||
|
||||
TEST_(branch) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
#define INST_OFF(x) ((x) >> kInstructionSizeLog2)
|
||||
COMPARE_PREFIX(b(INST_OFF(0x4)), "b #+0x4");
|
||||
@ -838,7 +849,7 @@ TEST_(branch) {
|
||||
|
||||
|
||||
TEST_(load_store) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldr(w0, MemOperand(x1)), "ldr w0, [x1]");
|
||||
COMPARE(ldr(w2, MemOperand(x3, 4)), "ldr w2, [x3, #4]");
|
||||
@ -895,7 +906,7 @@ TEST_(load_store) {
|
||||
|
||||
|
||||
TEST_(load_store_regoffset) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldr(w0, MemOperand(x1, w2, UXTW)), "ldr w0, [x1, w2, uxtw]");
|
||||
COMPARE(ldr(w3, MemOperand(x4, w5, UXTW, 2)), "ldr w3, [x4, w5, uxtw #2]");
|
||||
@ -980,7 +991,7 @@ TEST_(load_store_regoffset) {
|
||||
|
||||
|
||||
TEST_(load_store_byte) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldrb(w0, MemOperand(x1)), "ldrb w0, [x1]");
|
||||
COMPARE(ldrb(x2, MemOperand(x3)), "ldrb w2, [x3]");
|
||||
@ -1012,7 +1023,7 @@ TEST_(load_store_byte) {
|
||||
|
||||
|
||||
TEST_(load_store_half) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldrh(w0, MemOperand(x1)), "ldrh w0, [x1]");
|
||||
COMPARE(ldrh(x2, MemOperand(x3)), "ldrh w2, [x3]");
|
||||
@ -1048,7 +1059,7 @@ TEST_(load_store_half) {
|
||||
|
||||
|
||||
TEST_(load_store_fp) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldr(s0, MemOperand(x1)), "ldr s0, [x1]");
|
||||
COMPARE(ldr(s2, MemOperand(x3, 4)), "ldr s2, [x3, #4]");
|
||||
@ -1100,7 +1111,7 @@ TEST_(load_store_fp) {
|
||||
|
||||
|
||||
TEST_(load_store_unscaled) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldr(w0, MemOperand(x1, 1)), "ldur w0, [x1, #1]");
|
||||
COMPARE(ldr(w2, MemOperand(x3, -1)), "ldur w2, [x3, #-1]");
|
||||
@ -1133,7 +1144,7 @@ TEST_(load_store_unscaled) {
|
||||
|
||||
|
||||
TEST_(load_store_pair) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ldp(w0, w1, MemOperand(x2)), "ldp w0, w1, [x2]");
|
||||
COMPARE(ldp(x3, x4, MemOperand(x5)), "ldp x3, x4, [x5]");
|
||||
@ -1254,7 +1265,7 @@ TEST_(load_store_pair) {
|
||||
|
||||
#if 0 // TODO(all): enable.
|
||||
TEST_(load_literal) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE_PREFIX(ldr(x10, 0x1234567890abcdefUL), "ldr x10, pc+8");
|
||||
COMPARE_PREFIX(ldr(w20, 0xfedcba09), "ldr w20, pc+8");
|
||||
@ -1266,7 +1277,7 @@ TEST_(load_literal) {
|
||||
#endif
|
||||
|
||||
TEST_(cond_select) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(csel(w0, w1, w2, eq), "csel w0, w1, w2, eq");
|
||||
COMPARE(csel(x3, x4, x5, ne), "csel x3, x4, x5, ne");
|
||||
@ -1301,7 +1312,7 @@ TEST_(cond_select) {
|
||||
|
||||
|
||||
TEST(cond_select_macro) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
COMPARE(Csel(w0, w1, -1, eq), "csinv w0, w1, wzr, eq");
|
||||
COMPARE(Csel(w2, w3, 0, ne), "csel w2, w3, wzr, ne");
|
||||
@ -1315,7 +1326,7 @@ TEST(cond_select_macro) {
|
||||
|
||||
|
||||
TEST_(cond_cmp) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(ccmn(w0, w1, NZCVFlag, eq), "ccmn w0, w1, #NZCV, eq");
|
||||
COMPARE(ccmn(x2, x3, NZCFlag, ne), "ccmn x2, x3, #NZCv, ne");
|
||||
@ -1333,7 +1344,7 @@ TEST_(cond_cmp) {
|
||||
|
||||
|
||||
TEST_(cond_cmp_macro) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
COMPARE(Ccmp(w0, -1, VFlag, hi), "ccmn w0, #1, #nzcV, hi");
|
||||
COMPARE(Ccmp(x1, -31, CFlag, ge), "ccmn x1, #31, #nzCv, ge");
|
||||
@ -1345,7 +1356,7 @@ TEST_(cond_cmp_macro) {
|
||||
|
||||
|
||||
TEST_(fmov_imm) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fmov(s0, 1.0f), "fmov s0, #0x70 (1.0000)");
|
||||
COMPARE(fmov(s31, -13.0f), "fmov s31, #0xaa (-13.0000)");
|
||||
@ -1357,7 +1368,7 @@ TEST_(fmov_imm) {
|
||||
|
||||
|
||||
TEST_(fmov_reg) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fmov(w3, s13), "fmov w3, s13");
|
||||
COMPARE(fmov(x6, d26), "fmov x6, d26");
|
||||
@ -1371,7 +1382,7 @@ TEST_(fmov_reg) {
|
||||
|
||||
|
||||
TEST_(fp_dp1) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fabs(s0, s1), "fabs s0, s1");
|
||||
COMPARE(fabs(s31, s30), "fabs s31, s30");
|
||||
@ -1409,7 +1420,7 @@ TEST_(fp_dp1) {
|
||||
|
||||
|
||||
TEST_(fp_dp2) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fadd(s0, s1, s2), "fadd s0, s1, s2");
|
||||
COMPARE(fadd(d3, d4, d5), "fadd d3, d4, d5");
|
||||
@ -1433,7 +1444,7 @@ TEST_(fp_dp2) {
|
||||
|
||||
|
||||
TEST(fp_dp3) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fmadd(s7, s8, s9, s10), "fmadd s7, s8, s9, s10");
|
||||
COMPARE(fmadd(d10, d11, d12, d10), "fmadd d10, d11, d12, d10");
|
||||
@ -1450,7 +1461,7 @@ TEST(fp_dp3) {
|
||||
|
||||
|
||||
TEST_(fp_compare) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fcmp(s0, s1), "fcmp s0, s1");
|
||||
COMPARE(fcmp(s31, s30), "fcmp s31, s30");
|
||||
@ -1464,7 +1475,7 @@ TEST_(fp_compare) {
|
||||
|
||||
|
||||
TEST_(fp_cond_compare) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fccmp(s0, s1, NoFlag, eq), "fccmp s0, s1, #nzcv, eq");
|
||||
COMPARE(fccmp(s2, s3, ZVFlag, ne), "fccmp s2, s3, #nZcV, ne");
|
||||
@ -1482,7 +1493,7 @@ TEST_(fp_cond_compare) {
|
||||
|
||||
|
||||
TEST_(fp_select) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fcsel(s0, s1, s2, eq), "fcsel s0, s1, s2, eq")
|
||||
COMPARE(fcsel(s31, s31, s30, ne), "fcsel s31, s31, s30, ne");
|
||||
@ -1496,7 +1507,7 @@ TEST_(fp_select) {
|
||||
|
||||
|
||||
TEST_(fcvt_scvtf_ucvtf) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(fcvtas(w0, s1), "fcvtas w0, s1");
|
||||
COMPARE(fcvtas(x2, s3), "fcvtas x2, s3");
|
||||
@ -1558,7 +1569,7 @@ TEST_(fcvt_scvtf_ucvtf) {
|
||||
|
||||
|
||||
TEST_(system_mrs) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(mrs(x0, NZCV), "mrs x0, nzcv");
|
||||
COMPARE(mrs(lr, NZCV), "mrs lr, nzcv");
|
||||
@ -1569,7 +1580,7 @@ TEST_(system_mrs) {
|
||||
|
||||
|
||||
TEST_(system_msr) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(msr(NZCV, x0), "msr nzcv, x0");
|
||||
COMPARE(msr(NZCV, x30), "msr nzcv, lr");
|
||||
@ -1580,7 +1591,7 @@ TEST_(system_msr) {
|
||||
|
||||
|
||||
TEST_(system_nop) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(nop(), "nop");
|
||||
|
||||
@ -1589,7 +1600,7 @@ TEST_(system_nop) {
|
||||
|
||||
|
||||
TEST_(debug) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
DCHECK(kImmExceptionIsDebug == 0xdeb0);
|
||||
|
||||
@ -1608,7 +1619,7 @@ TEST_(debug) {
|
||||
|
||||
|
||||
TEST_(hlt) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(hlt(0), "hlt #0x0");
|
||||
COMPARE(hlt(1), "hlt #0x1");
|
||||
@ -1619,7 +1630,7 @@ TEST_(hlt) {
|
||||
|
||||
|
||||
TEST_(brk) {
|
||||
SET_UP();
|
||||
SET_UP_ASM();
|
||||
|
||||
COMPARE(brk(0), "brk #0x0");
|
||||
COMPARE(brk(1), "brk #0x1");
|
||||
@ -1630,7 +1641,7 @@ TEST_(brk) {
|
||||
|
||||
|
||||
TEST_(add_sub_negative) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
COMPARE(Add(x10, x0, -42), "sub x10, x0, #0x2a (42)");
|
||||
COMPARE(Add(x11, x1, -687), "sub x11, x1, #0x2af (687)");
|
||||
@ -1661,7 +1672,7 @@ TEST_(add_sub_negative) {
|
||||
|
||||
|
||||
TEST_(logical_immediate_move) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
COMPARE(And(w0, w1, 0), "movz w0, #0x0");
|
||||
COMPARE(And(x0, x1, 0), "movz x0, #0x0");
|
||||
@ -1700,7 +1711,7 @@ TEST_(logical_immediate_move) {
|
||||
|
||||
|
||||
TEST_(barriers) {
|
||||
SET_UP_CLASS(MacroAssembler);
|
||||
SET_UP_MASM();
|
||||
|
||||
// DMB
|
||||
COMPARE(Dmb(FullSystem, BarrierAll), "dmb sy");
|
||||
|
@ -113,7 +113,8 @@ void check(uint32_t key) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
v8::internal::byte buffer[2048];
|
||||
MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof buffer);
|
||||
MacroAssembler masm(CcTest::i_isolate(), buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
generate(&masm, key);
|
||||
|
||||
|
@ -4943,7 +4943,8 @@ TEST(NextCodeLinkIsWeak) {
|
||||
|
||||
static Handle<Code> DummyOptimizedCode(Isolate* isolate) {
|
||||
i::byte buffer[i::Assembler::kMinimalBufferSize];
|
||||
MacroAssembler masm(isolate, buffer, sizeof(buffer));
|
||||
MacroAssembler masm(isolate, buffer, sizeof(buffer),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
CodeDesc desc;
|
||||
masm.Push(isolate->factory()->undefined_value());
|
||||
masm.Drop(1);
|
||||
|
@ -84,7 +84,8 @@ TEST(CopyBytes) {
|
||||
byte* r0_;
|
||||
byte* r1_;
|
||||
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
// Code to be generated: The stuff in CopyBytes followed by a store of R0 and
|
||||
@ -147,7 +148,8 @@ TEST(LoadAndStoreWithRepresentation) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
|
||||
__ sub(sp, sp, Operand(1 * kPointerSize));
|
||||
Label exit;
|
||||
|
@ -59,7 +59,8 @@ TEST(LoadAndStoreWithRepresentation) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
|
||||
__ push(ebx);
|
||||
__ push(edx);
|
||||
|
@ -85,7 +85,8 @@ TEST(CopyBytes) {
|
||||
byte* a0_;
|
||||
byte* a1_;
|
||||
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
// Code to be generated: The stuff in CopyBytes followed by a store of a0 and
|
||||
@ -187,7 +188,8 @@ TEST(jump_tables4) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
const int kNumCases = 512;
|
||||
|
@ -86,7 +86,8 @@ TEST(CopyBytes) {
|
||||
byte* a0_;
|
||||
byte* a1_;
|
||||
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
// Code to be generated: The stuff in CopyBytes followed by a store of a0 and
|
||||
@ -151,7 +152,8 @@ TEST(LoadConstants) {
|
||||
refConstants[i] = ~(mask << i);
|
||||
}
|
||||
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
__ mov(a4, a0);
|
||||
@ -185,7 +187,8 @@ TEST(LoadAddress) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
Label to_jump, skip;
|
||||
__ mov(a4, a0);
|
||||
@ -228,7 +231,8 @@ TEST(jump_tables4) {
|
||||
CcTest::InitializeVM();
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
MacroAssembler assembler(isolate, NULL, 0);
|
||||
MacroAssembler assembler(isolate, NULL, 0,
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler;
|
||||
|
||||
const int kNumCases = 512;
|
||||
|
@ -154,7 +154,8 @@ TEST(SmiMove) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
|
||||
EntryCode(masm);
|
||||
Label exit;
|
||||
@ -239,7 +240,8 @@ TEST(SmiCompare) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -287,7 +289,8 @@ TEST(Integer32ToSmi) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -413,7 +416,8 @@ TEST(Integer64PlusConstantToSmi) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -455,7 +459,8 @@ TEST(SmiCheck) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -674,7 +679,8 @@ TEST(SmiNeg) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -885,7 +891,8 @@ TEST(SmiAdd) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1101,7 +1108,8 @@ TEST(SmiSub) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1189,7 +1197,8 @@ TEST(SmiMul) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1292,7 +1301,8 @@ TEST(SmiDiv) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1399,7 +1409,8 @@ TEST(SmiMod) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1493,7 +1504,8 @@ TEST(SmiIndex) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1559,7 +1571,8 @@ TEST(SmiSelectNonSmi) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1635,7 +1648,8 @@ TEST(SmiAnd) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1713,7 +1727,8 @@ TEST(SmiOr) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1793,7 +1808,8 @@ TEST(SmiXor) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1857,7 +1873,8 @@ TEST(SmiNot) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -1950,7 +1967,8 @@ TEST(SmiShiftLeft) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -2053,7 +2071,8 @@ TEST(SmiShiftLogicalRight) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -2119,7 +2138,8 @@ TEST(SmiShiftArithmeticRight) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -2180,7 +2200,8 @@ TEST(PositiveSmiTimesPowerOfTwoToInteger64) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
EntryCode(masm);
|
||||
@ -2220,7 +2241,8 @@ TEST(OperandOffset) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
|
||||
MacroAssembler* masm = &assembler;
|
||||
Label exit;
|
||||
@ -2570,7 +2592,8 @@ TEST(LoadAndStoreWithRepresentation) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
|
||||
EntryCode(masm);
|
||||
__ subq(rsp, Immediate(1 * kPointerSize));
|
||||
|
@ -59,7 +59,8 @@ TEST(LoadAndStoreWithRepresentation) {
|
||||
CHECK(buffer);
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope handles(isolate);
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size));
|
||||
MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
|
||||
v8::internal::CodeObjectRequired::kYes);
|
||||
MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
|
||||
__ push(ebx);
|
||||
__ push(edx);
|
||||
|
Loading…
Reference in New Issue
Block a user