1/*
2 * Registers
3 * g0 -- header
4 * g1 -- constant
5 * g2 -- inline data
6 * g3 -- reserved
7 * g4-g12 payload for write message
8 */
9define(`ORIG',          `g2.0<2,2,1>UD')
10define(`COLOR',         `g1.0')
11define(`COLORUB',       `COLOR<0,1,0>UB')
12define(`COLORUD',       `COLOR<0,1,0>UD')
13
14mov(4)  COLOR<1>UB      COLORUB         {align1};
15
16/* WRITE */
17mov(8)  g4.0<1>UD       g0.0<8,8,1>UD   {align1};
18mov(2)  g4.0<1>UD       ORIG            {align1};
19mov(1)  g4.8<1>UD       0x000f000fUD    {align1};
20
21mov(16) g5.0<1>UD       COLORUD         {align1 compr};
22mov(16) g7.0<1>UD       COLORUD         {align1 compr};
23mov(16) g9.0<1>UD       COLORUD         {align1 compr};
24mov(16) g11.0<1>UD      COLORUD         {align1 compr};
25
26/*
27 * comment out the following instruction on Gen7
28 * write(0, 0, 10, 12)
29 *   10: media_block_write
30 *   12: data cache data port 1
31 */
32send(16) 4 acc0<1>UW null write(0, 0, 10, 12) mlen 9 rlen 0 {align1};
33
34/*
35 * uncomment the following instruction on Gen7
36 * write(0, 0, 10, 0)
37 *   10: media_block_write
38 *    0: reander cache data port
39 */
40/* send(16) 4 acc0<1>UW null write(0, 0, 10, 0) mlen 9 rlen 0 {align1}; */
41
42/* EOT */
43mov(8)  g112.0<1>UD       g0.0<8,8,1>UD   {align1};
44send(16) 112 null<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT};
45