commit | 1a9d92842fd75b55532ecfbc3d8923b63769ff8d | [log] [tgz] |
---|---|---|
author | MITSUNARI Shigeo <herumi@nifty.com> | Thu Jan 26 06:32:11 2017 +0900 |
committer | MITSUNARI Shigeo <herumi@nifty.com> | Thu Jan 26 06:32:11 2017 +0900 |
tree | 65b479b99d7243e9107cd2a4489934d74200a3af | |
parent | a8d4c1fff30542cb45afc03e85cd1f2d451c527e [diff] |
allow scale == 0 for convenience
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index 4b10626..62707c7 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h
@@ -671,6 +671,7 @@ , disp_(0) { if (!r.isREG(i32e) && !r.is(Reg::XMM|Reg::YMM|Reg::ZMM)) throw Error(ERR_BAD_SIZE_OF_REGISTER); + if (scale == 0) return; if (scale != 1 && scale != 2 && scale != 4 && scale != 8) throw Error(ERR_BAD_SCALE); if (r.getBit() >= 128 || scale != 1) { // xmm/ymm is always index index_ = r;