Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1606)

Unified Diff: test/cctest/test-assembler-x64.cc

Issue 23970004: Revert r16648, r16641, r16638 and r16637. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-code-stubs-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-x64.cc
diff --git a/test/cctest/test-assembler-x64.cc b/test/cctest/test-assembler-x64.cc
index 7fd4db4e510e2c01450beeec0629b3442ee57149..f7d2311192303b20c8d38c771e592056add110e5 100644
--- a/test/cctest/test-assembler-x64.cc
+++ b/test/cctest/test-assembler-x64.cc
@@ -35,7 +35,34 @@
#include "serialize.h"
#include "cctest.h"
-using namespace v8::internal;
+using v8::internal::Assembler;
+using v8::internal::Code;
+using v8::internal::CodeDesc;
+using v8::internal::FUNCTION_CAST;
+using v8::internal::Immediate;
+using v8::internal::Isolate;
+using v8::internal::Label;
+using v8::internal::OS;
+using v8::internal::Operand;
+using v8::internal::byte;
+using v8::internal::greater;
+using v8::internal::less_equal;
+using v8::internal::equal;
+using v8::internal::not_equal;
+using v8::internal::r13;
+using v8::internal::r15;
+using v8::internal::r8;
+using v8::internal::r9;
+using v8::internal::rax;
+using v8::internal::rbx;
+using v8::internal::rbp;
+using v8::internal::rcx;
+using v8::internal::rdi;
+using v8::internal::rdx;
+using v8::internal::rsi;
+using v8::internal::rsp;
+using v8::internal::times_1;
+using v8::internal::xmm0;
// Test the x64 assembler by compiling some simple functions into
// a buffer and executing them. These tests do not initialize the
@@ -65,10 +92,9 @@ static const v8::internal::Register arg2 = rsi;
TEST(AssemblerX64ReturnOperation) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -88,10 +114,9 @@ TEST(AssemblerX64ReturnOperation) {
TEST(AssemblerX64StackOperations) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -121,10 +146,9 @@ TEST(AssemblerX64StackOperations) {
TEST(AssemblerX64ArithmeticOperations) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -144,10 +168,9 @@ TEST(AssemblerX64ArithmeticOperations) {
TEST(AssemblerX64ImulOperation) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -173,10 +196,9 @@ TEST(AssemblerX64ImulOperation) {
TEST(AssemblerX64MemoryOperands) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -208,10 +230,9 @@ TEST(AssemblerX64MemoryOperands) {
TEST(AssemblerX64ControlFlow) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
@@ -238,10 +259,9 @@ TEST(AssemblerX64ControlFlow) {
TEST(AssemblerX64LoopImmediates) {
// Allocate an executable page of memory.
size_t actual_size;
- byte* buffer = static_cast<byte*>(VirtualMemory::AllocateRegion(
- Assembler::kMinimalBufferSize,
- &actual_size,
- VirtualMemory::EXECUTABLE));
+ byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize,
+ &actual_size,
+ true));
CHECK(buffer);
Assembler assm(Isolate::Current(), buffer, static_cast<int>(actual_size));
// Assemble two loops using rax as counter, and verify the ending counts.
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698