mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-01-11 23:43:15 +00:00
tests/reservation: Check that SRR0 is set correctly on alignment interrupt
The tests that intentionally generate alignment interrupts now also check that SRR0 is pointing to a l*arx or st*cx instruction. Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
parent
622f8c81cc
commit
23b183fb16
@ -157,6 +157,7 @@ int resv_test_2(void)
|
||||
{
|
||||
unsigned long x[3];
|
||||
unsigned long offset, j, size, ret;
|
||||
unsigned int instr;
|
||||
|
||||
x[0] = 1234;
|
||||
x[1] = x[2] = 0;
|
||||
@ -169,6 +170,9 @@ int resv_test_2(void)
|
||||
if (ret == 0x600) {
|
||||
if ((offset & (size - 1)) == 0)
|
||||
return j + 0x10;
|
||||
instr = *(unsigned int *)mfspr(SRR0);
|
||||
if ((instr & 0xfc00073f) != 0x7c000028)
|
||||
return j + 0x40;
|
||||
} else if (ret)
|
||||
return ret;
|
||||
ret = callit(size, (unsigned long)&x[0] + offset, do_stcx);
|
||||
@ -177,6 +181,9 @@ int resv_test_2(void)
|
||||
if (ret == 0x600) {
|
||||
if ((offset & (size - 1)) == 0)
|
||||
return j + 0x30;
|
||||
instr = *(unsigned int *)mfspr(SRR0);
|
||||
if ((instr & 0xfc00033f) != 0x7c00012d)
|
||||
return j + 0x50;
|
||||
} else if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user