add baseSSE test

This commit is contained in:
MITSUNARI Shigeo 2022-03-08 11:33:35 +09:00
parent e2eda384c8
commit 6de93fb884
2 changed files with 11 additions and 1 deletions

View file

@ -23,6 +23,16 @@ CYBOZU_TEST_AUTO(setSize)
} code; } code;
} }
CYBOZU_TEST_AUTO(badSSE)
{
struct Code : Xbyak::CodeGenerator {
Code()
{
CYBOZU_TEST_EXCEPTION(paddd(xm16, xm3), Xbyak::Error);
}
} code;
}
CYBOZU_TEST_AUTO(compOperand) CYBOZU_TEST_AUTO(compOperand)
{ {
using namespace Xbyak::util; using namespace Xbyak::util;

View file

@ -1631,7 +1631,7 @@ private:
static inline bool isValidXMM(const Operand& op1) static inline bool isValidXMM(const Operand& op1)
{ {
// SSE instructions do not support XMM16 - XMM31 // SSE instructions do not support XMM16 - XMM31
return op1.isXMM() ? op1.getIdx() <= 15 : true; return !(op1.isXMM() && op1.getIdx() >= 16);
} }
void rex(const Operand& op1, const Operand& op2 = Operand()) void rex(const Operand& op1, const Operand& op2 = Operand())
{ {