Skip to content

Commit

Permalink
Xtensa: upper case enums
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jun 26, 2024
1 parent 1c76cff commit d785c75
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions arch/Xtensa/XtensaMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void set_instr_map_data(MCInst *MI)
cs_xtensa_op *prev = (operand - 1);
if (prev->type == CS_OP_MEM_REG &&
prev->access == op->access) {
prev->type = Xtensa_OP_MEM;
prev->type = XTENSA_OP_MEM;
prev->mem.disp = mc->ImmVal;
continue;
}
Expand Down Expand Up @@ -169,7 +169,7 @@ void Xtensa_reg_access(const cs_insn *insn, cs_regs regs_read,
for (i = 0; i < detail->op_count; i++) {
cs_xtensa_op *op = &(detail->operands[i]);
switch (op->type) {
case Xtensa_OP_REG:
case XTENSA_OP_REG:
if ((op->access & CS_AC_READ) &&
!arr_exist(regs_read, read_count, op->reg)) {
regs_read[read_count] = (uint16_t)op->reg;
Expand All @@ -181,7 +181,7 @@ void Xtensa_reg_access(const cs_insn *insn, cs_regs regs_read,
write_count++;
}
break;
case Xtensa_OP_MEM:
case XTENSA_OP_MEM:
// registers appeared in memory references always being read
if ((op->mem.base != XTENSA_REG_INVALID) &&
!arr_exist(regs_read, read_count, op->mem.base)) {
Expand Down
14 changes: 7 additions & 7 deletions bindings/python/capstone/xtensa_const.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@
XTENSA_GRP_JUMP = 2
XTENSA_GRP_RET = 3
XTENSA_FEATURE_HASDENSITY = 128
Xtensa_GRP_ENDING = 129
Xtensa_OP_INVALID = CS_OP_INVALID
Xtensa_OP_REG = CS_OP_REG
Xtensa_OP_IMM = CS_OP_IMM
Xtensa_OP_MEM = CS_OP_MEM
Xtensa_OP_MEM_REG = CS_OP_MEM_REG
Xtensa_OP_MEM_IMM = CS_OP_MEM_IMM
XTENSA_GRP_ENDING = 129
XTENSA_OP_INVALID = CS_OP_INVALID
XTENSA_OP_REG = CS_OP_REG
XTENSA_OP_IMM = CS_OP_IMM
XTENSA_OP_MEM = CS_OP_MEM
XTENSA_OP_MEM_REG = CS_OP_MEM_REG
XTENSA_OP_MEM_IMM = CS_OP_MEM_IMM
14 changes: 7 additions & 7 deletions include/capstone/xtensa.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ XTENSA_FEATURE_HASDENSITY = 128,

// clang-format on
// generated content <XtensaGenCSFeatureEnum.inc> end
Xtensa_GRP_ENDING, ///< mark the end of the list of features
XTENSA_GRP_ENDING, ///< mark the end of the list of features
} xtensa_feature;

typedef enum cs_xtensa_op_type {
Xtensa_OP_INVALID = CS_OP_INVALID, ///< = (Uninitialized).
Xtensa_OP_REG = CS_OP_REG, ///< = (Register operand).
Xtensa_OP_IMM = CS_OP_IMM, ///< = (Immediate operand).
Xtensa_OP_MEM = CS_OP_MEM, ///< = (Memory operand).
Xtensa_OP_MEM_REG = CS_OP_MEM_REG, ///< = (Memory Register operand).
Xtensa_OP_MEM_IMM = CS_OP_MEM_IMM, ///< = (Memory Immediate operand).
XTENSA_OP_INVALID = CS_OP_INVALID, ///< = (Uninitialized).
XTENSA_OP_REG = CS_OP_REG, ///< = (Register operand).
XTENSA_OP_IMM = CS_OP_IMM, ///< = (Immediate operand).
XTENSA_OP_MEM = CS_OP_MEM, ///< = (Memory operand).
XTENSA_OP_MEM_REG = CS_OP_MEM_REG, ///< = (Memory Register operand).
XTENSA_OP_MEM_IMM = CS_OP_MEM_IMM, ///< = (Memory Immediate operand).
} cs_xtensa_op_type;

typedef struct cs_xtensa_op_mem {
Expand Down

0 comments on commit d785c75

Please sign in to comment.