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>
This commit is contained in:
Paolo Bonzini 2016-07-15 17:29:22 +02:00 committed by Michael Tokarev
parent 3224e8786f
commit 5ce747cfac
1 changed files with 1 additions and 1 deletions

View File

@ -812,7 +812,7 @@ uint32_t HELPER(get_mac_extf)(CPUM68KState *env, uint32_t acc)
{ {
uint32_t val; uint32_t val;
val = env->macc[acc] & 0x00ff; 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) & 0x00ff0000;
val |= (env->macc[acc + 1] >> 16) & 0xff000000; val |= (env->macc[acc + 1] >> 16) & 0xff000000;
return val; return val;