arm64 & sparc: fix some warnings reported by MSVC

_v3_old
Nguyen Anh Quynh 10 years ago
parent 9a1238d353
commit 273c6f4a9e
  1. 2
      arch/AArch64/AArch64InstPrinter.c
  2. 4
      arch/Sparc/SparcInstPrinter.c

@ -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…
Cancel
Save