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 <paulus@ozlabs.org>
pull/313/head
Paul Mackerras 4 years ago
parent 64e3ce7134
commit f40842d9b2

@ -106,9 +106,11 @@ int fooiw;


int do_fp_op(long arg) int do_fp_op(long arg)
{ {
unsigned long tmp;

switch (arg) { switch (arg) {
case 0: case 0:
asm("lfd 31,0(%0)" : : "b" (&foo)); asm("ld %0,0(%1); lfd 31,0(%1)" : "=&r" (tmp) : "b" (&foo));
break; break;
case 1: case 1:
asm("stfd 31,0(%0)" : : "b" (&foow) : "memory"); asm("stfd 31,0(%0)" : : "b" (&foow) : "memory");

Binary file not shown.
Loading…
Cancel
Save