aboutsummaryrefslogtreecommitdiff
path: root/target-m68k
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-07-15 17:29:22 +0200
committerMichael Tokarev <mjt@gandalf>2016-09-13 18:12:34 +0300
commit5ce747cfac697f61668ab4fa4a71c1dba15cc272 (patch)
treefe2aadeb7207aa7300a43bfb80f95356e83c7e14 /target-m68k
parent3224e8786fcbe531746f1530c37210c425625213 (diff)
downloadqemu-5ce747cfac697f61668ab4fa4a71c1dba15cc272.zip
qemu-5ce747cfac697f61668ab4fa4a71c1dba15cc272.tar.gz
qemu-5ce747cfac697f61668ab4fa4a71c1dba15cc272.tar.bz2
target-m68k: fix get_mac_extf helper
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>
Diffstat (limited to 'target-m68k')
-rw-r--r--target-m68k/helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-m68k/helper.c b/target-m68k/helper.c
index f52d0e3..89bbe6d 100644
--- 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;