mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-02 12:01:53 +00:00
arm64: fix imm of MOV instruction. issue 1456
This commit is contained in:
parent
99d00fee14
commit
8cbf967f67
@ -105,6 +105,8 @@ void AArch64_printInst(MCInst *MI, SStream *O, void *Info)
|
||||
int LSB, Width;
|
||||
char *mnem;
|
||||
|
||||
// printf(">>> opcode = %u\n", MCInst_getOpcode(MI));
|
||||
|
||||
if (Opcode == AArch64_SYSxt && printSysAlias(MI, O))
|
||||
return;
|
||||
|
||||
@ -575,7 +577,7 @@ void AArch64_printInst(MCInst *MI, SStream *O, void *Info)
|
||||
MI->flat_insn->detail->arm64.op_count++;
|
||||
|
||||
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 = RegWidth;
|
||||
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].imm = SignExtend64(Value, RegWidth);
|
||||
MI->flat_insn->detail->arm64.op_count++;
|
||||
}
|
||||
|
||||
@ -629,8 +631,6 @@ void AArch64_printInst(MCInst *MI, SStream *O, void *Info)
|
||||
|
||||
MI->MRI = Info;
|
||||
|
||||
// printf(">>> aaaa opcode = %u\n", MCInst_getOpcode(MI));
|
||||
|
||||
mnem = printAliasInstr(MI, O, (MCRegisterInfo *)Info);
|
||||
if (mnem) {
|
||||
MCInst_setOpcodePub(MI, AArch64_map_insn(mnem));
|
||||
|
@ -1,3 +1,9 @@
|
||||
!# issue 1456
|
||||
!# CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, CS_OPT_DETAIL
|
||||
0x0c,0x00,0x80,0x12 == mov w12, #-1 ; operands[1].type: IMM = 0xffffffffffffffff
|
||||
|
||||
0xb8,0x00,0x00,0x00,0x00 == movl $0, %eax
|
||||
|
||||
!# issue 1456
|
||||
!# CS_ARCH_X86, CS_MODE_32, CS_OPT_SYNTAX_ATT
|
||||
0xb8,0x00,0x00,0x00,0x00 == movl $0, %eax
|
||||
|
Loading…
x
Reference in New Issue
Block a user