'-Wstrict-aliasing=2'],
'CPPPATH': ANDROID_INCLUDES,
},
- 'wordsize:64': {
+ 'wordsize:32': {
'CCFLAGS': ['-m32'],
+ 'CPPDEFINES': ['ILP32'],
'LINKFLAGS': ['-m32']
},
+ 'wordsize:64': {
+ 'CCFLAGS': ['-m64'],
+ 'CPPDEFINES': ['LP64'],
+ 'LINKFLAGS': ['-m64']
+ },
+ 'arch:ia32': {
+ 'CPPDEFINES': ['V8_ARCH_IA32']
+ },
+ 'arch:arm': {
+ 'CPPDEFINES': ['V8_ARCH_ARM']
+ },
+ 'arch:x64': {
+ 'CPPDEFINES': ['V8_ARCH_X64']
+ },
'prof:oprofile': {
'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
}
'LINKFLAGS': ['/LTCG'],
'ARFLAGS': ['/LTCG'],
}
- },
+ }
}
}
'arch:arm': {
'CPPDEFINES': ['ARM']
},
- 'arch:android': {
- 'CPPDEFINES': ['ARM']
- },
'os:win32': {
'WARNINGFLAGS': ['-pedantic', '-Wno-long-long']
},
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
},
- 'wordsize:64': {
+ 'wordsize:32': {
'CCFLAGS': ['-m32'],
+ 'CPPDEFINES': ['ILP32'],
'LINKFLAGS': ['-m32']
},
+ 'wordsize:64': {
+ 'CCFLAGS': ['-m64'],
+ 'CPPDEFINES': ['LP64'],
+ 'LINKFLAGS': ['-m64']
+ },
},
'msvc': {
'all': {
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
},
- 'wordsize:64': {
+ 'wordsize:32': {
'CCFLAGS': ['-m32'],
+ 'CPPDEFINES': ['ILP32'],
'LINKFLAGS': ['-m32']
},
+ 'wordsize:64': {
+ 'CCFLAGS': ['-m64'],
+ 'CPPDEFINES': ['LP64'],
+ 'LINKFLAGS': ['-m64']
+ },
'mode:release': {
'CCFLAGS': ['-O2']
},
'toolchain': {
'values': ['gcc', 'msvc'],
'default': TOOLCHAIN_GUESS,
- 'help': 'the toolchain to use'
+ 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')'
},
'os': {
'values': ['freebsd', 'linux', 'macos', 'win32', 'android'],
'default': OS_GUESS,
- 'help': 'the os to build for'
+ 'help': 'the os to build for (' + OS_GUESS + ')'
},
'arch': {
- 'values':['arm', 'ia32'],
+ 'values':['arm', 'ia32', 'x64'],
'default': ARCH_GUESS,
- 'help': 'the architecture to build for'
+ 'help': 'the architecture to build for (' + ARCH_GUESS + ')'
},
'snapshot': {
'values': ['on', 'off', 'nobuild'],
},
'wordsize': {
'values': ['64', '32'],
- 'default': WORDSIZE_GUESS,
+ 'default': '32', # WORDSIZE_GUESS,
'help': 'the word size'
},
'simulator': {
Abort("Profiling on windows only supported for static library.")
if env['prof'] == 'oprofile' and env['os'] != 'linux':
Abort("OProfile is only supported on Linux.")
+ if env['wordsize'] == '64' and (env['os'] != 'linux' or env['arch'] != 'x64'):
+ Abort("64 bit compilation only allowed on Linux OS and x64 architecture.")
for (name, option) in SIMPLE_OPTIONS.iteritems():
if (not option.get('default')) and (name not in ARGUMENTS):
message = ("A value for option %s must be specified (%s)." %
'arm/codegen-arm.cc', 'arm/cpu-arm.cc', 'arm/disasm-arm.cc',
'arm/debug-arm.cc', 'arm/frames-arm.cc', 'arm/ic-arm.cc',
'arm/jump-target-arm.cc', 'arm/macro-assembler-arm.cc',
+ 'arm/regexp-macro-assembler-arm.cc',
'arm/register-allocator-arm.cc', 'arm/stub-cache-arm.cc',
- 'arm/regexp-macro-assembler-arm.cc', 'arm/virtual-frame-arm.cc'
+ 'arm/virtual-frame-arm.cc'
],
'arch:ia32': [
'ia32/assembler-ia32.cc', 'ia32/builtins-ia32.cc',
'ia32/codegen-ia32.cc', 'ia32/cpu-ia32.cc', 'ia32/disasm-ia32.cc',
'ia32/debug-ia32.cc', 'ia32/frames-ia32.cc', 'ia32/ic-ia32.cc',
'ia32/jump-target-ia32.cc', 'ia32/macro-assembler-ia32.cc',
+ 'ia32/regexp-macro-assembler-ia32.cc',
'ia32/register-allocator-ia32.cc', 'ia32/stub-cache-ia32.cc',
- 'ia32/regexp-macro-assembler-ia32.cc', 'ia32/virtual-frame-ia32.cc'
+ 'ia32/virtual-frame-ia32.cc'
+ ],
+ 'arch:x64': [
+ 'x64/assembler-x64.cc', 'x64/builtins-x64.cc',
+ 'x64/codegen-x64.cc', 'x64/cpu-x64.cc', 'x64/disasm-x64.cc',
+ 'x64/debug-x64.cc', 'x64/frames-x64.cc', 'x64/ic-x64.cc',
+ 'x64/jump-target-x64.cc', 'x64/macro-assembler-x64.cc',
+ # 'x64/regexp-macro-assembler-x64.cc',
+ 'x64/stub-cache-x64.cc'
],
'simulator:arm': ['arm/simulator-arm.cc'],
'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'],
enum OverwriteMode { NO_OVERWRITE, OVERWRITE_LEFT, OVERWRITE_RIGHT };
-#ifdef ARM
+#ifdef V8_ARCH_ARM
#include "arm/codegen-arm.h"
-#else
+#endif
+
+#ifdef V8_ARCH_X64
+#include "x64/codegen-x64.h"
+#endif
+
+#ifdef V8_ARCH_IA32
#include "ia32/codegen-ia32.h"
#endif
#include "api.h"
#include "codegen-inl.h"
-#ifdef ARM
+#ifdef V8_ARCH_ARM
#include "arm/simulator-arm.h"
-#else // ia32
+#endif
+
+#ifdef V8_ARCH_X64
+#include "x64/simulator-x64.h"
+#endif
+
+#ifdef V8_ARCH_IA32
#include "ia32/simulator-ia32.h"
#endif
#define V8_FRAMES_INL_H_
#include "frames.h"
-#ifdef ARM
+#ifdef V8_ARCH_ARM
#include "arm/frames-arm.h"
-#else
+#endif
+
+#ifdef V8_ARCH_X64
+#include "x64/frames-x64.h"
+#endif
+
+#ifdef V8_ARCH_IA32
#include "ia32/frames-ia32.h"
#endif
typedef uint16_t uc16;
typedef signed int uc32;
-#ifndef ARM
+#if defined(V8_ARCH_IA32) || defined(V8_ARCH_X64)
#define CAN_READ_UNALIGNED 1
#endif
#include "regexp-macro-assembler-irregexp.h"
#include "regexp-stack.h"
-#ifdef ARM
+#ifdef V8_ARCH_ARM
#include "arm/regexp-macro-assembler-arm.h"
-#else // IA32
+#endif
+
+#ifdef V8_ARCH_X64
+#include "x64/macro-assembler-x64.h"
+#include "x64/regexp-macro-assembler-x64.h"
+#endif
+
+#ifdef V8_ARCH_IA32
#include "ia32/macro-assembler-ia32.h"
#include "ia32/regexp-macro-assembler-ia32.h"
#endif
Handle<String> original_subject = subject;
Handle<FixedArray> regexp(FixedArray::cast(jsregexp->data()));
if (UseNativeRegexp()) {
-#ifdef ARM
+#ifdef V8_ARCH_ARM
UNREACHABLE();
-#else
+#endif
+#ifdef V8_ARCH_X64
+ UNIMPLEMENTED();
+#endif
+#ifdef V8_ARCH_IA32
RegExpMacroAssemblerIA32::Result res;
do {
bool is_ascii = StringShape(*subject).IsAsciiRepresentation();
NodeInfo info = *node->info();
if (RegExpImpl::UseNativeRegexp()) {
-#ifdef ARM
+#ifdef V8_ARCH_ARM
UNREACHABLE();
-#else // IA32
+#endif
+#ifdef V8_ARCH_X64
+ UNREACHABLE();
+#endif
+#ifdef V8_ARCH_IA32
RegExpMacroAssemblerIA32::Mode mode;
if (is_ascii) {
mode = RegExpMacroAssemblerIA32::ASCII;
class RegExpImpl {
public:
static inline bool UseNativeRegexp() {
-#ifdef ARM
+#ifdef V8_ARCH_ARM
return false;
-#else
+#endif
+#ifdef V8_ARCH_X64
+ return false;
+#endif
+#ifdef V8_ARCH_IA32
return FLAG_regexp_native;
#endif
}
#ifndef V8_MACRO_ASSEMBLER_H_
#define V8_MACRO_ASSEMBLER_H_
-#ifdef ARM
-
+#ifdef V8_ARCH_ARM
#include "arm/constants-arm.h"
#include "assembler.h"
#include "arm/assembler-arm.h"
#include "arm/assembler-arm-inl.h"
#include "code.h" // must be after assembler_*.h
#include "arm/macro-assembler-arm.h"
+#endif
-#else // ia32
+#ifdef V8_ARCH_X64
+#include "assembler.h"
+#include "x64/assembler-x64.h"
+#include "x64/assembler-x64-inl.h"
+#include "code.h" // must be after assembler_*.h
+#include "x64/macro-assembler-x64.h"
+#endif
+#ifdef V8_ARCH_IA32
#include "assembler.h"
#include "ia32/assembler-ia32.h"
#include "ia32/assembler-ia32-inl.h"
#include "code.h" // must be after assembler_*.h
#include "ia32/macro-assembler-ia32.h"
-
#endif
#endif // V8_MACRO_ASSEMBLER_H_
void OS::DebugBreak() {
-#if defined (__arm__) || defined(__thumb__)
+#if defined(__arm__) || defined(__thumb__)
asm("bkpt 0");
#else
asm("int $3");
void OS::DebugBreak() {
+// TODO(lrn): Introduce processor define for runtime system (!= V8_ARCH_x,
+// which is the architecture of generated code).
#if defined(__arm__) || defined(__thumb__)
asm("bkpt 0");
#else
// Extracting the sample from the context is extremely machine dependent.
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
mcontext_t& mcontext = ucontext->uc_mcontext;
-#if defined (__arm__) || defined(__thumb__)
+#if defined(__arm__) || defined(__thumb__)
sample.pc = mcontext.gregs[R15];
sample.sp = mcontext.gregs[R13];
sample.fp = mcontext.gregs[R11];
} } // namespace v8::internal
-#ifdef ARM
+#ifdef V8_ARCH_ARM
#include "arm/virtual-frame-arm.h"
-#else // ia32
+#endif
+
+#ifdef V8_ARCH_X64
+#include "x64/virtual-frame-x64.h"
+#endif
+
+#ifdef V8_ARCH_IA32
#include "ia32/virtual-frame-ia32.h"
#endif
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)",
+ V8_ARCH_IA32,
DEBUG,
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)",
+ V8_ARCH_IA32,
NDEBUG,
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
DEPLOYMENT_POSTPROCESSING = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)",
+ V8_ARCH_IA32,
ENABLE_DISASSEMBLER,
ENABLE_LOGGING_AND_PROFILING,
);
DEPLOYMENT_POSTPROCESSING = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)",
- ARM,
+ V8_ARCH_ARM,
ENABLE_DISASSEMBLER,
ENABLE_LOGGING_AND_PROFILING,
);
DEPLOYMENT_POSTPROCESSING = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(GCC_PREPROCESSOR_DEFINITIONS)",
- ARM,
+ V8_ARCH_ARM,
);
HEADER_SEARCH_PATHS = ../src;
PRODUCT_NAME = "v8-arm";
>
<Tool
Name="VCCLCompilerTool"
- PreprocessorDefinitions="ARM"
+ PreprocessorDefinitions="V8_ARCH_ARM"
DisableSpecificWarnings="4996"
/>
</VisualStudioPropertySheet>
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
--- /dev/null
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="arm"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="V8_ARCH_IA32"
+ />
+</VisualStudioPropertySheet>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="4"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Debug|Win32"
ConfigurationType="10"
- InheritedPropertySheets=".\common.vsprops;.\debug.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\debug.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
<Configuration
Name="Release|Win32"
ConfigurationType="10"
- InheritedPropertySheets=".\common.vsprops;.\release.vsprops"
+ InheritedPropertySheets=".\common.vsprops;.\ia32.vsprops;.\release.vsprops"
>
<Tool
Name="VCPreBuildEventTool"