Clean up the usage of V8_TARGET_ARCH_${arch} and V8_HOST_ARCH_${arch}

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/18037002

Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-06-28 15:34:48 +00:00
parent d8fbf59a7d
commit c7a9bffbcf
91 changed files with 176 additions and 178 deletions

View File

@ -36,7 +36,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "arm/assembler-arm-inl.h"
#include "serialize.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "codegen.h"
#include "debug.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "bootstrapper.h"
#include "code-stubs.h"
@ -3077,7 +3077,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
__ mov(r0, Operand(r4));
__ mov(r1, Operand(r6));
#if defined(V8_HOST_ARCH_ARM)
#if V8_HOST_ARCH_ARM
int frame_alignment = MacroAssembler::ActivationFrameAlignment();
int frame_alignment_mask = frame_alignment - 1;
if (FLAG_debug_code) {
@ -7125,7 +7125,7 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
__ and_(sp, sp, Operand(-frame_alignment));
}
#if defined(V8_HOST_ARCH_ARM)
#if V8_HOST_ARCH_ARM
int32_t entry_hook =
reinterpret_cast<int32_t>(masm->isolate()->function_entry_hook());
__ mov(ip, Operand(entry_hook));

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "codegen.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "constants-arm.h"

View File

@ -32,7 +32,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "cpu.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "codegen.h"
#include "debug.h"

View File

@ -56,7 +56,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "constants-arm.h"
#include "disasm.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "assembler.h"
#include "assembler-arm.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "code-stubs.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "assembler-arm.h"
#include "code-stubs.h"

View File

