Skip to content

Commit

Permalink
Primt SME oeprands.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Jun 21, 2023
1 parent a706ec7 commit 5aeddb1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/AArch64/AArch64Mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ static void set_sme_operand(MCInst *MI, bool init) {
assert(AArch64_get_detail_op(MI, 0)->sme.type != AArch64_SME_OP_INVALID);

AArch64_get_detail(MI)->is_doing_sme = true;
AArch64_get_detail_op(MI, 0)->type = AArch64_OP_SME_MATRIX;
AArch64_get_detail_op(MI, 0)->sme.type = AArch64_SME_OP_INVALID;
AArch64_get_detail_op(MI, 0)->sme.tile = AArch64_REG_INVALID;
AArch64_get_detail_op(MI, 0)->sme.slice_reg = AArch64_REG_INVALID;
Expand Down
13 changes: 13 additions & 0 deletions cstool/cstool_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ void print_insn_detail_aarch64(csh handle, cs_insn *ins)
printf("\t\t\toperands[%u].mem.disp: 0x%x\n", i, op->mem.disp);

break;
case AArch64_OP_SME_MATRIX:
printf("\t\toperands[%u].type: SME_MATRIX\n", i);
printf("\t\toperands[%u].sme.type: %d\n", i, op->sme.type);

if (op->sme.tile != AArch64_REG_INVALID)
printf("\t\toperands[%u].sme.tile: %s\n", i, cs_reg_name(handle, op->sme.tile));
if (op->sme.slice_reg != AArch64_REG_INVALID)
printf("\t\toperands[%u].sme.slice_reg: %s\n", i, cs_reg_name(handle, op->sme.slice_reg));
if (op->sme.slice_offset != -1)
printf("\t\toperands[%u].sme.slice_offset: %d\n", i, op->sme.slice_offset);
if (op->sme.slice_reg != AArch64_REG_INVALID || op->sme.slice_offset != -1)
printf("\t\toperands[%u].sme.is_vertical: %s\n", i, (op->sme.is_vertical ? "true" : "false"));
break;
case AArch64_OP_CIMM:
printf("\t\toperands[%u].type: C-IMM = %u\n", i, (int)op->imm);
break;
Expand Down
1 change: 1 addition & 0 deletions include/capstone/aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,7 @@ typedef enum aarch64_op_type {
AArch64_OP_BTI = CS_OP_SPECIAL + 16,
AArch64_OP_SVEPREDPAT = CS_OP_SPECIAL + 17,
AArch64_OP_SVEVECLENSPECIFIER = CS_OP_SPECIAL + 18,
AArch64_OP_SME_MATRIX = CS_OP_SPECIAL + 19,
} aarch64_op_type;

/// AArch64 registers
Expand Down

0 comments on commit 5aeddb1

Please sign in to comment.