diff --git a/src/xenia/cpu/backend/x64/x64_emitter.cc b/src/xenia/cpu/backend/x64/x64_emitter.cc index f5f07a9aa..91de2ef9b 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.cc +++ b/src/xenia/cpu/backend/x64/x64_emitter.cc @@ -737,9 +737,7 @@ static const vec128_t xmm_consts[] = { /* XMMIntMax */ vec128i(INT_MAX), /* XMMIntMaxPD */ vec128d(INT_MAX), /* XMMPosIntMinPS */ vec128f((float)0x80000000u), - /* XMMQNaN */ vec128i(0x7FC00000u), - /*XMMSelectTableBase */vec128i(0), - /*XMMSelectTableLast*/ vec128i(-1) + /* XMMQNaN */ vec128i(0x7FC00000u), }; // First location to try and place constants. @@ -778,17 +776,14 @@ void X64Emitter::FreeConstData(uintptr_t data) { memory::DeallocFixed(reinterpret_cast(data), 0, memory::DeallocationType::kRelease); } -uintptr_t X64Emitter::GetXmmRawAddress(XmmConst id) { - return backend_->emitter_data() + sizeof(vec128_t) * id; -} + Xbyak::Address X64Emitter::GetXmmConstPtr(XmmConst id) { // Load through fixed constant table setup by PlaceConstData. // It's important that the pointer is not signed, as it will be sign-extended. - return ptr[GetXmmRawAddress(id)]; + return ptr[reinterpret_cast(backend_->emitter_data() + + sizeof(vec128_t) * id)]; } - - // Implies possible StashXmm(0, ...)! void X64Emitter::LoadConstantXmm(Xbyak::Xmm dest, const vec128_t& v) { // https://www.agner.org/optimize/optimizing_assembly.pdf diff --git a/src/xenia/cpu/backend/x64/x64_emitter.h b/src/xenia/cpu/backend/x64/x64_emitter.h index 4f4af11f6..4f661a331 100644 --- a/src/xenia/cpu/backend/x64/x64_emitter.h +++ b/src/xenia/cpu/backend/x64/x64_emitter.h @@ -114,8 +114,6 @@ enum XmmConst { XMMIntMaxPD, XMMPosIntMinPS, XMMQNaN, - XMMSelectTableBase, - XMMSelectTableLast, }; // Unfortunately due to the design of xbyak we have to pass this to the ctor. @@ -212,7 +210,6 @@ class X64Emitter : public Xbyak::CodeGenerator { void MovMem64(const Xbyak::RegExp& addr, uint64_t v); Xbyak::Address GetXmmConstPtr(XmmConst id); - uintptr_t GetXmmRawAddress(XmmConst id); void LoadConstantXmm(Xbyak::Xmm dest, float v); void LoadConstantXmm(Xbyak::Xmm dest, double v); void LoadConstantXmm(Xbyak::Xmm dest, const vec128_t& v);