sparc: change imm type from int32_t to int64_t
diff --git a/bindings/python/capstone/sparc.py b/bindings/python/capstone/sparc.py
index f181af8..1c536ff 100644
--- a/bindings/python/capstone/sparc.py
+++ b/bindings/python/capstone/sparc.py
@@ -15,7 +15,7 @@
class SparcOpValue(ctypes.Union):
_fields_ = (
('reg', ctypes.c_uint),
- ('imm', ctypes.c_int32),
+ ('imm', ctypes.c_int64),
('mem', SparcOpMem),
)
diff --git a/cstool/cstool_sparc.c b/cstool/cstool_sparc.c
index 49f8294..4d914be 100644
--- a/cstool/cstool_sparc.c
+++ b/cstool/cstool_sparc.c
@@ -29,7 +29,7 @@
printf("\t\toperands[%u].type: REG = %s\n", i, cs_reg_name(handle, op->reg));
break;
case SPARC_OP_IMM:
- printf("\t\toperands[%u].type: IMM = 0x%x\n", i, op->imm);
+ printf("\t\toperands[%u].type: IMM = 0x%" PRIx64 "\n", i, op->imm);
break;
case SPARC_OP_MEM:
printf("\t\toperands[%u].type: MEM\n", i);
diff --git a/include/capstone/sparc.h b/include/capstone/sparc.h
index 2154314..4a28398 100644
--- a/include/capstone/sparc.h
+++ b/include/capstone/sparc.h
@@ -190,7 +190,7 @@
sparc_op_type type; // operand type
union {
sparc_reg reg; // register value for REG operand
- int32_t imm; // immediate value for IMM operand
+ int64_t imm; // immediate value for IMM operand
sparc_op_mem mem; // base/disp value for MEM operand
};
} cs_sparc_op;
diff --git a/tests/test_sparc.c b/tests/test_sparc.c
index 8444b1f..122829a 100644
--- a/tests/test_sparc.c
+++ b/tests/test_sparc.c
@@ -50,7 +50,7 @@
printf("\t\toperands[%u].type: REG = %s\n", i, cs_reg_name(handle, op->reg));
break;
case SPARC_OP_IMM:
- printf("\t\toperands[%u].type: IMM = 0x%x\n", i, op->imm);
+ printf("\t\toperands[%u].type: IMM = 0x%" PRIx64 "\n", i, op->imm);
break;
case SPARC_OP_MEM:
printf("\t\toperands[%u].type: MEM\n", i);