aboutsummaryrefslogtreecommitdiffhomepage
path: root/gen/gen_code.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2023-11-16 12:08:36 +0900
committerMITSUNARI Shigeo <[email protected]>2023-11-16 12:08:36 +0900
commit95ad5927fdf988bbc32c7d1a09b91d8d648f6629 (patch)
tree10c0374e3f3a5c7039a405151cbea4dc018e71b7 /gen/gen_code.cpp
parent790afb745b0094ff431add7f5b3adc6348cc9a1b (diff)
downloadxbyak-95ad5927fdf988bbc32c7d1a09b91d8d648f6629.tar.gz
xbyak-95ad5927fdf988bbc32c7d1a09b91d8d648f6629.zip
add tests of imul/mul/neg/not_ with 1-op
Diffstat (limited to 'gen/gen_code.cpp')
-rw-r--r--gen/gen_code.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/gen/gen_code.cpp b/gen/gen_code.cpp
index 69ae397..d12ae65 100644
--- a/gen/gen_code.cpp
+++ b/gen/gen_code.cpp
@@ -869,18 +869,22 @@ void put()
uint8_t code;
uint8_t ext;
const char *name;
+ bool NF;
} tbl[] = {
- { 0xF6, 6, "div" },
- { 0xF6, 7, "idiv" },
- { 0xF6, 5, "imul" },
- { 0xF6, 4, "mul" },
- { 0xF6, 3, "neg" },
- { 0xF6, 2, "not_" },
+ { 0xF6, 6, "div", true },
+ { 0xF6, 7, "idiv", true },
+ { 0xF6, 5, "imul", true },
+ { 0xF6, 4, "mul", true },
+ { 0xF6, 3, "neg", true },
+ { 0xF6, 2, "not_", false },
};
for (size_t i = 0; i < NUM_OF_ARRAY(tbl); i++) {
const Tbl *p = &tbl[i];
const std::string name = p->name;
- printf("void %s(const Operand& op) { opRext(op, 0, %d, T_VEX|T_NF|T_CODE1_IF1, 0x%02X); }\n", p->name, p->ext, p->code);
+ uint64_t type = T_VEX|T_CODE1_IF1;
+ if (p->NF) type |= T_NF;
+ std::string s = type2String(type);
+ printf("void %s(const Operand& op) { opRext(op, 0, %d, %s, 0x%02X); }\n", p->name, p->ext, s.c_str(), p->code);
}
}
{