diff options
| author | bunnei <bunneidev@gmail.com> | 2015-08-14 22:29:08 -0400 | 
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-08-15 18:03:27 -0400 | 
| commit | b39c053785abc4a94ce380885a846c5d8be89675 (patch) | |
| tree | 42911208a051652a7452c8bbbd35ec91aa2d4e20 /src/common | |
| parent | 0ee00861f6747f8946972a91539e857f493e9cc6 (diff) | |
Rename ARCHITECTURE_X64 definition to ARCHITECTURE_x86_64.
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/common/common_funcs.h | 2 | ||||
| -rw-r--r-- | src/common/memory_util.cpp | 8 | ||||
| -rw-r--r-- | src/common/platform.h | 2 | ||||
| -rw-r--r-- | src/common/x64/abi.cpp | 4 | ||||
| -rw-r--r-- | src/common/x64/abi.h | 2 | ||||
| -rw-r--r-- | src/common/x64/emitter.cpp | 6 | ||||
| -rw-r--r-- | src/common/x64/emitter.h | 2 | 
8 files changed, 14 insertions, 14 deletions
| diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 53c915606..e743a026d 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -58,7 +58,7 @@ set(HEADERS              vector_math.h              ) -if(ARCHITECTURE_X64) +if(ARCHITECTURE_x86_64)      set(SRCS ${SRCS}              x64/abi.cpp              x64/cpu_detect.cpp diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 948070e62..88e452a16 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -35,7 +35,7 @@  #ifndef _MSC_VER -#if defined(__x86_64__) || defined(ARCHITECTURE_X64) +#ifdef ARCHITECTURE_x86_64  #define Crash() __asm__ __volatile__("int $3")  #elif defined(_M_ARM)  #define Crash() __asm__ __volatile__("trap") diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index 2b3ace528..5ef784224 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp @@ -16,7 +16,7 @@      #include <sys/mman.h>  #endif -#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) +#if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)  #include <unistd.h>  #define PAGE_MASK     (getpagesize() - 1)  #define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK)) @@ -31,7 +31,7 @@ void* AllocateExecutableMemory(size_t size, bool low)      void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);  #else      static char *map_hint = 0; -#if defined(__x86_64__) && !defined(MAP_32BIT) +#if defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)      // This OS has no flag to enforce allocation below the 4 GB boundary,      // but if we hint that we want a low address it is very likely we will      // get one. @@ -43,7 +43,7 @@ void* AllocateExecutableMemory(size_t size, bool low)  #endif      void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,          MAP_ANON | MAP_PRIVATE -#if defined(__x86_64__) && defined(MAP_32BIT) +#if defined(ARCHITECTURE_X64) && defined(MAP_32BIT)          | (low ? MAP_32BIT : 0)  #endif          , -1, 0); @@ -62,7 +62,7 @@ void* AllocateExecutableMemory(size_t size, bool low)  #endif          LOG_ERROR(Common_Memory, "Failed to allocate executable memory");      } -#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) +#if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)      else      {          if (low) diff --git a/src/common/platform.h b/src/common/platform.h index 118a9ed3b..9ba4db11b 100644 --- a/src/common/platform.h +++ b/src/common/platform.h @@ -27,7 +27,7 @@  ////////////////////////////////////////////////////////////////////////////////////////////////////  // Platform detection -#if defined(__x86_64__) || defined(ARCHITECTURE_X64) || defined(__aarch64__) +#if defined(ARCHITECTURE_x86_64) || defined(__aarch64__)      #define EMU_ARCH_BITS 64  #elif defined(__i386) || defined(_M_IX86) || defined(__arm__) || defined(_M_ARM)      #define EMU_ARCH_BITS 32 diff --git a/src/common/x64/abi.cpp b/src/common/x64/abi.cpp index 598e7f335..4c07a6ebe 100644 --- a/src/common/x64/abi.cpp +++ b/src/common/x64/abi.cpp @@ -27,7 +27,7 @@ void XEmitter::ABI_EmitPrologue(int maxCallParams)  {  #ifdef _M_IX86      // Don't really need to do anything -#elif defined(ARCHITECTURE_X64) +#elif defined(ARCHITECTURE_x86_64)  #if _WIN32      int stacksize = ((maxCallParams + 1) & ~1) * 8 + 8;      // Set up a stack frame so that we can call functions @@ -43,7 +43,7 @@ void XEmitter::ABI_EmitEpilogue(int maxCallParams)  {  #ifdef _M_IX86      RET(); -#elif defined(ARCHITECTURE_X64) +#elif defined(ARCHITECTURE_x86_64)  #ifdef _WIN32      int stacksize = ((maxCallParams+1)&~1)*8 + 8;      ADD(64, R(RSP), Imm8(stacksize)); diff --git a/src/common/x64/abi.h b/src/common/x64/abi.h index 0ee189d45..7e9c156ae 100644 --- a/src/common/x64/abi.h +++ b/src/common/x64/abi.h @@ -55,7 +55,7 @@  // 32-bit bog standard cdecl, shared between linux and windows  // MacOSX 32-bit is same as System V with a few exceptions that we probably don't care much about. -#elif ARCHITECTURE_X64 // 64 bit calling convention +#elif ARCHITECTURE_x86_64 // 64 bit calling convention  #ifdef _WIN32 // 64-bit Windows - the really exotic calling convention diff --git a/src/common/x64/emitter.cpp b/src/common/x64/emitter.cpp index 030c73918..4b79acd1f 100644 --- a/src/common/x64/emitter.cpp +++ b/src/common/x64/emitter.cpp @@ -164,7 +164,7 @@ void XEmitter::WriteSIB(int scale, int index, int base)  void OpArg::WriteRex(XEmitter *emit, int opBits, int bits, int customOp) const  {      if (customOp == -1)       customOp = operandReg; -#ifdef ARCHITECTURE_X64 +#ifdef ARCHITECTURE_x86_64      u8 op = 0x40;      // REX.W (whether operation is a 64-bit operation)      if (opBits == 64)         op |= 8; @@ -236,7 +236,7 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg,          _offsetOrBaseReg = 5;          emit->WriteModRM(0, _operandReg, _offsetOrBaseReg);          //TODO : add some checks -#ifdef ARCHITECTURE_X64 +#ifdef ARCHITECTURE_x86_64          u64 ripAddr = (u64)emit->GetCodePtr() + 4 + extraBytes;          s64 distance = (s64)offset - (s64)ripAddr;          ASSERT_MSG( @@ -1463,7 +1463,7 @@ void XEmitter::MOVD_xmm(const OpArg &arg, X64Reg src) {WriteSSEOp(0x66, 0x7E, sr  void XEmitter::MOVQ_xmm(X64Reg dest, OpArg arg)  { -#ifdef ARCHITECTURE_X64 +#ifdef ARCHITECTURE_x86_64          // Alternate encoding          // This does not display correctly in MSVC's debugger, it thinks it's a MOVD          arg.operandReg = dest; diff --git a/src/common/x64/emitter.h b/src/common/x64/emitter.h index aaebb56f6..e9c924126 100644 --- a/src/common/x64/emitter.h +++ b/src/common/x64/emitter.h @@ -21,7 +21,7 @@  #include "common/common_types.h"  #include "common/code_block.h" -#if defined(ARCHITECTURE_X64) && !defined(_ARCH_64) +#if defined(ARCHITECTURE_x86_64) && !defined(_ARCH_64)  #define _ARCH_64  #endif | 
