arm: add IMM operand for printPostIdxImm8s4Operand(). issue #861
diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c
index 67da74b..ddfa378 100644
--- a/arch/ARM/ARMInstPrinter.c
+++ b/arch/ARM/ARMInstPrinter.c
@@ -1266,10 +1266,19 @@
 {
 	MCOperand *MO = MCInst_getOperand(MI, OpNum);
 	unsigned Imm = (unsigned int)MCOperand_getImm(MO);
-	if (((Imm & 0xff) << 2) > HEX_THRESHOLD)
+
+	if (((Imm & 0xff) << 2) > HEX_THRESHOLD) {
 		SStream_concat(O, "#%s0x%x", ((Imm & 256) ? "" : "-"), ((Imm & 0xff) << 2));
-	else
+	} else {
 		SStream_concat(O, "#%s%u", ((Imm & 256) ? "" : "-"), ((Imm & 0xff) << 2));
+	}
+
+	if (MI->csh->detail) {
+		int v = (Imm & 256) ? ((Imm & 0xff) << 2) : -((Imm & 0xff) << 2);
+		MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].type = ARM_OP_IMM;
+		MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].imm = v;
+		MI->flat_insn->detail->arm.op_count++;
+	}
 }
 
 static void printAddrMode5Operand(MCInst *MI, unsigned OpNum, SStream *O,