aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2023-11-17 12:47:04 +0900
committerMITSUNARI Shigeo <[email protected]>2023-11-17 12:47:04 +0900
commiteb9de13925046f599fb29d9d81b3c372f0c1ee48 (patch)
tree6fc71cbf10b12c9ef43c057b759bb8a94941d8c3
parentdba2c174f3d8606cdb0bcad7b473baa420915247 (diff)
downloadxbyak-eb9de13925046f599fb29d9d81b3c372f0c1ee48.tar.gz
xbyak-eb9de13925046f599fb29d9d81b3c372f0c1ee48.zip
2-op imul supports apx
-rw-r--r--test/apx.cpp13
-rw-r--r--xbyak/xbyak.h5
2 files changed, 14 insertions, 4 deletions
diff --git a/test/apx.cpp b/test/apx.cpp
index 87a354b..a5ada01 100644
--- a/test/apx.cpp
+++ b/test/apx.cpp
@@ -806,6 +806,14 @@ CYBOZU_TEST_AUTO(div)
not_(qword [r20+r30*1]);
// 2op
+ // imul(r30b, al); // QQQ : not supported?
+ imul(r30w, ax);
+ imul(r30d, eax);
+ imul(r30, rax);
+ imul(r30|T_nf, rax);
+ imul(rcx|T_nf, rax);
+ imul(rcx, ptr [r30]);
+
neg(r30b, al);
neg(r30w, ax);
neg(r30d, eax);
@@ -856,6 +864,11 @@ CYBOZU_TEST_AUTO(div)
0x08, 0xf7, 0x14, 0x34,
// 2op
+ // imul
+ 0x62, 0x64, 0x7d, 0x08, 0xaf, 0xf0, 0x62, 0x64, 0x7c, 0x08, 0xaf, 0xf0, 0x62, 0x64, 0xfc, 0x08,
+ 0xaf, 0xf0, 0x62, 0x64, 0xfc, 0x0c, 0xaf, 0xf0, 0x62, 0xf4, 0xfc, 0x0c, 0xaf, 0xc8, 0x62, 0xdc,
+ 0xfc, 0x08, 0xaf, 0x0e,
+
// neg
0x62, 0xf4, 0x0c, 0x10, 0xf6, 0xd8, 0x62, 0xf4, 0x0d, 0x10, 0xf7, 0xd8, 0x62, 0xf4, 0x0c, 0x10,
0xf7, 0xd8, 0x62, 0xf4, 0x8c, 0x10, 0xf7, 0xd8, 0x62, 0xf4, 0x8c, 0x14, 0xf7, 0xd8, 0x62, 0xf4,
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index cc762df..9a81710 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -2719,6 +2719,7 @@ public:
}
void imul(const Reg& reg, const Operand& op)
{
+ if (opROO(Reg(), op, reg, T_VEX|T_NF, 0xAF)) return;
opRO(reg, op, T_0F, 0xAF, reg.getKind() == op.getKind());
}
void imul(const Reg& reg, const Operand& op, int imm)
@@ -3044,10 +3045,6 @@ public:
size -= len;
}
}
- void not2(const Reg& d, const Operand& op)
- {
- opROO(d, op, Reg(2, Operand::REG, d.getBit()), T_VEX|T_ND1|T_CODE1_IF1, 0xF6);
- }
#ifndef XBYAK_DONT_READ_LIST
#include "xbyak_mnemonic.h"
/*