Revert "Adding Xmm Select table, GetRawXMM"

This reverts commit 784d705e36 and d1ab6915c4.
This commit is contained in:
illusion98 2020-01-16 19:17:09 +11:00
parent 1b543f9299
commit 08abe2593f
2 changed files with 4 additions and 12 deletions

View File

@ -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<void*>(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<void*>(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

View File

@ -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);