mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-03-04 20:39:50 +00:00
arm64 & sparc: fix some warnings reported by MSVC
This commit is contained in:
parent
ea39692786
commit
911990671f
@ -614,7 +614,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
printUInt64Bang(O, imm);
|
||||
if (MI->csh->detail) {
|
||||
if (MI->csh->doing_mem) {
|
||||
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].mem.disp = imm;
|
||||
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].mem.disp = (int32_t)imm;
|
||||
} else {
|
||||
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].type = ARM64_OP_IMM;
|
||||
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].imm = imm;
|
||||
|
@ -190,10 +190,10 @@ static void printOperand(MCInst *MI, int opNum, SStream *O)
|
||||
|
||||
// get absolute address for CALL/Bxx
|
||||
if (MI->Opcode == SP_CALL)
|
||||
Imm += MI->address;
|
||||
Imm += (uint32_t)MI->address;
|
||||
else if (MI->flat_insn->id == SPARC_INS_B)
|
||||
// pc + (disp30 * 4)
|
||||
Imm = MI->address + Imm * 4;
|
||||
Imm = (uint32_t)MI->address + Imm * 4;
|
||||
|
||||
if (Imm >= 0) {
|
||||
if (Imm > HEX_THRESHOLD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user