From: Paul Mackerras Date: Wed, 26 May 2021 07:44:19 +0000 (+1000) Subject: tests/fpu: Test FPU unavailable interrupt following a load X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f40842d9b2abcc604316b966f3bb7d9f8c456c2e;p=microwatt.git tests/fpu: Test FPU unavailable interrupt following a load This adds a load before a floating-point load which should generate a floating-point unavailable interrupt, to test for the bug where unavailability interrupts can get dropped while loadstore1 is executing instructions. Signed-off-by: Paul Mackerras --- diff --git a/tests/fpu/fpu.c b/tests/fpu/fpu.c index 52f21d0..500e92d 100644 --- a/tests/fpu/fpu.c +++ b/tests/fpu/fpu.c @@ -106,9 +106,11 @@ int fooiw; int do_fp_op(long arg) { + unsigned long tmp; + switch (arg) { case 0: - asm("lfd 31,0(%0)" : : "b" (&foo)); + asm("ld %0,0(%1); lfd 31,0(%1)" : "=&r" (tmp) : "b" (&foo)); break; case 1: asm("stfd 31,0(%0)" : : "b" (&foow) : "memory"); diff --git a/tests/test_fpu.bin b/tests/test_fpu.bin index 50831cb..dee8fbd 100755 Binary files a/tests/test_fpu.bin and b/tests/test_fpu.bin differ