From 0b5860246fe00218948821a2e42def62b70da73b Mon Sep 17 00:00:00 2001 From: Jeffrey Clark Date: Fri, 1 Jul 2016 00:57:46 +0000 Subject: [PATCH] fix android x86 and x64 full build * abuse namespace as done in 59f15d6819508188c184fc7525606e712ac4a73b --- src/devices/cpu/drcbex64.cpp | 13 +++++++++++++ src/devices/cpu/drcbex86.cpp | 12 ++++++++++++ src/devices/cpu/drcbex86.h | 6 +++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index df5fc335599..7b3693a37ef 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -174,10 +174,23 @@ #include "drcbex64.h" // This is a trick to make it build on Android where the ARM SDK declares ::REG_Rn +// and the x64 SDK declares ::REG_Exx and ::REG_Rxx namespace drc { using namespace uml; using namespace x64emit; +using x64emit::REG_EAX; +using x64emit::REG_ECX; +using x64emit::REG_EDX; +using x64emit::REG_RAX; +using x64emit::REG_RCX; +using x64emit::REG_RDX; +using x64emit::REG_RBX; +using x64emit::REG_RSP; +using x64emit::REG_RBP; +using x64emit::REG_RSI; +using x64emit::REG_RDI; + using x64emit::REG_R8; using x64emit::REG_R9; using x64emit::REG_R10; diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index e4d40ecfd0e..3fab0fea741 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -89,9 +89,19 @@ #include "drcuml.h" #include "drcbex86.h" +// This is a trick to make it build on Android where the x86 SDK declares ::REG_Exx +namespace drc { using namespace uml; using namespace x86emit; +using x86emit::REG_EAX; +using x86emit::REG_ECX; +using x86emit::REG_EDX; +using x86emit::REG_EBX; +using x86emit::REG_ESP; +using x86emit::REG_EBP; +using x86emit::REG_ESI; +using x86emit::REG_EDI; //************************************************************************** // DEBUGGING @@ -6733,3 +6743,5 @@ int drcbe_x86::ddivs(UINT64 &dstlo, UINT64 &dsthi, INT64 src1, INT64 src2) dsthi = src1 % src2; return ((dstlo == 0) << 2) | ((dstlo >> 60) & FLAG_S); } + +} // namespace drc diff --git a/src/devices/cpu/drcbex86.h b/src/devices/cpu/drcbex86.h index 67b49c167ec..c5c462c36b1 100644 --- a/src/devices/cpu/drcbex86.h +++ b/src/devices/cpu/drcbex86.h @@ -22,6 +22,7 @@ +namespace drc { //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -336,5 +337,8 @@ private: static opcode_generate_func s_opcode_table[uml::OP_MAX]; }; +} // namespace drc -#endif /* __DRCBEC_H__ */ +using drc::drcbe_x86; + +#endif /* __DRCBEX86_H__ */