aboutsummaryrefslogtreecommitdiffhomepage
path: root/xbyak/xbyak.h
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2016-07-24 13:14:10 +0900
committerMITSUNARI Shigeo <[email protected]>2016-07-24 13:14:10 +0900
commit75b71a12ba8b81e24fd70f7f7f8042e439db8104 (patch)
treedd7dbd9a76f15636c102380abfe1c1e46c60a356 /xbyak/xbyak.h
parentee178796692b157c71c4c38a3fd02c8d0cb2357c (diff)
downloadxbyak-75b71a12ba8b81e24fd70f7f7f8042e439db8104.tar.gz
xbyak-75b71a12ba8b81e24fd70f7f7f8042e439db8104.zip
use opVex
Diffstat (limited to 'xbyak/xbyak.h')
-rw-r--r--xbyak/xbyak.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h
index c56fed8..a60369e 100644
--- a/xbyak/xbyak.h
+++ b/xbyak/xbyak.h
@@ -1819,15 +1819,11 @@ private:
}
void opAVX_X_X_XM(const Xmm& x1, const Operand& op1, const Operand& op2, int type, int code0, int imm8 = NONE)
{
- const Xmm *x2;
- const Operand *op;
- if (op2.isNone()) {
+ const Xmm *x2 = static_cast<const Xmm*>(&op1);
+ const Operand *op = &op2;
+ if (op2.isNone()) { // (x1, op1) -> (x1, x1, op1)
x2 = &x1;
op = &op1;
- } else {
- if (!(op1.isXMM() || ((type & T_YMM) && op1.is(Operand::YMM | Operand::ZMM)))) throw Error(ERR_BAD_COMBINATION);
- x2 = static_cast<const Xmm*>(&op1);
- op = &op2;
}
// (x1, x2, op)
if (!((x1.isXMM() && x2->isXMM()) || ((type & T_YMM) && ((x1.isYMM() && x2->isYMM()) || (x1.isZMM() && x2->isZMM()))))) throw Error(ERR_BAD_COMBINATION);