arm64 & sparc: fix some warnings reported by MSVC

This commit is contained in:
Nguyen Anh Quynh 2015-01-13 14:33:09 +08:00
parent ea39692786
commit 911990671f
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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)