diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-16 12:08:36 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-16 12:08:36 +0900 |
commit | 95ad5927fdf988bbc32c7d1a09b91d8d648f6629 (patch) | |
tree | 10c0374e3f3a5c7039a405151cbea4dc018e71b7 /test | |
parent | 790afb745b0094ff431add7f5b3adc6348cc9a1b (diff) | |
download | xbyak-95ad5927fdf988bbc32c7d1a09b91d8d648f6629.tar.gz xbyak-95ad5927fdf988bbc32c7d1a09b91d8d648f6629.zip |
add tests of imul/mul/neg/not_ with 1-op
Diffstat (limited to 'test')
-rw-r--r-- | test/apx.cpp | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/test/apx.cpp b/test/apx.cpp index 7d62721..19c6694 100644 --- a/test/apx.cpp +++ b/test/apx.cpp @@ -762,6 +762,48 @@ CYBOZU_TEST_AUTO(div) idiv(dword [r20+r30*1]); idiv(qword [r20+r30*1]); + imul(r20b); + imul(r20d); + imul(r20w); + imul(r20); + imul(r20|T_nf); + imul(eax|T_nf); + imul(byte [r20+r30*1]); + imul(word [r20+r30*1]); + imul(dword [r20+r30*1]); + imul(qword [r20+r30*1]); + + mul(r20b); + mul(r20d); + mul(r20w); + mul(r20); + mul(r20|T_nf); + mul(eax|T_nf); + mul(byte [r20+r30*1]); + mul(word [r20+r30*1]); + mul(dword [r20+r30*1]); + mul(qword [r20+r30*1]); + + neg(r20b); + neg(r20d); + neg(r20w); + neg(r20); + neg(r20|T_nf); + neg(eax|T_nf); + neg(byte [r20+r30*1]); + neg(word [r20+r30*1]); + neg(dword [r20+r30*1]); + neg(qword [r20+r30*1]); + + // not_ does not have NF=1 + not_(r20b); + not_(r20d); + not_(r20w); + not_(r20); + not_(byte [r20+r30*1]); + not_(word [r20+r30*1]); + not_(dword [r20+r30*1]); + not_(qword [r20+r30*1]); } } c; const uint8_t tbl[] = { @@ -781,6 +823,22 @@ CYBOZU_TEST_AUTO(div) 0x7c, 0x0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x62, 0xfc, 0xfc, 0x0c, 0xf7, 0xdc, 0x62, 0xf4, + 0x7c, 0x0c, 0xf7, 0xd8, 0x62, 0xbc, 0x78, 0x08, 0xf6, 0x1c, 0x34, 0x62, 0xbc, 0x79, 0x08, 0xf7, + 0x1c, 0x34, 0x62, 0xbc, 0x78, 0x08, 0xf7, 0x1c, 0x34, 0x62, 0xbc, 0xf8, 0x08, 0xf7, 0x1c, 0x34, + 0x62, 0xfc, 0x7c, 0x08, 0xf6, 0xd4, 0x62, 0xfc, 0x7c, 0x08, 0xf7, 0xd4, 0x62, 0xfc, 0x7d, 0x08, + 0xf7, 0xd4, 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xd4, 0x62, 0xbc, 0x78, 0x08, 0xf6, 0x14, 0x34, 0x62, + 0xbc, 0x79, 0x08, 0xf7, 0x14, 0x34, 0x62, 0xbc, 0x78, 0x08, 0xf7, 0x14, 0x34, 0x62, 0xbc, 0xf8, + 0x08, 0xf7, 0x14, 0x34, }; const size_t n = sizeof(tbl); CYBOZU_TEST_EQUAL(c.getSize(), n); |