projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
037e1d0
)
target-arm: A64: Avoid signed shifts in disas_ldst_pair()
author
Peter Maydell
<peter.maydell@linaro.org>
Fri, 13 Feb 2015 05:46:09 +0000
(
05:46
+0000)
committer
Peter Maydell
<peter.maydell@linaro.org>
Fri, 13 Feb 2015 05:46:09 +0000
(
05:46
+0000)
Avoid shifting potentially negative signed offset values in
disas_ldst_pair() by keeping the offset in a uint64_t rather
than an int64_t.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
1423233250
-15853-5-git-send-email-peter.maydell@linaro.org
target-arm/translate-a64.c
patch
|
blob
|
history
diff --git
a/target-arm/translate-a64.c
b/target-arm/translate-a64.c
index 68c5b239141f614c073bc2635b89b34aa3ea1111..9f54501a9ec744e4466506b688ea0b761a6370c2 100644
(file)
--- a/
target-arm/translate-a64.c
+++ b/
target-arm/translate-a64.c
@@
-1917,7
+1917,7
@@
static void disas_ldst_pair(DisasContext *s, uint32_t insn)
int rt = extract32(insn, 0, 5);
int rn = extract32(insn, 5, 5);
int rt2 = extract32(insn, 10, 5);
-
int64_t offset = sextract32
(insn, 15, 7);
+
uint64_t offset = sextract64
(insn, 15, 7);
int index = extract32(insn, 23, 2);
bool is_vector = extract32(insn, 26, 1);
bool is_load = extract32(insn, 22, 1);