projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3224e87
)
target-m68k: fix get_mac_extf helper
author
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 15 Jul 2016 15:29:22 +0000
(17:29 +0200)
committer
Michael Tokarev
<mjt@gandalf>
Tue, 13 Sep 2016 15:12:34 +0000
(18:12 +0300)
val is assigned twice; the second one should be combined with "|".
Reported by Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target-m68k/helper.c
patch
|
blob
|
history
diff --git
a/target-m68k/helper.c
b/target-m68k/helper.c
index f52d0e3036da8f488f8cd2dd1c1dcce915ba02cf..89bbe6dfa6fc9d52ad3cc402585af4caff5099b2 100644
(file)
--- a/
target-m68k/helper.c
+++ b/
target-m68k/helper.c
@@
-812,7
+812,7
@@
uint32_t HELPER(get_mac_extf)(CPUM68KState *env, uint32_t acc)
{
uint32_t val;
val = env->macc[acc] & 0x00ff;
- val = (env->macc[acc] >> 32) & 0xff00;
+ val
|
= (env->macc[acc] >> 32) & 0xff00;
val |= (env->macc[acc + 1] << 16) & 0x00ff0000;
val |= (env->macc[acc + 1] >> 16) & 0xff000000;
return val;