diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-12-20 14:47:14 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-12-20 14:47:14 +0900 |
commit | e690a2a47d7a48a4ebdcaf984afe67d2eb650224 (patch) | |
tree | 420be985d6048441f2bf8b1cd7fd92b585e88dce /gen | |
parent | c9765588f0e4f9fdaa5f054f45818e42045d3ed1 (diff) | |
download | xbyak-e690a2a47d7a48a4ebdcaf984afe67d2eb650224.tar.gz xbyak-e690a2a47d7a48a4ebdcaf984afe67d2eb650224.zip |
sha* supports apx
Diffstat (limited to 'gen')
-rw-r--r-- | gen/gen_code.cpp | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index 892fdbc..71bd13c 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -1402,14 +1402,6 @@ void put() { 0x2E, "ucomisd", T_0F | T_66 | T_EVEX | T_EW1 | T_SAE_X | T_N8, false, 2 }, { 0x2E, "ucomiss", T_0F | T_EVEX | T_EW0 | T_SAE_X | T_N4, false, 2 }, - - { 0xCC, "sha1rnds4", T_0F3A, true, 1 }, - { 0xC8, "sha1nexte", T_0F38, false, 1 }, - { 0xC9, "sha1msg1", T_0F38, false, 1 }, - { 0xCA, "sha1msg2", T_0F38, false, 1 }, - { 0xCB, "sha256rnds2", T_0F38, false, 1 }, - { 0xCC, "sha256msg1", T_0F38, false, 1 }, - { 0xCD, "sha256msg2", T_0F38, false, 1 }, }; for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { const Tbl *p = &tbl[i]; @@ -1425,6 +1417,26 @@ void put() } } } + // sha + { + const struct Tbl { + uint8_t code; + uint8_t code2; + const char *name; + } tbl[] = { + { 0xC8, 0xD8, "sha1nexte" }, + { 0xC9, 0xD9, "sha1msg1" }, + { 0xCA, 0xDA, "sha1msg2" }, + { 0xCB, 0xDB, "sha256rnds2" }, + { 0xCC, 0xDC, "sha256msg1" }, + { 0xCD, 0xDD, "sha256msg2" }, + }; + for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { + const Tbl *p = &tbl[i]; + printf("void %s(const Xmm& x, const Operand& op) { opSHA(x, op, T_0F38, 0x%02X, 0x%02X); }\n", p->name, p->code, p->code2); + } + puts("void sha1rnds4(const Xmm& x, const Operand& op, uint8_t imm) { opSHA(x, op, T_0F3A, 0xCC, 0xD4, imm); }"); + } // (m, x), (m, y) { const struct Tbl { |