mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-26 01:06:23 +00:00
Add tests for break, cont, and halt instructions.
This commit is contained in:
parent
f45ac8b2cc
commit
9201e4e2a0
3
assembler/test/.gitignore
vendored
3
assembler/test/.gitignore
vendored
@ -13,6 +13,9 @@ if
|
||||
iff
|
||||
while
|
||||
else
|
||||
break
|
||||
cont
|
||||
halt
|
||||
wait
|
||||
endif
|
||||
immediate
|
||||
|
@ -15,6 +15,9 @@ TESTS = \
|
||||
iff \
|
||||
while \
|
||||
else \
|
||||
break \
|
||||
cont \
|
||||
halt \
|
||||
wait \
|
||||
endif \
|
||||
immediate
|
||||
@ -52,6 +55,12 @@ TESTDATA = \
|
||||
while.g4a \
|
||||
else.expected \
|
||||
else.g4a \
|
||||
break.expected \
|
||||
break.g4a \
|
||||
cont.expected \
|
||||
cont.g4a \
|
||||
halt.expected \
|
||||
halt.g4a \
|
||||
wait.expected \
|
||||
wait.g4a \
|
||||
endif.expected \
|
||||
|
1
assembler/test/break.expected
Normal file
1
assembler/test/break.expected
Normal file
@ -0,0 +1 @@
|
||||
{ 0x00000028, 0x34001c00, 0x00011400, 0x00010002 },
|
6
assembler/test/break.g4a
Normal file
6
assembler/test/break.g4a
Normal file
@ -0,0 +1,6 @@
|
||||
/* The break instruction syntax, which is currently just what was in the BNF,
|
||||
* is bad. It really needs 2 arguments -- pop count (19:16, how many
|
||||
* loops to break out of), and the IP count (15:0). For now, this argument
|
||||
* should cover 1 loop, and jumping 2 instructions.
|
||||
*/
|
||||
break 65538;
|
1
assembler/test/cont.expected
Normal file
1
assembler/test/cont.expected
Normal file
@ -0,0 +1 @@
|
||||
{ 0x00000029, 0x34001c00, 0x00011400, 0x00010002 },
|
6
assembler/test/cont.g4a
Normal file
6
assembler/test/cont.g4a
Normal file
@ -0,0 +1,6 @@
|
||||
/* The cont instruction syntax, which is currently just what was in the BNF,
|
||||
* is bad. It really needs 2 arguments -- pop count (19:16, how many
|
||||
* loops to break out of), and the IP count (15:0). For now, this argument
|
||||
* should cover 1 loop, and jumping 2 instructions.
|
||||
*/
|
||||
cont 65538;
|
1
assembler/test/halt.expected
Normal file
1
assembler/test/halt.expected
Normal file
@ -0,0 +1 @@
|
||||
{ 0x0000002a, 0x34001c00, 0x00011400, 0x00000002 },
|
1
assembler/test/halt.g4a
Normal file
1
assembler/test/halt.g4a
Normal file
@ -0,0 +1 @@
|
||||
halt 2;
|
Loading…
x
Reference in New Issue
Block a user