Skip to content

Commit

Permalink
add test of r, r/m
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Oct 30, 2023
1 parent ea9cd9a commit 710e39b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/apx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ CYBOZU_TEST_AUTO(reg_rm)
xor_(r17, ptr [rax]);
xor_(ptr [r18], rdx);
xor_(r30, rcx);

add(r30, ptr [rbx+rcx*4]);
add(rax, ptr [r30+rcx*4]);
add(rax, ptr [rbx+r30*4]);
}
} c;
const uint8_t tbl[] = {
Expand All @@ -48,6 +52,7 @@ CYBOZU_TEST_AUTO(reg_rm)
0xd5, 0x48, 0x0b, 0x08, 0xd5, 0x18, 0x09, 0x12, 0xd5, 0x19, 0x09, 0xce, 0xd5, 0x48, 0x1b, 0x08,
0xd5, 0x18, 0x19, 0x12, 0xd5, 0x19, 0x19, 0xce, 0xd5, 0x48, 0x2b, 0x08, 0xd5, 0x18, 0x29, 0x12,
0xd5, 0x19, 0x29, 0xce, 0xd5, 0x48, 0x33, 0x08, 0xd5, 0x18, 0x31, 0x12, 0xd5, 0x19, 0x31, 0xce,
0xd5, 0x4c, 0x03, 0x34, 0x8b, 0xd5, 0x19, 0x03, 0x04, 0x8e, 0xd5, 0x2a, 0x03, 0x04, 0xb3,
};
const size_t n = sizeof(tbl);
CYBOZU_TEST_EQUAL(c.getSize(), n);
Expand Down

0 comments on commit 710e39b

Please sign in to comment.