diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-09 11:16:40 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-09 11:16:40 +0900 |
commit | b1f0fef4d0e71ab87e6d76ccf68320d1f2018a85 (patch) | |
tree | c4ebae0d84b25f01c9130cf09b22981264ab7a22 /gen/gen_code.cpp | |
parent | 9b21727ba0bd3938de518918a118c221ee85f1d1 (diff) | |
download | xbyak-b1f0fef4d0e71ab87e6d76ccf68320d1f2018a85.tar.gz xbyak-b1f0fef4d0e71ab87e6d76ccf68320d1f2018a85.zip |
add test of 3op apx
Diffstat (limited to 'gen/gen_code.cpp')
-rw-r--r-- | gen/gen_code.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index 07362f3..272184f 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -796,24 +796,25 @@ void put() uint8_t ext; // (reg, imm) const char *name; bool support3op; - bool allowNF; + uint64_t type; } tbl[] = { - { 0x10, 2, "adc", true, false }, - { 0x00, 0, "add", true, true }, - { 0x20, 4, "and_", true, true }, - { 0x38, 7, "cmp", false, false }, - { 0x08, 1, "or_", true, true }, - { 0x18, 3, "sbb", true, false }, - { 0x28, 5, "sub", true, true }, - { 0x30, 6, "xor_", true, true }, + { 0x10, 2, "adc", true, T_NONE }, + { 0x00, 0, "add", true, T_NF }, + { 0x20, 4, "and_", true, T_NF }, + { 0x38, 7, "cmp", false, T_NONE }, + { 0x08, 1, "or_", true, T_NF }, + { 0x18, 3, "sbb", true, T_NONE }, + { 0x28, 5, "sub", true, T_NF }, + { 0x30, 6, "xor_", true, T_NF }, }; for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) { const Tbl *p = &tbl[i]; printf("void %s(const Operand& op1, const Operand& op2) { opRO_MR(op1, op2, 0x%02X); }\n", p->name, p->code); printf("void %s(const Operand& op, uint32_t imm) { opOI(op, imm, 0x%02X, %d); }\n", p->name, p->code, p->ext); if (!p->support3op) continue; - printf("void %s(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, 0, 0x%02X); }\n", p->name, p->code); - printf("void %s(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, 0, %d); }\n", p->name, p->ext); + std::string type = type2String(0);//p->type); + printf("void %s(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, %s, 0x%02X); }\n", p->name, type.c_str(), p->code); + printf("void %s(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, %s, %d); }\n", p->name, type.c_str(), p->ext); } } { |