提交 02460c3b 编写于 作者: S Stefan Hajnoczi

disas/arm: avoid clang shifting negative signed warning

clang 3.7.0 on x86_64 warns about the following:

  disas/arm.c:1782:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    imm |= (-1 << 7);
            ~~ ^

Note that this patch preserves the tab indent in this source file
because the surrounding code still uses tabs.
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 886ce6f8
......@@ -1779,7 +1779,7 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
/* Is ``imm'' a negative number? */
if (imm & 0x40)
imm |= (-1 << 7);
imm |= (~0u << 7);
func (stream, "%d", imm);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册