| Index: test/cctest/test-assembler-x64.cc
|
| diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
|
| index f7d2311192303b20c8d38c771e592056add110e5..30577751ed4aad226a05f6b8d3f378f6bd186ed5 100644
|
| --- a/test/cctest/test-assembler-x64.cc
|
| +++ b/test/cctest/test-assembler-x64.cc
|
| @@ -96,7 +96,7 @@ TEST(AssemblerX64ReturnOperation) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that copies argument 2 and returns it.
|
| __ movq(rax, arg2);
|
| @@ -118,7 +118,7 @@ TEST(AssemblerX64StackOperations) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that copies argument 2 and returns it.
|
| // We compile without stack frame pointers, so the gdb debugger shows
|
| @@ -150,7 +150,7 @@ TEST(AssemblerX64ArithmeticOperations) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that adds arguments returning the sum.
|
| __ movq(rax, arg2);
|
| @@ -172,7 +172,7 @@ TEST(AssemblerX64ImulOperation) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that multiplies arguments returning the high
|
| // word.
|
| @@ -200,7 +200,7 @@ TEST(AssemblerX64MemoryOperands) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that copies argument 2 and returns it.
|
| __ push(rbp);
|
| @@ -234,7 +234,7 @@ TEST(AssemblerX64ControlFlow) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
|
|
| // Assemble a simple function that copies argument 1 and returns it.
|
| __ push(rbp);
|
| @@ -263,7 +263,7 @@ TEST(AssemblerX64LoopImmediates) {
|
| &actual_size,
|
| true));
|
| CHECK(buffer);
|
| - Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
|
| + Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
|
| // Assemble two loops using rax as counter, and verify the ending counts.
|
| Label Fail;
|
| __ movq(rax, Immediate(-3));
|
| @@ -353,7 +353,7 @@ TEST(AssemblerX64LabelChaining) {
|
| // Test chaining of label usages within instructions (issue 1644).
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| - Assembler assm(Isolate::Current(), NULL, 0);
|
| + Assembler assm(CcTest::i_isolate(), NULL, 0);
|
|
|
| Label target;
|
| __ j(equal, &target);
|
| @@ -367,7 +367,7 @@ TEST(AssemblerMultiByteNop) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::internal::byte buffer[1024];
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Assembler assm(isolate, buffer, sizeof(buffer));
|
| __ push(rbx);
|
| __ push(rcx);
|
| @@ -433,7 +433,6 @@ TEST(AssemblerMultiByteNop) {
|
| #define ELEMENT_COUNT 4
|
|
|
| void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| - CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::internal::byte buffer[1024];
|
|
|
| @@ -441,7 +440,7 @@ void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| v8::Local<v8::Array> vec = v8::Local<v8::Array>::Cast(args[0]);
|
| CHECK_EQ(ELEMENT_COUNT, vec->Length());
|
|
|
| - Isolate* isolate = Isolate::Current();
|
| + Isolate* isolate = CcTest::i_isolate();
|
| Assembler assm(isolate, buffer, sizeof(buffer));
|
|
|
| // Remove return address from the stack for fix stack frame alignment.
|
| @@ -483,9 +482,10 @@ void DoSSE2(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
|
|
|
|
| TEST(StackAlignmentForSSE2) {
|
| + CcTest::InitializeVM();
|
| CHECK_EQ(0, OS::ActivationFrameAlignment() % 16);
|
|
|
| - v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope handle_scope(isolate);
|
| v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
|
| global_template->Set(v8_str("do_sse2"), v8::FunctionTemplate::New(DoSSE2));
|
|
|