aboutsummaryrefslogtreecommitdiffhomepage
path: root/xbyak/xbyak.h
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2024-10-15 17:17:33 +0900
committerMITSUNARI Shigeo <[email protected]>2024-10-15 17:17:33 +0900
commitcf209c915b849141ed9821fea883fd04bcc34859 (patch)
treec4c3ecb44e485e783163f26186f9afa30133dc0c /xbyak/xbyak.h
parent3ee31be62de4d3cc07289724da8baaddb3083834 (diff)
parentc08b1d3cc4ed553c8ce764452b547a19a7ad52e6 (diff)
downloadxbyak-cf209c915b849141ed9821fea883fd04bcc34859.tar.gz
xbyak-cf209c915b849141ed9821fea883fd04bcc34859.zip
Merge branch 'dev'
Diffstat (limited to 'xbyak/xbyak.h')
-rw-r--r--xbyak/xbyak.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index c0bd83e..b3a4df8 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -2794,6 +2794,30 @@ private:
}
opSSE(x, op, type1, code1, isXMM_XMMorMEM, imm);
}
+ // AVX10 zero-extending for vmovd, vmovw
+ void opAVX10ZeroExt(const Operand& op1, const Operand& op2, const uint64_t typeTbl[4], const int codeTbl[4], PreferredEncoding enc, int bit)
+ {
+ const Operand *p1 = &op1;
+ const Operand *p2 = &op2;
+ bool rev = false;
+ if (p1->isMEM()) {
+ std::swap(p1, p2);
+ rev = true;
+ }
+ if (p1->isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION)
+ if (p1->isXMM()) {
+ std::swap(p1, p2);
+ rev = !rev;
+ }
+ int sel = -1;
+ if (getEncoding(enc, 1) == AVX10v2Encoding) {
+ if ((p1->isXMM() || p1->isMEM()) && p2->isXMM()) sel = 2 + int(rev);
+ } else {
+ if ((p1->isREG(bit) || p1->isMEM()) && p2->isXMM()) sel = int(rev);
+ }
+ if (sel == -1) XBYAK_THROW(ERR_BAD_COMBINATION)
+ opAVX_X_X_XM(*static_cast<const Xmm*>(p2), xm0, *p1, typeTbl[sel], codeTbl[sel]);
+ }
public:
unsigned int getVersion() const { return VERSION; }
using CodeArray::db;
@@ -3203,30 +3227,6 @@ public:
}
db(0xC8 + (idx & 7));
}
- // AVX10 zero-extending for vmovd, vmovw
- void opAVX10ZeroExt(const Operand& op1, const Operand& op2, const uint64_t typeTbl[4], const int codeTbl[4], PreferredEncoding enc, int bit)
- {
- const Operand *p1 = &op1;
- const Operand *p2 = &op2;
- bool rev = false;
- if (p1->isMEM()) {
- std::swap(p1, p2);
- rev = true;
- }
- if (p1->isMEM()) XBYAK_THROW(ERR_BAD_COMBINATION)
- if (p1->isXMM()) {
- std::swap(p1, p2);
- rev = !rev;
- }
- int sel = -1;
- if (getEncoding(enc, 1) == AVX10v2Encoding) {
- if ((p1->isXMM() || p1->isMEM()) && p2->isXMM()) sel = 2 + int(rev);
- } else {
- if ((p1->isREG(bit) || p1->isMEM()) && p2->isXMM()) sel = int(rev);
- }
- if (sel == -1) XBYAK_THROW(ERR_BAD_COMBINATION)
- opAVX_X_X_XM(*static_cast<const Xmm*>(p2), xm0, *p1, typeTbl[sel], codeTbl[sel]);
- }
void vmovd(const Operand& op1, const Operand& op2, PreferredEncoding enc = DefaultEncoding)
{
const uint64_t typeTbl[] = {