diff options
author | MITSUNARI Shigeo <[email protected]> | 2023-11-09 14:20:52 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2023-11-09 14:20:52 +0900 |
commit | e23f5ad75130ba28e08974335cd9ceaeff9b17a5 (patch) | |
tree | 31ab7cd47df93f13b6cf07821754cc54019bad0b | |
parent | 1bcc8330356ce4c9c90081dc6e93c43983d7ea20 (diff) | |
download | xbyak-e23f5ad75130ba28e08974335cd9ceaeff9b17a5.tar.gz xbyak-e23f5ad75130ba28e08974335cd9ceaeff9b17a5.zip |
fix type for adc
-rw-r--r-- | gen/gen_code.cpp | 12 | ||||
-rw-r--r-- | xbyak/xbyak_mnemonic.h | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp index d7700cb..0615ecb 100644 --- a/gen/gen_code.cpp +++ b/gen/gen_code.cpp @@ -798,20 +798,20 @@ void put() uint64_t type; } tbl[] = { { 0x10, 2, "adc", true, T_NONE }, - { 0x00, 0, "add", true, T_NF }, - { 0x20, 4, "and_", true, T_NF }, + { 0x00, 0, "add", true, T_NF | T_CODE1_IF1 }, + { 0x20, 4, "and_", true, T_NF | T_CODE1_IF1 }, { 0x38, 7, "cmp", false, T_NONE }, - { 0x08, 1, "or_", true, T_NF }, + { 0x08, 1, "or_", true, T_NF | T_CODE1_IF1 }, { 0x18, 3, "sbb", true, T_NONE }, - { 0x28, 5, "sub", true, T_NF }, - { 0x30, 6, "xor_", true, T_NF }, + { 0x28, 5, "sub", true, T_NF | T_CODE1_IF1 }, + { 0x30, 6, "xor_", true, T_NF | T_CODE1_IF1 }, }; 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; - std::string s = type2String(p->type | T_CODE1_IF1); + std::string s = type2String(p->type); printf("void %s(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, %s, 0x%02X); }\n", p->name, s.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, s.c_str(), p->ext); } diff --git a/xbyak/xbyak_mnemonic.h b/xbyak/xbyak_mnemonic.h index 877e46d..f42b1ee 100644 --- a/xbyak/xbyak_mnemonic.h +++ b/xbyak/xbyak_mnemonic.h @@ -3,8 +3,8 @@ void aadd(const Address& addr, const Reg32e ®) { opMR(addr, reg, T_0F38, 0x0F void aand(const Address& addr, const Reg32e ®) { opMR(addr, reg, T_0F38 | T_66, 0x0FC); } void adc(const Operand& op, uint32_t imm) { opOI(op, imm, 0x10, 2); } void adc(const Operand& op1, const Operand& op2) { opRO_MR(op1, op2, 0x10); } -void adc(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, T_CODE1_IF1, 2); } -void adc(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, T_CODE1_IF1, 0x10); } +void adc(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, T_NONE, 2); } +void adc(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, T_NONE, 0x10); } void adcx(const Reg32e& d, const Reg32e& reg, const Operand& op) { opROO(d, op, reg, T_66, 0x66); } void adcx(const Reg32e& reg, const Operand& op) { if (!reg.isREG(16|i32e) && reg.getBit() == op.getBit()) XBYAK_THROW(ERR_BAD_SIZE_OF_REGISTER) if (opROO(Reg(), op, reg, T_66, 0x66)) return; opRO(reg, op, T_66 | T_0F38, 0xF6); } void add(const Operand& op, uint32_t imm) { opOI(op, imm, 0x00, 0); } @@ -759,8 +759,8 @@ void sar(const Operand& op, int imm) { opShift(op, imm, 7); } void sarx(const Reg32e& r1, const Operand& op, const Reg32e& r2) { opRRO(r1, r2, op, T_F3|T_0F38, 0xf7); } void sbb(const Operand& op, uint32_t imm) { opOI(op, imm, 0x18, 3); } void sbb(const Operand& op1, const Operand& op2) { opRO_MR(op1, op2, 0x18); } -void sbb(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, T_CODE1_IF1, 3); } -void sbb(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, T_CODE1_IF1, 0x18); } +void sbb(const Reg& d, const Operand& op, uint32_t imm) { opROI(d, op, imm, T_NONE, 3); } +void sbb(const Reg& d, const Operand& op1, const Operand& op2) { opROO(d, op1, op2, T_NONE, 0x18); } void scasb() { db(0xAE); } void scasd() { db(0xAF); } void scasw() { db(0x66); db(0xAF); } |