@ -29,7 +29,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "bootstrapper.h"
#include "codegen.h"
@ -985,19 +985,19 @@ void MacroAssembler::InitializeNewString(Register string,
int MacroAssembler::ActivationFrameAlignment() {
#if defined(V8_HOST_ARCH_ARM)
#if V8_HOST_ARCH_ARM
// Running on the real platform. Use the alignment as mandated by the local
// environment.
// Note: This will break if we ever start generating snapshots on one ARM
// platform for another ARM platform with a different alignment.
return OS::ActivationFrameAlignment();
#else // defined(V8_HOST_ARCH_ARM)
#else // V8_HOST_ARCH_ARM
// If we are using the simulator then we should always align to the expected
// alignment. As the simulator is used to generate snapshots we do not know
// if the target platform will need alignment, so this is controlled from a
// flag.
return FLAG_sim_stack_alignment;
#endif // defined(V8_HOST_ARCH_ARM)
#endif // V8_HOST_ARCH_ARM
}
@ -3403,7 +3403,7 @@ void MacroAssembler::CallCFunctionHelper(Register function,
// Make sure that the stack is aligned before calling a C function unless
// running in the simulator. The simulator has its own alignment check which
// provides more information.
#if defined(V8_HOST_ARCH_ARM)
#if V8_HOST_ARCH_ARM
if (emit_debug_code()) {
int frame_alignment = OS::ActivationFrameAlignment();
int frame_alignment_mask = frame_alignment - 1;

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "unicode.h"
#include "log.h"

View File

@ -30,7 +30,7 @@
#include <cstdarg>
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "disasm.h"
#include "assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_ARM
#include "ic-inl.h"
#include "codegen.h"

View File

@ -1308,7 +1308,7 @@ ExternalReference ExternalReference::address_of_the_hole_nan() {
ExternalReference ExternalReference::re_check_stack_guard_state(
Isolate* isolate) {
Address function;
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
function = FUNCTION_ADDR(RegExpMacroAssemblerX64::CheckStackGuardState);
#elif V8_TARGET_ARCH_IA32
function = FUNCTION_ADDR(RegExpMacroAssemblerIA32::CheckStackGuardState);

View File

@ -154,17 +154,17 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
#if defined(THREAD_SANITIZER)
#include "atomicops_internals_tsan.h"
#elif defined(_MSC_VER) && \
(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_X64))
(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64)
#include "atomicops_internals_x86_msvc.h"
#elif defined(__APPLE__) && \
(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_X64))
(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64)
#include "atomicops_internals_x86_macosx.h"
#elif defined(__GNUC__) && \
(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_X64))
(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64)
#include "atomicops_internals_x86_gcc.h"
#elif defined(__GNUC__) && defined(V8_HOST_ARCH_ARM)
#elif defined(__GNUC__) && V8_HOST_ARCH_ARM
#include "atomicops_internals_arm_gcc.h"
#elif defined(__GNUC__) && defined(V8_HOST_ARCH_MIPS)
#elif defined(__GNUC__) && V8_HOST_ARCH_MIPS
#include "atomicops_internals_mips_gcc.h"
#else
#error "Atomic operations are not supported on your platform"

View File

@ -95,7 +95,7 @@ namespace internal {
V(KeyedLoadField)
// List of code stubs only used on ARM platforms.
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
#define CODE_STUB_LIST_ARM(V) \
V(GetProperty) \
V(SetProperty) \
@ -107,7 +107,7 @@ namespace internal {
#endif
// List of code stubs only used on MIPS platforms.
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
#define CODE_STUB_LIST_MIPS(V) \
V(RegExpCEntry) \
V(DirectCEntry)

View File

@ -253,7 +253,7 @@ class StackGuard {
void EnableInterrupts();
void DisableInterrupts();
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
static const uintptr_t kInterruptLimit = V8_UINT64_C(0xfffffffffffffffe);
static const uintptr_t kIllegalLimit = V8_UINT64_C(0xfffffffffffffff8);
#else

View File

@ -34,7 +34,7 @@
#include "smart-pointers.h"
#include "string-stream.h"
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
#include "arm/assembler-arm-inl.h"
#endif
@ -520,7 +520,7 @@ void FlagList::ResetAllFlags() {
// static
void FlagList::PrintHelp() {
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
CpuFeatures::PrintTarget();
CpuFeatures::Probe();
CpuFeatures::PrintFeatures();

View File

@ -423,7 +423,7 @@ StackFrame::Type StackFrame::GetCallerState(State* state) const {
Address StackFrame::UnpaddedFP() const {
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
if (!is_optimized()) return fp();
int32_t alignment_state = Memory::int32_at(
fp() + JavaScriptFrameConstants::kDynamicAlignmentStateOffset);

View File

@ -332,7 +332,7 @@ class FullCodeGenerator: public AstVisitor {
// Helper function to split control flow and avoid a branch to the
// fall-through label if it is set up.
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
void Split(Condition cc,
Register lhs,
const Operand& rhs,

View File

@ -217,7 +217,7 @@ class DebugSectionBase : public ZoneObject {
struct MachOSectionHeader {
char sectname[16];
char segname[16];
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
uint32_t addr;
uint32_t size;
#else
@ -525,7 +525,7 @@ class MachO BASE_EMBEDDED {
uint32_t ncmds;
uint32_t sizeofcmds;
uint32_t flags;
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
uint32_t reserved;
#endif
};
@ -534,7 +534,7 @@ class MachO BASE_EMBEDDED {
uint32_t cmd;
uint32_t cmdsize;
char segname[16];
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
uint32_t vmaddr;
uint32_t vmsize;
uint32_t fileoff;
@ -560,11 +560,11 @@ class MachO BASE_EMBEDDED {
Writer::Slot<MachOHeader> WriteHeader(Writer* w) {
ASSERT(w->position() == 0);
Writer::Slot<MachOHeader> header = w->CreateSlotHere<MachOHeader>();
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
header->magic = 0xFEEDFACEu;
header->cputype = 7; // i386
header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
header->magic = 0xFEEDFACFu;
header->cputype = 7 | 0x01000000; // i386 | 64-bit ABI
header->cpusubtype = 3; // CPU_SUBTYPE_I386_ALL
@ -585,7 +585,7 @@ class MachO BASE_EMBEDDED {
uintptr_t code_size) {
Writer::Slot<MachOSegmentCommand> cmd =
w->CreateSlotHere<MachOSegmentCommand>();
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
cmd->cmd = LC_SEGMENT_32;
#else
cmd->cmd = LC_SEGMENT_64;
@ -672,10 +672,10 @@ class ELF BASE_EMBEDDED {
void WriteHeader(Writer* w) {
ASSERT(w->position() == 0);
Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>();
#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM
const uint8_t ident[16] =
{ 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
const uint8_t ident[16] =
{ 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#else
@ -683,14 +683,14 @@ class ELF BASE_EMBEDDED {
#endif
OS::MemCopy(header->ident, ident, 16);
header->type = 1;
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
header->machine = 3;
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
// Processor identification value for x64 is 62 as defined in
// System V ABI, AMD64 Supplement
// http://www.x86-64.org/documentation/abi.pdf
header->machine = 62;
#elif defined(V8_TARGET_ARCH_ARM)
#elif V8_TARGET_ARCH_ARM
// Set to EM_ARM, defined as 40, in "ARM ELF File Format" at
// infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf
header->machine = 40;
@ -784,7 +784,7 @@ class ELFSymbol BASE_EMBEDDED {
Binding binding() const {
return static_cast<Binding>(info >> 4);
}
#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM
struct SerializedLayout {
SerializedLayout(uint32_t name,
uintptr_t value,
@ -807,7 +807,7 @@ class ELFSymbol BASE_EMBEDDED {
uint8_t other;
uint16_t section;
};
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
struct SerializedLayout {
SerializedLayout(uint32_t name,
uintptr_t value,
@ -921,7 +921,7 @@ class ELFSymbolTable : public ELFSection {
class CodeDescription BASE_EMBEDDED {
public:
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
enum StackState {
POST_RBP_PUSH,
POST_RBP_SET,
@ -984,7 +984,7 @@ class CodeDescription BASE_EMBEDDED {
lineinfo_ != NULL;
}
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
uintptr_t GetStackStateStartAddress(StackState state) const {
ASSERT(state < STACK_STATE_MAX);
return stack_state_start_addresses_[state];
@ -1012,7 +1012,7 @@ class CodeDescription BASE_EMBEDDED {
GDBJITLineInfo* lineinfo_;
GDBJITInterface::CodeTag tag_;
CompilationInfo* info_;
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
uintptr_t stack_state_start_addresses_[STACK_STATE_MAX];
#endif
};
@ -1106,13 +1106,13 @@ class DebugInfoSection : public DebugSection {
w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize());
Writer::Slot<uint32_t> fb_block_size = w->CreateSlotHere<uint32_t>();
uintptr_t fb_block_start = w->position();
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
w->Write<uint8_t>(DW_OP_reg5); // The frame pointer's here on ia32
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
w->Write<uint8_t>(DW_OP_reg6); // and here on x64.
#elif defined(V8_TARGET_ARCH_ARM)
#elif V8_TARGET_ARCH_ARM
UNIMPLEMENTED();
#elif defined(V8_TARGET_ARCH_MIPS)
#elif V8_TARGET_ARCH_MIPS
UNIMPLEMENTED();
#else
#error Unsupported target architecture.
@ -1563,7 +1563,7 @@ class DebugLineSection : public DebugSection {
};
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
class UnwindInfoSection : public DebugSection {
public:
@ -1797,7 +1797,7 @@ static void CreateDWARFSections(CodeDescription* desc,
obj->AddSection(new(zone) DebugAbbrevSection(desc), zone);
obj->AddSection(new(zone) DebugLineSection(desc), zone);
}
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
obj->AddSection(new(zone) UnwindInfoSection(desc), zone);
#endif
}
@ -2015,7 +2015,7 @@ void GDBJITInterface::AddCode(Handle<Name> name,
}
static void AddUnwindInfo(CodeDescription* desc) {
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
if (desc->tag() == GDBJITInterface::FUNCTION) {
// To avoid propagating unwinding information through
// compilation pipeline we use an approximation.

View File

@ -105,8 +105,8 @@ namespace internal {
// Target architecture detection. This may be set externally. If not, detect
// in the same way as the host architecture, that is, target the native
// environment as presented by the compiler.
#if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_IA32) && \
!defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_MIPS)
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && \
!V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS
#if defined(_M_X64) || defined(__x86_64__)
#define V8_TARGET_ARCH_X64 1
#elif defined(_M_IX86) || defined(__i386__)
@ -121,18 +121,16 @@ namespace internal {
#endif
// Check for supported combinations of host and target architectures.
#if defined(V8_TARGET_ARCH_IA32) && !defined(V8_HOST_ARCH_IA32)
#if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32
#error Target architecture ia32 is only supported on ia32 host
#endif
#if defined(V8_TARGET_ARCH_X64) && !defined(V8_HOST_ARCH_X64)
#if V8_TARGET_ARCH_X64 && !V8_HOST_ARCH_X64
#error Target architecture x64 is only supported on x64 host
#endif
#if (defined(V8_TARGET_ARCH_ARM) && \
!(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_ARM)))
#if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM))
#error Target architecture arm is only supported on arm and ia32 host
#endif
#if (defined(V8_TARGET_ARCH_MIPS) && \
!(defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_MIPS)))
#if (V8_TARGET_ARCH_MIPS && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_MIPS))
#error Target architecture mips is only supported on mips and ia32 host
#endif
@ -140,22 +138,22 @@ namespace internal {
// Setting USE_SIMULATOR explicitly from the build script will force
// the use of a simulated environment.
#if !defined(USE_SIMULATOR)
#if (defined(V8_TARGET_ARCH_ARM) && !defined(V8_HOST_ARCH_ARM))
#if (V8_TARGET_ARCH_ARM && !V8_HOST_ARCH_ARM)
#define USE_SIMULATOR 1
#endif
#if (defined(V8_TARGET_ARCH_MIPS) && !defined(V8_HOST_ARCH_MIPS))
#if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS)
#define USE_SIMULATOR 1
#endif
#endif
// Determine architecture endiannes (we only support little-endian).
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#define V8_TARGET_LITTLE_ENDIAN 1
#elif defined(V8_TARGET_ARCH_X64)
#elif V8_TARGET_ARCH_X64
#define V8_TARGET_LITTLE_ENDIAN 1
#elif defined(V8_TARGET_ARCH_ARM)
#elif V8_TARGET_ARCH_ARM
#define V8_TARGET_LITTLE_ENDIAN 1
#elif defined(V8_TARGET_ARCH_MIPS)
#elif V8_TARGET_ARCH_MIPS
#define V8_TARGET_LITTLE_ENDIAN 1
#else
#error Unknown target architecture endiannes

View File

@ -66,7 +66,7 @@ Heap::Heap()
: isolate_(NULL),
// semispace_size_ should be a power of 2 and old_generation_size_ should be
// a multiple of Page::kPageSize.
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#define LUMP_OF_MEMORY (2 * MB)
code_range_size_(512*MB),
#else

View File

@ -1955,7 +1955,7 @@ class Heap {
int scan_on_scavenge_pages_;
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
static const int kMaxObjectSizeInNewSpace = 1024*KB;
#else
static const int kMaxObjectSizeInNewSpace = 512*KB;

View File

@ -1566,7 +1566,7 @@ HValue* HUnaryMathOperation::Canonicalize() {
HValue* new_right =
LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(right);
if (new_right == NULL &&
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
CpuFeatures::IsSupported(SUDIV) &&
#endif
hdiv->observed_input_representation(2).IsSmiOrInteger32()) {

View File

@ -7632,7 +7632,7 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
return false;
}
#if !defined(V8_TARGET_ARCH_IA32)
#if !V8_TARGET_ARCH_IA32
// Target must be able to use caller's context.
CompilationInfo* outer_info = current_info();
if (target->context() != outer_info->closure()->context() ||
@ -7781,7 +7781,7 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
undefined,
function_state()->inlining_kind(),
undefined_receiver);
#ifdef V8_TARGET_ARCH_IA32
#if V8_TARGET_ARCH_IA32
// IA32 only, overwrite the caller's context in the deoptimization
// environment with the correct one.
//

View File

@ -36,7 +36,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "disassembler.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "codegen.h"
#include "deoptimizer.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "bootstrapper.h"
#include "code-stubs.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "codegen.h"
#include "heap.h"

View File

@ -33,7 +33,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "cpu.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "codegen.h"
#include "debug.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "codegen.h"
#include "deoptimizer.h"

View File

@ -31,7 +31,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "disasm.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "assembler.h"
#include "assembler-ia32.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "code-stubs.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "codegen.h"
#include "ic-inl.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "ia32/lithium-codegen-ia32.h"
#include "ic.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "ia32/lithium-gap-resolver-ia32.h"
#include "ia32/lithium-codegen-ia32.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "lithium-allocator-inl.h"
#include "ia32/lithium-ia32.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "bootstrapper.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "unicode.h"
#include "log.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
#include "ic-inl.h"
#include "codegen.h"

View File

@ -116,7 +116,7 @@ void ThreadLocalTop::InitializeInternal() {
void ThreadLocalTop::Initialize() {
InitializeInternal();
#ifdef USE_SIMULATOR
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
simulator_ = Simulator::current(isolate_);
#elif V8_TARGET_ARCH_MIPS
simulator_ = Simulator::current(isolate_);
@ -1625,7 +1625,7 @@ char* Isolate::RestoreThread(char* from) {
// This might be just paranoia, but it seems to be needed in case a
// thread_local_top_ is restored on a separate OS thread.
#ifdef USE_SIMULATOR
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
thread_local_top()->simulator_ = Simulator::current(this);
#elif V8_TARGET_ARCH_MIPS
thread_local_top()->simulator_ = Simulator::current(this);
@ -1776,8 +1776,8 @@ Isolate::Isolate()
thread_manager_ = new ThreadManager();
thread_manager_->isolate_ = this;
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
V8_TARGET_ARCH_MIPS && !defined(__mips__)
simulator_initialized_ = false;
simulator_i_cache_ = NULL;
simulator_redirection_ = NULL;
@ -2134,7 +2134,7 @@ bool Isolate::Init(Deserializer* des) {
// Initialize other runtime facilities
#if defined(USE_SIMULATOR)
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
Simulator::Initialize(this);
#endif
#endif

View File

@ -101,8 +101,8 @@ class Debugger;
class DebuggerAgent;
#endif
#if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
!defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
#if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
!defined(__mips__) && V8_TARGET_ARCH_MIPS
class Redirection;
class Simulator;
#endif
@ -263,7 +263,7 @@ class ThreadLocalTop BASE_EMBEDDED {
Address handler_; // try-blocks are chained through the stack
#ifdef USE_SIMULATOR
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
Simulator* simulator_;
#endif
#endif // USE_SIMULATOR
@ -391,8 +391,8 @@ class Isolate {
thread_id_(thread_id),
stack_limit_(0),
thread_state_(NULL),
#if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
!defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
#if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
!defined(__mips__) && V8_TARGET_ARCH_MIPS
simulator_(NULL),
#endif
next_(NULL),
@ -404,8 +404,8 @@ class Isolate {
ThreadState* thread_state() const { return thread_state_; }
void set_thread_state(ThreadState* value) { thread_state_ = value; }
#if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
!defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
#if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
!defined(__mips__) && V8_TARGET_ARCH_MIPS
Simulator* simulator() const { return simulator_; }
void set_simulator(Simulator* simulator) {
simulator_ = simulator;
@ -422,8 +422,8 @@ class Isolate {
uintptr_t stack_limit_;
ThreadState* thread_state_;
#if !defined(__arm__) && defined(V8_TARGET_ARCH_ARM) || \
!defined(__mips__) && defined(V8_TARGET_ARCH_MIPS)
#if !defined(__arm__) && V8_TARGET_ARCH_ARM || \
!defined(__mips__) && V8_TARGET_ARCH_MIPS
Simulator* simulator_;
#endif
@ -994,8 +994,8 @@ class Isolate {
int* code_kind_statistics() { return code_kind_statistics_; }
#endif
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
V8_TARGET_ARCH_MIPS && !defined(__mips__)
bool simulator_initialized() { return simulator_initialized_; }
void set_simulator_initialized(bool initialized) {
simulator_initialized_ = initialized;
@ -1301,8 +1301,8 @@ class Isolate {
// Time stamp at initialization.
double time_millis_at_init_;
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
#if V8_TARGET_ARCH_ARM && !defined(__arm__) || \
V8_TARGET_ARCH_MIPS && !defined(__mips__)
bool simulator_initialized_;
HashMap* simulator_i_cache_;
Redirection* simulator_redirection_;

View File

@ -35,7 +35,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "mips/assembler-mips-inl.h"
#include "serialize.h"
@ -1475,7 +1475,7 @@ void Assembler::break_(uint32_t code, bool break_as_stop) {
void Assembler::stop(const char* msg, uint32_t code) {
ASSERT(code > kMaxWatchpointCode);
ASSERT(code <= kMaxStopCode);
#if defined(V8_HOST_ARCH_MIPS)
#if V8_HOST_ARCH_MIPS
break_(0x54321);
#else // V8_HOST_ARCH_MIPS
BlockTrampolinePoolFor(2);

View File

@ -29,7 +29,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "codegen.h"
#include "debug.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "bootstrapper.h"
#include "code-stubs.h"
@ -7540,7 +7540,7 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
__ And(sp, sp, Operand(-frame_alignment));
}
#if defined(V8_HOST_ARCH_MIPS)
#if V8_HOST_ARCH_MIPS
__ li(at, Operand(reinterpret_cast<int32_t>(&entry_hook_)));
__ lw(at, MemOperand(at));
#else

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "codegen.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "constants-mips.h"

View File

@ -36,7 +36,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "cpu.h"
#include "macro-assembler.h"

View File

@ -29,7 +29,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "codegen.h"
#include "debug.h"

View File

@ -56,7 +56,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "mips/constants-mips.h"
#include "disasm.h"

View File

@ -28,7 +28,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "assembler.h"
#include "assembler-mips.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
// Note on Mips implementation:
//

View File

@ -29,7 +29,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "codegen.h"
#include "code-stubs.h"

View File

@ -29,7 +29,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "bootstrapper.h"
#include "codegen.h"
@ -4723,19 +4723,19 @@ void MacroAssembler::InitializeNewString(Register string,
int MacroAssembler::ActivationFrameAlignment() {
#if defined(V8_HOST_ARCH_MIPS)
#if V8_HOST_ARCH_MIPS
// Running on the real platform. Use the alignment as mandated by the local
// environment.
// Note: This will break if we ever start generating snapshots on one Mips
// platform for another Mips platform with a different alignment.
return OS::ActivationFrameAlignment();
#else // defined(V8_HOST_ARCH_MIPS)
#else // V8_HOST_ARCH_MIPS
// If we are using the simulator then we should always align to the expected
// alignment. As the simulator is used to generate snapshots we do not know
// if the target platform will need alignment, so this is controlled from a
// flag.
return FLAG_sim_stack_alignment;
#endif // defined(V8_HOST_ARCH_MIPS)
#endif // V8_HOST_ARCH_MIPS
}
@ -5066,7 +5066,7 @@ void MacroAssembler::CallCFunctionHelper(Register function,
// The argument stots are presumed to have been set up by
// PrepareCallCFunction. The C function must be called via t9, for mips ABI.
#if defined(V8_HOST_ARCH_MIPS)
#if V8_HOST_ARCH_MIPS
if (emit_debug_code()) {
int frame_alignment = OS::ActivationFrameAlignment();
int frame_alignment_mask = frame_alignment - 1;

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "unicode.h"
#include "log.h"

View File

@ -31,7 +31,7 @@
#include <cstdarg>
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "cpu.h"
#include "disasm.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_MIPS
#include "ic-inl.h"
#include "codegen.h"

View File

@ -295,7 +295,7 @@ bool OS::MipsCpuHasFeature(CpuFeature feature) {
int OS::ActivationFrameAlignment() {
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
// On EABI ARM targets this is required for fp correctness in the
// runtime system.
return 8;

View File

@ -583,7 +583,7 @@ static void InitializeTlsBaseOffset() {
if (kernel_version_major < 11) {
// 8.x.x (Tiger), 9.x.x (Leopard), 10.x.x (Snow Leopard) have the
// same offsets.
#if defined(V8_HOST_ARCH_IA32)
#if V8_HOST_ARCH_IA32
kMacTlsBaseOffset = 0x48;
#else
kMacTlsBaseOffset = 0x60;

View File

@ -79,7 +79,7 @@ static void* GetRandomMmapAddr() {
// CpuFeatures::Probe. We don't care about randomization in this case because
// the code page is immediately freed.
if (isolate != NULL) {
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
uint64_t rnd1 = V8::RandomPrivate(isolate);
uint64_t rnd2 = V8::RandomPrivate(isolate);
uint64_t raw_addr = (rnd1 << 32) ^ rnd2;

View File

@ -105,7 +105,7 @@ void* OS::GetRandomMmapAddr() {
// CpuFeatures::Probe. We don't care about randomization in this case because
// the code page is immediately freed.
if (isolate != NULL) {
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
uint64_t rnd1 = V8::RandomPrivate(isolate);
uint64_t rnd2 = V8::RandomPrivate(isolate);
uint64_t raw_addr = (rnd1 << 32) ^ rnd2;
@ -321,7 +321,7 @@ int OS::VSNPrintF(Vector<char> str,
}
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
static void MemMoveWrapper(void* dest, const void* src, size_t size) {
memmove(dest, src, size);
}
@ -344,7 +344,7 @@ void OS::MemMove(void* dest, const void* src, size_t size) {
void POSIXPostSetUp() {
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
if (generated_memmove != NULL) {
memmove_function = generated_memmove;

View File

@ -33,7 +33,7 @@
namespace v8 {
namespace internal {
#if defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_X64)
#if V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64
#define V8_FAST_TLS_SUPPORTED 1
@ -43,7 +43,7 @@ INLINE(intptr_t InternalGetExistingThreadLocal(intptr_t index));
inline intptr_t InternalGetExistingThreadLocal(intptr_t index) {
intptr_t result;
#if defined(V8_HOST_ARCH_IA32)
#if V8_HOST_ARCH_IA32
asm("movl %%gs:(%1,%2,4), %0;"
:"=r"(result) // Output must be a writable register.
:"r"(kMacTlsBaseOffset), "r"(index));

View File

@ -147,7 +147,7 @@ double ceiling(double x) {
static Mutex* limit_mutex = NULL;
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
static void MemMoveWrapper(void* dest, const void* src, size_t size) {
memmove(dest, src, size);
}
@ -580,7 +580,7 @@ void OS::PostSetUp() {
// Math functions depend on CPU features therefore they are initialized after
// CPU.
MathSetup();
#if defined(V8_TARGET_ARCH_IA32)
#if V8_TARGET_ARCH_IA32
OS::MemMoveFunction generated_memmove = CreateMemMoveFunction();
if (generated_memmove != NULL) {
memmove_function = generated_memmove;

View File

@ -175,7 +175,7 @@ static void ReadDiyFp(Vector<const char> buffer,
static bool DoubleStrtod(Vector<const char> trimmed,
int exponent,
double* result) {
#if (defined(V8_TARGET_ARCH_IA32) || defined(USE_SIMULATOR)) \
#if (V8_TARGET_ARCH_IA32 || defined(USE_SIMULATOR)) \
&& !defined(_MSC_VER)
// On x86 the floating-point stack can be 64 or 80 bits wide. If it is
// 80 bits wide (as is the case on Linux) then double-rounding occurs and the

View File

@ -257,9 +257,9 @@ inline void MemsetPointer(T** dest, U* value, int counter) {
a = b; // Fake assignment to check assignability.
USE(a);
#endif // DEBUG
#if defined(V8_HOST_ARCH_IA32)
#if V8_HOST_ARCH_IA32
#define STOS "stosl"
#elif defined(V8_HOST_ARCH_X64)
#elif V8_HOST_ARCH_X64
#define STOS "stosq"
#endif
#if defined(__native_client__)

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "macro-assembler.h"
#include "serialize.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "codegen.h"
#include "deoptimizer.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "bootstrapper.h"
#include "code-stubs.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "codegen.h"
#include "macro-assembler.h"

View File

@ -33,7 +33,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "cpu.h"
#include "macro-assembler.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "assembler.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "codegen.h"
#include "deoptimizer.h"

View File

@ -31,7 +31,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "disasm.h"
#include "lazy-instance.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "assembler.h"
#include "assembler-x64.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "code-stubs.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "codegen.h"
#include "ic-inl.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "x64/lithium-codegen-x64.h"
#include "code-stubs.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "x64/lithium-gap-resolver-x64.h"
#include "x64/lithium-codegen-x64.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "lithium-allocator-inl.h"
#include "x64/lithium-x64.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "bootstrapper.h"
#include "codegen.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "serialize.h"
#include "unicode.h"

View File

@ -27,7 +27,7 @@
#include "v8.h"
#if defined(V8_TARGET_ARCH_X64)
#if V8_TARGET_ARCH_X64
#include "ic-inl.h"
#include "codegen.h"

View File

@ -51,7 +51,7 @@ void generate(MacroAssembler* masm, i::Vector<const uint8_t> string) {
// GenerateHashInit takes the first character as an argument so it can't
// handle the zero length string.
ASSERT(string.length() > 0);
#ifdef V8_TARGET_ARCH_IA32
#if V8_TARGET_ARCH_IA32
__ push(ebx);
__ push(ecx);
__ mov(eax, Immediate(0));
@ -116,7 +116,7 @@ void generate(MacroAssembler* masm, i::Vector<const uint8_t> string) {
void generate(MacroAssembler* masm, uint32_t key) {
#ifdef V8_TARGET_ARCH_IA32
#if V8_TARGET_ARCH_IA32
__ push(ebx);
__ mov(eax, Immediate(key));
__ GetNumberHash(eax, ebx);

View File

@ -207,7 +207,7 @@ static void StartJoinAndDeleteThreads(const i::List<JoinableThread*>& threads) {
// Run many threads all locking on the same isolate
TEST(IsolateLockingStress) {
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -244,7 +244,7 @@ class IsolateNonlockingThread : public JoinableThread {
// Run many threads each accessing its own isolate without locking
TEST(MultithreadedParallelIsolates) {
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 10;
#else
const int kNThreads = 50;
@ -282,7 +282,7 @@ class IsolateNestedLockingThread : public JoinableThread {
// Run many threads with nested locks
TEST(IsolateNestedLocking) {
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -323,7 +323,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread {
// Run parallel threads that lock and access different isolates in parallel
TEST(SeparateIsolatesLocksNonexclusive) {
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -399,7 +399,7 @@ class LockerUnlockerThread : public JoinableThread {
// Use unlocker inside of a Locker, multiple threads.
TEST(LockerUnlocker) {
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -452,7 +452,7 @@ class LockTwiceAndUnlockThread : public JoinableThread {
// Use Unlocker inside two Lockers.
TEST(LockTwiceAndUnlock) {
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -573,7 +573,7 @@ class LockUnlockLockThread : public JoinableThread {
// Locker inside an Unlocker inside a Locker.
TEST(LockUnlockLockMultithreaded) {
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -628,7 +628,7 @@ class LockUnlockLockDefaultIsolateThread : public JoinableThread {
// Locker inside an Unlocker inside a Locker for default isolate.
TEST(LockUnlockLockDefaultIsolateMultithreaded) {
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
const int kNThreads = 50;
#else
const int kNThreads = 100;
@ -699,7 +699,7 @@ class IsolateGenesisThread : public JoinableThread {
// Test installing extensions in separate isolates concurrently.
// http://code.google.com/p/v8/issues/detail?id=1821
TEST(ExtensionsRegistration) {
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 10;
#else
const int kNThreads = 40;

View File

@ -1131,7 +1131,7 @@ TEST(SmiMul) {
void TestSmiDiv(MacroAssembler* masm, Label* exit, int id, int x, int y) {
bool division_by_zero = (y == 0);
bool negative_zero = (x == 0 && y < 0);
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
bool overflow = (x == Smi::kMinValue && y < 0); // Safe approx. used.
#else
bool overflow = (x == Smi::kMinValue && y == -1);

View File

@ -44,22 +44,22 @@
#else // V8_INTERPRETED_REGEXP
#include "macro-assembler.h"
#include "code.h"
#ifdef V8_TARGET_ARCH_ARM
#if V8_TARGET_ARCH_ARM
#include "arm/assembler-arm.h"
#include "arm/macro-assembler-arm.h"
#include "arm/regexp-macro-assembler-arm.h"
#endif
#ifdef V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_MIPS
#include "mips/assembler-mips.h"
#include "mips/macro-assembler-mips.h"
#include "mips/regexp-macro-assembler-mips.h"
#endif
#ifdef V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_X64
#include "x64/assembler-x64.h"
#include "x64/macro-assembler-x64.h"
#include "x64/regexp-macro-assembler-x64.h"
#endif
#ifdef V8_TARGET_ARCH_IA32
#if V8_TARGET_ARCH_IA32
#include "ia32/assembler-ia32.h"
#include "ia32/macro-assembler-ia32.h"
#include "ia32/regexp-macro-assembler-ia32.h"