Skip to content

Commit

Permalink
add dec test
Browse files Browse the repository at this point in the history
  • Loading branch information
herumi committed Nov 12, 2023
1 parent f55f596 commit c7dba88
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/apx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,35 @@ CYBOZU_TEST_AUTO(inc_dec)
inc(r30d, r31d);
inc(r30, r31);
inc(r30, ptr [r31]);

dec(r30b);
dec(r30w);
dec(r30d);
dec(r30);
dec(r30b, r31b);
dec(r30w, r31w);
dec(r30w|T_nf, r31w);
dec(r30d, r31d);
dec(r30, r31);
dec(r30, ptr [r31]);
}
} c;
const uint8_t tbl[] = {
// inc
0xd5, 0x11, 0xfe, 0xc6, 0x66, 0xd5, 0x11, 0xff, 0xc6, 0xd5, 0x11, 0xff, 0xc6, 0xd5, 0x19, 0xff,
0xc6, 0x62, 0xdc, 0x0c, 0x10, 0xfe, 0xc7,
0x62, 0xdc, 0x0d, 0x10, 0xff, 0xc7,
0x62, 0xdc, 0x0d, 0x14, 0xff, 0xc7, // T_nf
0x62, 0xdc, 0x0c, 0x10, 0xff, 0xc7, 0x62, 0xdc, 0x8c, 0x10, 0xff, 0xc7, 0x62,
0xdc, 0x8c, 0x10, 0xff, 0x07,
// decA
0xd5, 0x11, 0xfe, 0xce, 0x66, 0xd5, 0x11, 0xff, 0xce, 0xd5, 0x11, 0xff, 0xce, 0xd5, 0x19, 0xff,
0xce, 0x62, 0xdc, 0x0c, 0x10, 0xfe, 0xcf,
0x62, 0xdc, 0x0d, 0x10, 0xff, 0xcf,
0x62, 0xdc, 0x0d, 0x14, 0xff, 0xcf, // T_nf
0x62, 0xdc, 0x0c, 0x10, 0xff, 0xcf, 0x62, 0xdc, 0x8c, 0x10, 0xff, 0xcf, 0x62,
0xdc, 0x8c, 0x10, 0xff, 0x0f,

};
const size_t n = sizeof(tbl);
CYBOZU_TEST_EQUAL(c.getSize(), n);
Expand Down

0 comments on commit c7dba88

Please sign in to comment.