summaryrefslogtreecommitdiffstats
path: root/disas
diff options
context:
space:
mode:
authorPeter Maydell2017-03-31 16:31:11 +0200
committerPeter Maydell2017-04-03 15:06:59 +0200
commit230f4c6bc5c9af3c8a1fd033641f2bfb8ed45c1b (patch)
tree9d7bcd52ccdac419bad2450a22d309bba0cf4378 /disas
parentconfigure: Mark SPARC as supported (diff)
downloadqemu-230f4c6bc5c9af3c8a1fd033641f2bfb8ed45c1b.tar.gz
qemu-230f4c6bc5c9af3c8a1fd033641f2bfb8ed45c1b.tar.xz
qemu-230f4c6bc5c9af3c8a1fd033641f2bfb8ed45c1b.zip
disas/cris.c: Avoid unintentional sign extension
Commit 001ebaca7b11 fixed some unintended sign extension issues spotted by Coverity (CID 1005402, 1005403), but didn't catch all of them. Fix the rest, so we behave consistently whether 'long' is 32 bit or 64 bit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1490970671-20560-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'disas')
-rw-r--r--disas/cris.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/disas/cris.c b/disas/cris.c
index 30217f17f9..2dd56deea4 100644
--- a/disas/cris.c
+++ b/disas/cris.c
@@ -2048,7 +2048,7 @@ print_with_operands (const struct cris_opcode *opcodep,
{
/* We're looking at [pc+], i.e. we need to output an immediate
number, where the size can depend on different things. */
- long number;
+ int32_t number;
int signedp
= ((*cs == 'z' && (insn & 0x20))
|| opcodep->match == BDAP_QUICK_OPCODE);
@@ -2290,7 +2290,7 @@ print_with_operands (const struct cris_opcode *opcodep,
if ((prefix_insn & 0x400) && (prefix_insn & 15) == 15)
{
- long number;
+ int32_t number;
unsigned int nbytes;
/* It's a value. Get its size. */