diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-22 18:02:05 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-22 18:02:05 +0100 |
commit | e6339b10366b037893ee5385463ef4d4873b658d (patch) | |
tree | 7d995a543a9ae7d85491b205379b8fb4957d020a /src | |
parent | 47c7d6baf7d39da5e2683edc3674494fcd3874ba (diff) | |
download | ovm-e6339b10366b037893ee5385463ef4d4873b658d.tar.gz ovm-e6339b10366b037893ee5385463ef4d4873b658d.tar.bz2 ovm-e6339b10366b037893ee5385463ef4d4873b658d.zip |
Changed format of inst_print
Prints the opcode then any operands in the following brackets
Diffstat (limited to 'src')
-rw-r--r-- | src/inst.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -145,17 +145,17 @@ data_type_t get_opcode_data_type(opcode_t opcode) void inst_print(inst_t instruction, FILE *fp) { - fprintf(fp, "(%s", opcode_as_cstr(instruction.opcode)); + fprintf(fp, "%s(", opcode_as_cstr(instruction.opcode)); if (OPCODE_IS_TYPE(instruction.opcode, OP_PUSH)) { data_type_t type = get_opcode_data_type(instruction.opcode); - fprintf(fp, ", datum=0x"); + fprintf(fp, "datum=0x"); data_print(instruction.operand, type, fp); } else if (OPCODE_IS_TYPE(instruction.opcode, OP_PUSH_REGISTER) || OPCODE_IS_TYPE(instruction.opcode, OP_MOV)) { - fprintf(fp, ", reg=0x"); + fprintf(fp, "reg=0x"); data_print(instruction.operand, DATA_TYPE_BYTE, fp); } fprintf(fp, ")"); |