Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  *  Copyright 2000-2013 Intel Corporation All Rights Reserved
  3.  *
  4.  *  Licensed under the Apache License, Version 2.0 (the "License");
  5.  *  you may not use this file except in compliance with the License.
  6.  *  You may obtain a copy of the License at
  7.  *
  8.  *      http://www.apache.org/licenses/LICENSE-2.0
  9.  *
  10.  *  Unless required by applicable law or agreed to in writing, software
  11.  *  distributed under the License is distributed on an "AS IS" BASIS,
  12.  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  *  See the License for the specific language governing permissions and
  14.  *  limitations under the License.
  15.  *  Authors:
  16.  *    Zhao Yakui <yakui.zhao@intel.com>
  17.  */
  18.  
  19.  
  20.  
  21. // Module name: common.inc
  22. //
  23. // Common header file for all Video-Processing kernels
  24. //
  25.  
  26. .default_execution_size (16)
  27. .default_register_type  :ub
  28.  
  29. .reg_count_total        128
  30. .reg_count_payload      7
  31.  
  32. //========== Common constants ==========
  33.  
  34.  
  35. //========== Macros ==========
  36.  
  37.  
  38. //Fast Jump, For more details see "Set_Layer_N.asm"
  39.  
  40.  
  41. //========== Defines ====================
  42.  
  43. //========== Static Parameters (Common To All) ==========
  44. //r1
  45.  
  46.  
  47. //r2
  48.  
  49.                                     //  e.g.            byte0   byte1  byte2
  50.                                     // YUYV               0       1      3
  51.                                     // YVYU               0       3      1
  52.  
  53. //Color Pipe (IECP) parameters
  54.  
  55.  
  56. //ByteCopy
  57.  
  58.  
  59. //r4
  60.  
  61.                                     //  e.g.              byte0           byte1           byte2
  62.                                     // YUYV                 0               1               3
  63.                                     // YVYU                 0               3               1
  64.  
  65.  
  66. //========== Inline parameters (Common To All) ===========
  67.  
  68.  
  69. //============== Binding Index Table===========
  70. //Common between DNDI and DNUV
  71.  
  72.  
  73. //================= Common Message Descriptor =====
  74. // Message descriptor for thread spawning
  75. // Message Descriptors
  76. //                = 000 0001 (min message len 1 ) 0,0000 (resp len 0   -add later)
  77. //                  0000,0000,0000
  78. //                  0001(Spawn a root thread),0001 (Root thread spawn thread)
  79. //                = 0x02000011
  80. // Thread Spawner Message Descriptor
  81.  
  82.  
  83. // Message descriptor for atomic operation add
  84. // Message Descriptors
  85. //                = 000 0110 (min message len 6 ) 0,0000 (resp len 0   -add later)
  86. //                  1(header present)001,10(typed atomic operation)0(return enabled)0(slot group, low 8 bits),0111 (AOP_Add)
  87. //                  0000,0000 (Binding table index, added later)
  88. //                = 0x02000011
  89.  
  90. // Atomic Operation Add Message Descriptor
  91.  
  92.  
  93. // Message descriptor for dataport media write
  94.         // Message Descriptors
  95.                 //                = 000 0001 (min message len 1 - add later) 00000 (resp len 0)
  96.                 //                  1 (header present 1) 0 1010 (media block write) 000000
  97.                 //                  00000000 (binding table index - set later)
  98.                 //                = 0x020A8000
  99.  
  100.  
  101. // Message Length defines
  102.  
  103.  
  104. // Response Length defines
  105.  
  106.  
  107. // Block Width and Height Size defines
  108.  
  109.  
  110. // Extended Message Descriptors
  111.  
  112.  
  113. // Common message descriptors:
  114.  
  115.  
  116. //===================== Math Function Control ===================================
  117.  
  118.  
  119. //============ Message Registers ===============
  120.                              // buf4 starts from r28
  121.  
  122.  
  123. //#define mMSGHDR_EOT  r43    // Dummy Message Register for EOT
  124.  
  125.  
  126. .declare    mubMSGPAYLOAD  Base=r30 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  127. .declare    muwMSGPAYLOAD  Base=r30 ElementSize=2 SrcRegion=<16;16,1> Type=uw
  128. .declare    mudMSGPAYLOAD  Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=ud
  129. .declare    mfMSGPAYLOAD   Base=r30 ElementSize=4 SrcRegion=<8;8,1> Type=f
  130.  
  131. //=================== End of thread instruction ===========================
  132.  
  133.  
  134. //=====================Pointers Used=====================================
  135.  
  136.  
  137. //=======================================================================
  138.  
  139.  
  140. //r9-r17
  141. // Define temp space for any usages
  142.  
  143.  
  144. // Common Buffers
  145.  
  146.  
  147. // temp space for rotation
  148.  
  149. .declare fROBUF           Base=r9.0             ElementSize=4           SrcRegion=<8;8,1>                 DstRegion=<1>         Type=f
  150.  
  151. .declare udROBUF                Base=r9.0               ElementSize=4           SrcRegion=<8;8,1>                 DstRegion=<1>         Type=ud
  152.  
  153. .declare uwROBUF                Base=r9.0               ElementSize=2           SrcRegion=<16;16,1>             DstRegion=<1>           Type=uw
  154.  
  155. .declare ubROBUF                Base=r9.0               ElementSize=1           SrcRegion=<16;16,1>             DstRegion=<1>           Type=ub
  156.  
  157. .declare ub4ROBUF       Base=r9.0               ElementSize=1           SrcRegion=<32;8,4>              DstRegion=<4>           Type=ub
  158.  
  159.  
  160. // End of common.inc
  161.  
  162.  
  163. // Module name: Save_AVS_RGBX.asm
  164. //
  165. // Save packed ARGB 444 frame data block of size 16x16
  166. //
  167. // To save 16x16 block (64x16 byte layout for ARGB8888) we need 8 send instructions with 32x4 in each
  168. //  --------
  169. //  | 0 | 1 |
  170. //  | 2 | 3 |
  171. //  | 4 | 5 |
  172. //  | 6 | 7 |
  173. //  ---------
  174. // the 8 32x4 block send is used
  175.  
  176.  
  177.  
  178. // Module name: Save.inc
  179.  
  180.  
  181.  
  182.  
  183. // Description: Includes all definitions explicit to Fast Composite.
  184.  
  185.  
  186.  
  187.  
  188. // End of common.inc
  189.  
  190.  
  191. //========== GRF partition ==========
  192.      // r0 header            :   r0          (1 GRF)
  193.      // Static parameters    :   r1 - r6     (6 GRFS)
  194.      // Inline parameters    :   r7 - r8     (2 GRFs)
  195.      // MSGSRC               :   r27         (1 GRF)
  196. //===================================
  197.  
  198. //Interface:
  199. //========== Static Parameters (Explicit To Fast Composite) ==========
  200. //r1
  201. //CSC Set 0
  202.  
  203.  
  204. .declare udCSC_CURBE    Base=r1.0      ElementSize=4       Type=ud
  205.  
  206. //Constant alpha
  207.  
  208.  
  209. //r2
  210.  
  211.  
  212. // Gen7 AVS WA
  213.  
  214.  
  215. // WiDi Definitions
  216.  
  217.  
  218. //Colorfill
  219.  
  220.  
  221.                                       // 0: 0-degree, 1: 90, 2: 180, 3: 270-degree, clockwise.     
  222.  
  223. .declare ubCOLOR_PIXEL_VAL      Base=r2.20      ElementSize=1       SrcRegion=<0;1,0>       DstRegion=<1>       Type=ub
  224.  
  225. //r3
  226. //Normalised Ratio of Horizontal step size with main video for all layers
  227.  
  228.  
  229.     //Normalised Ratio of Horizontal step size with main video for all layers becomes
  230.     //Normalised Horizontal step size for all layers in VP_Setup.asm
  231.  
  232.  
  233. //r4
  234. //Normalised Vertical step size for all layers
  235.  
  236.  
  237. //r5
  238. //Normalised Vertical Frame Origin for all layers
  239.  
  240.  
  241. //r6
  242. //Normalised Horizontal Frame Origin for all layers
  243.  
  244.  
  245. //========== Inline Parameters (Explicit To Fast Composite) ==========
  246.  
  247.  
  248. //Main video Step X
  249.  
  250.  
  251. //====================== Binding table (Explicit To Fast Composite)=========================================
  252.  
  253.  
  254. //Used by Interlaced Scaling Kernels
  255.  
  256.  
  257. //========== Sampler State Table Index (Explicit To Fast Composite)==========
  258. //Sampler Index for AVS/IEF messages
  259.  
  260.  
  261. //Sampler Index for SIMD16 sampler messages
  262.  
  263.  
  264. //=============================================================================
  265.  
  266. .declare fBUFFER_0      Base=r64.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  267. .declare fBUFFER_1      Base=r80.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  268. .declare fBUFFER_2      Base=r96.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  269. .declare fBUFFER_3      Base=r112.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  270. .declare fBUFFER_4      Base=r28.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  271. .declare fBUFFER_5      Base=r46.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=f
  272.  
  273. .declare udBUFFER_0     Base=r64.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  274. .declare udBUFFER_1     Base=r80.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  275. .declare udBUFFER_2     Base=r96.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  276. .declare udBUFFER_3     Base=r112.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  277. .declare udBUFFER_4     Base=r28.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  278. .declare udBUFFER_5     Base=r46.0       ElementSize=4       SrcRegion=<8;8,1>       DstRegion=<1>       Type=ud
  279.  
  280. .declare uwBUFFER_0     Base=r64.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  281. .declare uwBUFFER_1     Base=r80.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  282. .declare uwBUFFER_2     Base=r96.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  283. .declare uwBUFFER_3     Base=r112.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  284. .declare uwBUFFER_4     Base=r28.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  285. .declare uwBUFFER_5     Base=r46.0       ElementSize=2       SrcRegion=<16;16,1>     DstRegion=<1>       Type=uw
  286.  
  287. .declare ubBUFFER_0     Base=r64.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  288. .declare ubBUFFER_1     Base=r80.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  289. .declare ubBUFFER_2     Base=r96.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  290. .declare ubBUFFER_3     Base=r112.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  291. .declare ubBUFFER_4     Base=r28.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  292. .declare ubBUFFER_5     Base=r46.0       ElementSize=1       SrcRegion=<16;16,1>     DstRegion=<1>       Type=ub
  293.  
  294. .declare ub4BUFFER_0    Base=r64.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  295. .declare ub4BUFFER_1    Base=r80.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  296. .declare ub4BUFFER_2    Base=r96.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  297. .declare ub4BUFFER_3    Base=r112.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  298. .declare ub4BUFFER_4    Base=r28.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  299. .declare ub4BUFFER_5    Base=r46.0       ElementSize=1       SrcRegion=<32;8,4>      DstRegion=<4>       Type=ub
  300.  
  301. //Pointer to mask reg
  302.  
  303.  
  304. //r18
  305.  
  306.  
  307. //Always keep Cannel Pointers and Offsets in same GRF, so that we can use
  308. // NODDCLR, NODDCHK flags. -rT
  309.  
  310.  
  311. .declare udCSC_COEFF_0  Base=r18.0    ElementSize=4 Type=ud       // 1 GRF
  312.  
  313. //r19
  314.  
  315.  
  316. .declare udCSC_COEFF_1  Base=r19.0    ElementSize=4 Type=ud       // 1 GRF
  317.  
  318.  
  319. //r20
  320.  
  321. .declare uwALPHA_MASK_REG_TEMP  Base=r20.0    ElementSize=2 SrcRegion=<16;16,1> Type=uw        // 1 GRF
  322.  
  323. //r21
  324.  
  325. .declare uwALPHA_MASK_REG       Base=r21.0         ElementSize=2 SrcRegion=<16;16,1> Type=uw        // 1 GRF
  326.  
  327. //r22
  328.  
  329.  
  330. //Always keep Cannel Pointers and Offsets in same GRF, so that we can use
  331. // NODDCLR, NODDCHK flags. -rT
  332.  
  333.  
  334. //Keep fORIGIN_X_NLAS, fY_OFFSET_2ND_BLOCK, fSTEP_X_NLAS, pMSGDSC_COPY, ubCONST_ALPHA_COPY as
  335. //sub registers of same GRF to enable using NODDCLR NODDCHK. -rT
  336.  
  337. //r23
  338.  
  339.  
  340. //Lumakey
  341.  
  342.  
  343. //r24
  344.  
  345.  
  346. //r25
  347.  
  348.  
  349. //r26
  350.  
  351.  
  352. //defines to generate LABELS during compile time.
  353.  
  354.  
  355. //Msg payload buffers; upto 4 full-size messages can be written
  356.  
  357.  
  358. .declare    mudMSGPAYLOAD0  Base=r29.0 ElementSize=4 SrcRegion=<8;8,1> Type=ud
  359. .declare    mudMSGPAYLOAD1  Base=r38.0 ElementSize=4 SrcRegion=<8;8,1> Type=ud
  360. .declare    mudMSGPAYLOAD2  Base=r47.0 ElementSize=4 SrcRegion=<8;8,1> Type=ud
  361. .declare    mudMSGPAYLOAD3  Base=r56.0 ElementSize=4 SrcRegion=<8;8,1> Type=ud
  362.  
  363. .declare    muwMSGPAYLOAD0  Base=r29.0 ElementSize=2 SrcRegion=<16;16,1> Type=uw
  364. .declare    muwMSGPAYLOAD1  Base=r38.0 ElementSize=2 SrcRegion=<16;16,1> Type=uw
  365. .declare    muwMSGPAYLOAD2  Base=r47.0 ElementSize=2 SrcRegion=<16;16,1> Type=uw
  366. .declare    muwMSGPAYLOAD3  Base=r56.0 ElementSize=2 SrcRegion=<16;16,1> Type=uw
  367.  
  368. .declare    mubMSGPAYLOAD0  Base=r29.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  369. .declare    mubMSGPAYLOAD1  Base=r38.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  370. .declare    mubMSGPAYLOAD2  Base=r47.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  371. .declare    mubMSGPAYLOAD3  Base=r56.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  372. .declare    mubMSGPAYLOAD4  Base=r32.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  373. .declare    mubMSGPAYLOAD5  Base=r41.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  374. .declare    mubMSGPAYLOAD6  Base=r50.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  375. .declare    mubMSGPAYLOAD7  Base=r59.0 ElementSize=1 SrcRegion=<16;16,1> Type=ub
  376.  
  377.  
  378.         // the r17 register (nTEMP0) is originally defined from "Common.inc"
  379.         // instead of re-defining a nTEMP0 here, we use "SAVE_RGB" suffix for its naming
  380.  
  381.         .declare uwTemp0 Base=r17.0 ElementSize=2 Type=uw
  382.  
  383.  
  384. //_SAVE_INC_
  385.  
  386.  
  387. // At the save module we have all 8 address sub-registers available.
  388. // So we will use PING-PONG type of scheme to save the data using
  389. // pointers pBUF_CHNL_TOP_8x4 and pBUF_CHNL_BOT_8x4. This will help
  390. // reduce dependency. - rT
  391.  
  392.     //Internal LAYOUT:(RRGGBBAA)
  393.         //Assign buffer channel order for Buffer 0123 in the order RGBA a0.3>A, a0.2>B, a0.1>G, a0.0>R
  394.         // R = 0, G= 4, B = 8, A = 12.
  395.         mov (4) acc0.0<1>:w                 0x62EA:v
  396.         add (4) acc0.0<1>:w                 acc0<4;4,1>:w       70:uw
  397.         shl (4) r22.0<1>:w       acc0<4;4,1>:w       5:uw
  398.  
  399.                         // if channel swap?
  400.                         // This means that it should be BGRA(B is the LSB) or RGBA
  401.                         // the internal format is always RGBA(MSB-A-B-G-R).
  402.                         and.nz.f0.0     null<1>:w       r2.3<0;1,0>:uw 0x01:w
  403.  
  404. //wBUFF_CHNL_PTR points to either buffer 0 or buffer 4.
  405. //Add appropriate offsets to get pointers for all buffers (1,2,3 or 5).
  406. //Offsets are zero for buffer 0 and buffer 4.
  407.         add   (4)   a0.0<1>:uw   r22.0<4;4,1>:w          0:uw
  408.  
  409.         // pointer swap
  410.         (f0.0)  mov (1) uwTemp0<1> a0.0<0;1,0>:uw
  411.         (f0.0)  mov (1) a0.0<1>:uw a0.2<0;1,0>:uw
  412.         (f0.0)  mov (1) a0.2<1>:uw uwTemp0<0;1,0>
  413.  
  414.     shl (1) r27.0<1>:d      r7.0<0;1,0>:w            2:w                        { NoDDClr }       // H. block origin need to be quadrupled
  415.     mov (1) r27.1<1>:d      r7.1<0;1,0>:w                                       { NoDDClr, NoDDChk }    // Block origin (1st quadrant)
  416.     mov (1) r27.2<1>:ud     0x3001F:ud          { NoDDChk }       // Block width and height (32x4)
  417.  
  418.     mov (4)   a0.4<1>:uw   a0.0<4;4,1>:uw        
  419.  
  420.     mov (8) r28<1>:ud      r27<8;8,1>:ud
  421.     mov (8) r37<1>:ud      r27<8;8,1>:ud
  422.     mov (8) r46<1>:ud      r27<8;8,1>:ud
  423.     mov (8) r55<1>:ud      r27<8;8,1>:ud
  424.  
  425.     mov (8) r31<1>:ud           r27<8;8,1>:ud
  426.         mov (8) r40<1>:ud               r27<8;8,1>:ud
  427.         mov (8) r49<1>:ud               r27<8;8,1>:ud
  428.         mov (8) r58<1>:ud               r27<8;8,1>:ud
  429.  
  430. //Buffer 0/1 are written by using 4 32x4.
  431.  
  432.         add (1) r37.0<1>:d     r27.0<0;1,0>:d        32:d  
  433.  
  434.         add (1) r46.1<1>:d     r27.1<0;1,0>:d        4:d  
  435.  
  436.         add (1) r55.1<1>:d     r27.1<0;1,0>:d        4:d  
  437.         add (1) r55.0<1>:d     r27.0<0;1,0>:d        32:d  
  438.  
  439.     // write Buf_0 to 1st quarter of four horizontal output blocks
  440.  
  441. // Please note the scattered order of NODDCLR, NODDCHK flags. Since the sub-registers
  442. // of destination reg are not updated at one place and hence even flags are scattered. -rT
  443.  
  444. /* for block 0 the left part of buffer 0 and 1 */
  445.     mov (8)    mubMSGPAYLOAD0(0,   0)<4>  r[a0.0,   1]<16;8,2>:ub
  446.     mov (8)    mubMSGPAYLOAD0(0,   1)<4>  r[a0.1,   1]<16;8,2>:ub
  447.     mov (8)    mubMSGPAYLOAD0(0,   2)<4>  r[a0.2,   1]<16;8,2>:ub
  448.     mov (8)    mubMSGPAYLOAD0(0,   3)<4>  r2.31:ub             
  449.  
  450.     mov (8)    mubMSGPAYLOAD0(1,   0)<4>  r[a0.0,   33]<16;8,2>:ub
  451.     mov (8)    mubMSGPAYLOAD0(1,   1)<4>  r[a0.1,   33]<16;8,2>:ub
  452.     mov (8)    mubMSGPAYLOAD0(1,   2)<4>  r[a0.2,   33]<16;8,2>:ub
  453.     mov (8)    mubMSGPAYLOAD0(1,   3)<4>  r2.31:ub             
  454.  
  455.     mov (8)    mubMSGPAYLOAD1(0,   0)<4>  r[a0.0,   17]<16;8,2>:ub
  456.     mov (8)    mubMSGPAYLOAD1(0,   1)<4>  r[a0.1,   17]<16;8,2>:ub
  457.     mov (8)    mubMSGPAYLOAD1(0,   2)<4>  r[a0.2,   17]<16;8,2>:ub
  458.     mov (8)    mubMSGPAYLOAD1(0,   3)<4>  r2.31:ub                             
  459.  
  460.     mov (8)    mubMSGPAYLOAD1(1,   0)<4>  r[a0.0,   49]<16;8,2>:ub
  461.     mov (8)    mubMSGPAYLOAD1(1,   1)<4>  r[a0.1,   49]<16;8,2>:ub
  462.     mov (8)    mubMSGPAYLOAD1(1,   2)<4>  r[a0.2,   49]<16;8,2>:ub
  463.     mov (8)    mubMSGPAYLOAD1(1,   3)<4>  r2.31:ub                                     
  464.  
  465.     mov (8)    mubMSGPAYLOAD0(2,   0)<4>  r[a0.0,   65]<16;8,2>:ub
  466.     mov (8)    mubMSGPAYLOAD0(2,   1)<4>  r[a0.1,   65]<16;8,2>:ub
  467.     mov (8)    mubMSGPAYLOAD0(2,   2)<4>  r[a0.2,   65]<16;8,2>:ub
  468.     mov (8)    mubMSGPAYLOAD0(2,   3)<4>  r2.31:ub                             
  469.  
  470.     mov (8)    mubMSGPAYLOAD0(3,   0)<4>  r[a0.0,   97]<16;8,2>:ub     
  471.     mov (8)    mubMSGPAYLOAD0(3,   1)<4>  r[a0.1,   97]<16;8,2>:ub
  472.     mov (8)    mubMSGPAYLOAD0(3,   2)<4>  r[a0.2,   97]<16;8,2>:ub
  473.     mov (8)    mubMSGPAYLOAD0(3,   3)<4>  r2.31:ub                             
  474.  
  475.     mov (8)    mubMSGPAYLOAD1(2,   0)<4>  r[a0.0,   81]<16;8,2>:ub     
  476.     mov (8)    mubMSGPAYLOAD1(2,   1)<4>  r[a0.1,   81]<16;8,2>:ub
  477.     mov (8)    mubMSGPAYLOAD1(2,   2)<4>  r[a0.2,   81]<16;8,2>:ub
  478.     mov (8)    mubMSGPAYLOAD1(2,   3)<4>  r2.31:ub                             
  479.  
  480.     mov (8)    mubMSGPAYLOAD1(3,   0)<4>  r[a0.0,   113]<16;8,2>:ub
  481.     mov (8)    mubMSGPAYLOAD1(3,   1)<4>  r[a0.1,   113]<16;8,2>:ub
  482.     mov (8)    mubMSGPAYLOAD1(3,   2)<4>  r[a0.2,   113]<16;8,2>:ub
  483.     mov (8)    mubMSGPAYLOAD1(3,   3)<4>  r2.31:ub
  484.  
  485. /* For Buffer 0 */
  486.     send (16)    null<1>:d    r28       0xc                     0x0A0A8018:ud
  487.     send (16)    null<1>:d    r37       0xc                     0x0A0A8018:ud
  488.  
  489.     add (4)    a0.0<1>:uw       a0.4<4;4,1>:uw          512:uw
  490.     mov (8)    mubMSGPAYLOAD2(0,   0)<4>  r[a0.0,   1]<16;8,2>:ub
  491.     mov (8)    mubMSGPAYLOAD2(0,   1)<4>  r[a0.1,   1]<16;8,2>:ub
  492.     mov (8)    mubMSGPAYLOAD2(0,   2)<4>  r[a0.2,   1]<16;8,2>:ub
  493.     mov (8)    mubMSGPAYLOAD2(0,   3)<4>  r2.31:ub                             
  494.  
  495.     mov (8)    mubMSGPAYLOAD2(1,   0)<4>  r[a0.0,   33]<16;8,2>:ub
  496.     mov (8)    mubMSGPAYLOAD2(1,   1)<4>  r[a0.1,   33]<16;8,2>:ub
  497.     mov (8)    mubMSGPAYLOAD2(1,   2)<4>  r[a0.2,   33]<16;8,2>:ub
  498.     mov (8)    mubMSGPAYLOAD2(1,   3)<4>  r2.31:ub     
  499.  
  500.     mov (8)    mubMSGPAYLOAD3(0,   0)<4>  r[a0.0,   17]<16;8,2>:ub
  501.     mov (8)    mubMSGPAYLOAD3(0,   1)<4>  r[a0.1,   17]<16;8,2>:ub
  502.     mov (8)    mubMSGPAYLOAD3(0,   2)<4>  r[a0.2,   17]<16;8,2>:ub
  503.     mov (8)    mubMSGPAYLOAD3(0,   3)<4>  r2.31:ub                             
  504.  
  505.     mov (8)    mubMSGPAYLOAD3(1,   0)<4>  r[a0.0,   49]<16;8,2>:ub
  506.     mov (8)    mubMSGPAYLOAD3(1,   1)<4>  r[a0.1,   49]<16;8,2>:ub
  507.     mov (8)    mubMSGPAYLOAD3(1,   2)<4>  r[a0.2,   49]<16;8,2>:ub
  508.     mov (8)    mubMSGPAYLOAD3(1,   3)<4>  r2.31:ub                             
  509.  
  510.     mov (8)    mubMSGPAYLOAD2(2,   0)<4>  r[a0.0,   65]<16;8,2>:ub
  511.     mov (8)    mubMSGPAYLOAD2(2,   1)<4>  r[a0.1,   65]<16;8,2>:ub
  512.     mov (8)    mubMSGPAYLOAD2(2,   2)<4>  r[a0.2,   65]<16;8,2>:ub
  513.     mov (8)    mubMSGPAYLOAD2(2,   3)<4>  r2.31:ub
  514.  
  515.     mov (8)    mubMSGPAYLOAD2(3,   0)<4>  r[a0.0,   97]<16;8,2>:ub
  516.     mov (8)    mubMSGPAYLOAD2(3,   1)<4>  r[a0.1,   97]<16;8,2>:ub
  517.     mov (8)    mubMSGPAYLOAD2(3,   2)<4>  r[a0.2,   97]<16;8,2>:ub
  518.     mov (8)    mubMSGPAYLOAD2(3,   3)<4>  r2.31:ub                             
  519.  
  520.     mov (8)    mubMSGPAYLOAD3(2,   0)<4>  r[a0.0,   81]<16;8,2>:ub
  521.     mov (8)    mubMSGPAYLOAD3(2,   1)<4>  r[a0.1,   81]<16;8,2>:ub
  522.     mov (8)    mubMSGPAYLOAD3(2,   2)<4>  r[a0.2,   81]<16;8,2>:ub
  523.     mov (8)    mubMSGPAYLOAD3(2,   3)<4>  r2.31:ub                             
  524.  
  525.     mov (8)    mubMSGPAYLOAD3(3,   0)<4>  r[a0.0,   113]<16;8,2>:ub
  526.     mov (8)    mubMSGPAYLOAD3(3,   1)<4>  r[a0.1,   113]<16;8,2>:ub
  527.     mov (8)    mubMSGPAYLOAD3(3,   2)<4>  r[a0.2,   113]<16;8,2>:ub
  528.     mov (8)    mubMSGPAYLOAD3(3,   3)<4>  r2.31:ub                             
  529.     // send Buffer 1
  530.     send (16)    null<1>:d    r46       0xc                     0x0A0A8018:ud
  531.     send (16)    null<1>:d    r55       0xc                     0x0A0A8018:ud
  532.  
  533.  
  534. /* for Buffer 2/3 */
  535.     mov (8) r28<1>:ud      r27<8;8,1>:ud
  536.     mov (8) r37<1>:ud      r27<8;8,1>:ud
  537.     mov (8) r46<1>:ud      r27<8;8,1>:ud
  538.     mov (8) r55<1>:ud      r27<8;8,1>:ud
  539.  
  540.         add (1) r28.1<1>:d      r27.1<0;1,0>:d          8:d
  541.  
  542.         add (1) r37.0<1>:d     r27.0<0;1,0>:d        32:d  
  543.         add (1) r37.1<1>:d     r27.1<0;1,0>:d        8:d  
  544.  
  545.         add (1) r46.1<1>:d     r27.1<0;1,0>:d        12:d  
  546.  
  547.         add (1) r55.1<1>:d     r27.1<0;1,0>:d        12:d  
  548.         add (1) r55.0<1>:d     r27.0<0;1,0>:d        32:d  
  549.  
  550.     add (4)    a0.0<1>:uw       a0.4<4;4,1>:uw          1024:uw
  551.  
  552.     mov (8)    mubMSGPAYLOAD0(0,   0)<4>  r[a0.0,   1]<16;8,2>:ub
  553.     mov (8)    mubMSGPAYLOAD0(0,   1)<4>  r[a0.1,   1]<16;8,2>:ub
  554.     mov (8)    mubMSGPAYLOAD0(0,   2)<4>  r[a0.2,   1]<16;8,2>:ub
  555.     mov (8)    mubMSGPAYLOAD0(0,   3)<4>  r2.31:ub             
  556.  
  557.     mov (8)    mubMSGPAYLOAD0(1,   0)<4>  r[a0.0,   33]<16;8,2>:ub
  558.     mov (8)    mubMSGPAYLOAD0(1,   1)<4>  r[a0.1,   33]<16;8,2>:ub
  559.     mov (8)    mubMSGPAYLOAD0(1,   2)<4>  r[a0.2,   33]<16;8,2>:ub
  560.     mov (8)    mubMSGPAYLOAD0(1,   3)<4>  r2.31:ub             
  561.  
  562.     mov (8)    mubMSGPAYLOAD1(0,   0)<4>  r[a0.0,   17]<16;8,2>:ub
  563.     mov (8)    mubMSGPAYLOAD1(0,   1)<4>  r[a0.1,   17]<16;8,2>:ub
  564.     mov (8)    mubMSGPAYLOAD1(0,   2)<4>  r[a0.2,   17]<16;8,2>:ub
  565.     mov (8)    mubMSGPAYLOAD1(0,   3)<4>  r2.31:ub                             
  566.  
  567.     mov (8)    mubMSGPAYLOAD1(1,   0)<4>  r[a0.0,   49]<16;8,2>:ub
  568.     mov (8)    mubMSGPAYLOAD1(1,   1)<4>  r[a0.1,   49]<16;8,2>:ub
  569.     mov (8)    mubMSGPAYLOAD1(1,   2)<4>  r[a0.2,   49]<16;8,2>:ub
  570.     mov (8)    mubMSGPAYLOAD1(1,   3)<4>  r2.31:ub                                     
  571.  
  572.     mov (8)    mubMSGPAYLOAD0(2,   0)<4>  r[a0.0,   65]<16;8,2>:ub
  573.     mov (8)    mubMSGPAYLOAD0(2,   1)<4>  r[a0.1,   65]<16;8,2>:ub
  574.     mov (8)    mubMSGPAYLOAD0(2,   2)<4>  r[a0.2,   65]<16;8,2>:ub
  575.     mov (8)    mubMSGPAYLOAD0(2,   3)<4>  r2.31:ub                             
  576.  
  577.     mov (8)    mubMSGPAYLOAD0(3,   0)<4>  r[a0.0,   97]<16;8,2>:ub     
  578.     mov (8)    mubMSGPAYLOAD0(3,   1)<4>  r[a0.1,   97]<16;8,2>:ub
  579.     mov (8)    mubMSGPAYLOAD0(3,   2)<4>  r[a0.2,   97]<16;8,2>:ub
  580.     mov (8)    mubMSGPAYLOAD0(3,   3)<4>  r2.31:ub                             
  581.  
  582.     mov (8)    mubMSGPAYLOAD1(2,   0)<4>  r[a0.0,   81]<16;8,2>:ub     
  583.     mov (8)    mubMSGPAYLOAD1(2,   1)<4>  r[a0.1,   81]<16;8,2>:ub
  584.     mov (8)    mubMSGPAYLOAD1(2,   2)<4>  r[a0.2,   81]<16;8,2>:ub
  585.     mov (8)    mubMSGPAYLOAD1(2,   3)<4>  r2.31:ub                             
  586.  
  587.     mov (8)    mubMSGPAYLOAD1(3,   0)<4>  r[a0.0,   113]<16;8,2>:ub
  588.     mov (8)    mubMSGPAYLOAD1(3,   1)<4>  r[a0.1,   113]<16;8,2>:ub
  589.     mov (8)    mubMSGPAYLOAD1(3,   2)<4>  r[a0.2,   113]<16;8,2>:ub
  590.     mov (8)    mubMSGPAYLOAD1(3,   3)<4>  r2.31:ub
  591.  
  592. // Send Buffer 2
  593.     send (16)    null<1>:d    r28       0xc                     0x0A0A8018:ud
  594.     send (16)    null<1>:d    r37       0xc                     0x0A0A8018:ud
  595.  
  596.     add (4)    a0.0<1>:uw       a0.4<4;4,1>:uw          1536:uw
  597.     mov (8)    mubMSGPAYLOAD2(0,   0)<4>  r[a0.0,   1]<16;8,2>:ub
  598.     mov (8)    mubMSGPAYLOAD2(0,   1)<4>  r[a0.1,   1]<16;8,2>:ub
  599.     mov (8)    mubMSGPAYLOAD2(0,   2)<4>  r[a0.2,   1]<16;8,2>:ub
  600.     mov (8)    mubMSGPAYLOAD2(0,   3)<4>  r2.31:ub                             
  601.  
  602.     mov (8)    mubMSGPAYLOAD2(1,   0)<4>  r[a0.0,   33]<16;8,2>:ub
  603.     mov (8)    mubMSGPAYLOAD2(1,   1)<4>  r[a0.1,   33]<16;8,2>:ub
  604.     mov (8)    mubMSGPAYLOAD2(1,   2)<4>  r[a0.2,   33]<16;8,2>:ub
  605.     mov (8)    mubMSGPAYLOAD2(1,   3)<4>  r2.31:ub     
  606.  
  607.     mov (8)    mubMSGPAYLOAD3(0,   0)<4>  r[a0.0,   17]<16;8,2>:ub
  608.     mov (8)    mubMSGPAYLOAD3(0,   1)<4>  r[a0.1,   17]<16;8,2>:ub
  609.     mov (8)    mubMSGPAYLOAD3(0,   2)<4>  r[a0.2,   17]<16;8,2>:ub
  610.     mov (8)    mubMSGPAYLOAD3(0,   3)<4>  r2.31:ub                             
  611.  
  612.     mov (8)    mubMSGPAYLOAD3(1,   0)<4>  r[a0.0,   49]<16;8,2>:ub
  613.     mov (8)    mubMSGPAYLOAD3(1,   1)<4>  r[a0.1,   49]<16;8,2>:ub
  614.     mov (8)    mubMSGPAYLOAD3(1,   2)<4>  r[a0.2,   49]<16;8,2>:ub
  615.     mov (8)    mubMSGPAYLOAD3(1,   3)<4>  r2.31:ub                             
  616.  
  617.     mov (8)    mubMSGPAYLOAD2(2,   0)<4>  r[a0.0,   65]<16;8,2>:ub
  618.     mov (8)    mubMSGPAYLOAD2(2,   1)<4>  r[a0.1,   65]<16;8,2>:ub
  619.     mov (8)    mubMSGPAYLOAD2(2,   2)<4>  r[a0.2,   65]<16;8,2>:ub
  620.     mov (8)    mubMSGPAYLOAD2(2,   3)<4>  r2.31:ub
  621.  
  622.     mov (8)    mubMSGPAYLOAD2(3,   0)<4>  r[a0.0,   97]<16;8,2>:ub
  623.     mov (8)    mubMSGPAYLOAD2(3,   1)<4>  r[a0.1,   97]<16;8,2>:ub
  624.     mov (8)    mubMSGPAYLOAD2(3,   2)<4>  r[a0.2,   97]<16;8,2>:ub
  625.     mov (8)    mubMSGPAYLOAD2(3,   3)<4>  r2.31:ub                             
  626.  
  627.     mov (8)    mubMSGPAYLOAD3(2,   0)<4>  r[a0.0,   81]<16;8,2>:ub
  628.     mov (8)    mubMSGPAYLOAD3(2,   1)<4>  r[a0.1,   81]<16;8,2>:ub
  629.     mov (8)    mubMSGPAYLOAD3(2,   2)<4>  r[a0.2,   81]<16;8,2>:ub
  630.     mov (8)    mubMSGPAYLOAD3(2,   3)<4>  r2.31:ub                             
  631.  
  632.     mov (8)    mubMSGPAYLOAD3(3,   0)<4>  r[a0.0,   113]<16;8,2>:ub
  633.     mov (8)    mubMSGPAYLOAD3(3,   1)<4>  r[a0.1,   113]<16;8,2>:ub
  634.     mov (8)    mubMSGPAYLOAD3(3,   2)<4>  r[a0.2,   113]<16;8,2>:ub
  635.     mov (8)    mubMSGPAYLOAD3(3,   3)<4>  r2.31:ub                             
  636.     // send buffer 3
  637.     send (16)    null<1>:d    r46       0xc                     0x0A0A8018:ud
  638.     send (16)    null<1>:d    r55       0xc                     0x0A0A8018:ud
  639.  
  640.  
  641.  
  642.