asm/win: add psize tests
This commit is contained in:
parent
651d474982
commit
2ddd3e9a5a
@ -49,6 +49,8 @@ asm_tests = {
|
||||
'setwd-2': {},
|
||||
'setwd-invalidate-regs-1': {},
|
||||
'setwd-invalidate-regs-2': {},
|
||||
'setwd-psize-1': {},
|
||||
'setwd-psize-2': { 'should_fail': true },
|
||||
'setbn-invalidate-regs-1': {},
|
||||
'setbn-invalidate-regs-2': { 'should_fail': true },
|
||||
'setbp-invalidate-regs-1': {},
|
||||
|
20
tests/asm/win/setwd-psize-1.S
Normal file
20
tests/asm/win/setwd-psize-1.S
Normal file
@ -0,0 +1,20 @@
|
||||
#include "test_start.S"
|
||||
|
||||
setwd wsz=8, nfx=1
|
||||
|
||||
disp %ctpr1, 0f
|
||||
// psize = (8 - 4) * 2 = 8 regs
|
||||
call %ctpr1, wbs=4
|
||||
|
||||
disp %ctpr1, 0f
|
||||
// psize = (8 - 8) * 2 = 0 regs
|
||||
call %ctpr1, wbs=8
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
{
|
||||
setwd wsz=4, nfx=1
|
||||
return %ctpr3
|
||||
}
|
||||
ct %ctpr3
|
21
tests/asm/win/setwd-psize-2.S
Normal file
21
tests/asm/win/setwd-psize-2.S
Normal file
@ -0,0 +1,21 @@
|
||||
#include "test_start.S"
|
||||
|
||||
{
|
||||
setwd wsz=16, nfx=1
|
||||
disp %ctpr1, 0f
|
||||
}
|
||||
{
|
||||
// psize = (16 - 4) * 2 = 24 regs
|
||||
call %ctpr1, wbs=4
|
||||
}
|
||||
|
||||
#include "test_end.S"
|
||||
|
||||
0:
|
||||
// psize = 24
|
||||
{
|
||||
// try to set wsz lower than psize
|
||||
setwd wsz=4, nfx=1
|
||||
return %ctpr3
|
||||
}
|
||||
ct %ctpr3
|
Loading…
Reference in New Issue
Block a user