Array descriptor ranges are inclusive; adjust aar and the tests to check for

this. All the tests except rotate build now!
This commit is contained in:
David Given 2018-09-17 19:34:38 +01:00
parent f61500c51b
commit ec0891469f
5 changed files with 7 additions and 7 deletions

View file

@ -10,7 +10,7 @@
* An array descriptor is:
*
* +0 lower bound
* +4 range (upper bound - lower bound)
* +4 range (upper bound - lower bound); *inclusive*
* +8 element size
*/
@ -28,8 +28,8 @@
subu r5, r5, r7 ! adjust index for non-zero lower bound
lw at, 4(r4) ! at = range
slt at, r5, at ! at = adjusted index < range
beq at, zero, .trap_earray
slt at, at, r5 ! at = range < adjusted index
bne at, zero, .trap_earray
nop
lw r2, 8(r4) ! r2 = size of element

View file

@ -4,5 +4,5 @@ plat_testsuite {
name = "tests",
plat = "linuxmips",
method = "qemu-mipsel",
skipsets = {"m2"}
-- skipsets = {"m2"},
}

View file

@ -13,7 +13,7 @@ array
descriptor
con -1 ; lower bound
con 3 ; range
con 2 ; range, *inclusive*
con EM_WSIZE ; size of element

View file

@ -17,7 +17,7 @@ array
descriptor
con -1 ; lower bound
con 3 ; range
con 2 ; range, *inclusive*
con EM_WSIZE ; size of element
exp $_m_a_i_n

View file

@ -15,7 +15,7 @@ array
descriptor
con -1 ; lower bound
con 3 ; range
con 2 ; range, *inclusive*
con EM_WSIZE ; size of element
element0