diff mbox series

[Bug,1701835] Re: floating-point operation bugs in qemu-alpha

Message ID 155622959330.14126.13092327258668683533.malone@gac.canonical.com
State New
Headers show
Series [Bug,1701835] Re: floating-point operation bugs in qemu-alpha | expand

Commit Message

Stefan Ring April 25, 2019, 9:59 p.m. UTC
There seems to be more confusion of the sort. This fixes it for me:


But I would consider this a workaround at best. Having a right-shifted
mask in the first place seems rather unhelpful to me.
diff mbox series

Patch

--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -10226,7 +10226,7 @@  static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
                     return -TARGET_EFAULT;
                 }
                 orig_fpcr = cpu_alpha_load_fpcr(cpu_env);
-                fpcr = orig_fpcr & FPCR_DYN_MASK;
+                fpcr = orig_fpcr & ((uint64_t) FPCR_DYN_MASK << 32);

                 /* Copied from linux ieee_swcr_to_fpcr.  */
                 fpcr |= (swcr & SWCR_STATUS_MASK) << 35;