encode VEX and EVEX params
This commit is contained in:
parent
3443dbccc7
commit
d13505b2f9
1 changed files with 15 additions and 0 deletions
15
genc.py
15
genc.py
|
|
@ -268,6 +268,21 @@ def generate_table(groups):
|
||||||
convert_imm(i.imm) if i.has_imm() else 0,
|
convert_imm(i.imm) if i.has_imm() else 0,
|
||||||
convert_value(i.value) if i.has_value() else 0
|
convert_value(i.value) if i.has_value() else 0
|
||||||
), end = '')
|
), end = '')
|
||||||
|
elif i.get_type() == InstructionType.VEX:
|
||||||
|
print(" .vex = {{ .lig = {}, .l = {}, .wig = {}, .w = {} }},".format(
|
||||||
|
int(i.lig),
|
||||||
|
i.l,
|
||||||
|
int(i.wig),
|
||||||
|
int(i.w)
|
||||||
|
), end = '')
|
||||||
|
elif i.get_type() == InstructionType.EVEX:
|
||||||
|
print(" .evex = {{ .lig = {}, .l = {}, .wig = {}, .w = {} }},".format(
|
||||||
|
int(i.lig),
|
||||||
|
i.l,
|
||||||
|
int(i.wig),
|
||||||
|
int(i.w)
|
||||||
|
), end = '')
|
||||||
|
|
||||||
print(" .opcode_len = {}, .opcode = {{ {} }} }},".format(opcode_len, opcode))
|
print(" .opcode_len = {}, .opcode = {{ {} }} }},".format(opcode_len, opcode))
|
||||||
table_len += 1
|
table_len += 1
|
||||||
# footer
|
# footer
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue