target-m68k: fix get_mac_extf helper

val is assigned twice; the second one should be combined with "|".
Reported by Coverity.

Backports commit 5ce747cfac697f61668ab4fa4a71c1dba15cc272 from qemu
This commit is contained in:
Paolo Bonzini 2018-02-25 23:20:58 -05:00 committed by Lioncash
parent aed5df31b7
commit 57fff7a94b
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -726,7 +726,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;