2 * Copyright © <2010>, Intel Corporation.
\r
4 * This program is licensed under the terms and conditions of the
\r
5 * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at
\r
6 * http://www.opensource.org/licenses/eclipse-1.0.php.
\r
9 // Module name: save_Top_Y_16x4.asm
\r
11 // Save a Y 16x4 block
\r
13 //----------------------------------------------------------------
\r
14 // Symbols need to be defined before including this module
\r
16 // Source region in :ud
\r
17 // SRC_YD: SRC_YD Base=rxx ElementSize=4 SrcRegion=REGION(8,1) Type=ud // 2 GRFs
\r
19 // Binding table index:
\r
20 // BI_DEST_Y: Binding table index of Y surface
\r
22 //----------------------------------------------------------------
\r
24 #if defined(_DEBUG)
\r
25 mov (1) EntrySignatureC:w 0xDDD5:w
\r
28 and.z.f0.1 (16) NULLREGW DualFieldMode<0;1,0>:w 1:w
\r
30 // FieldModeCurrentMbFlag determines how to access above MB
\r
31 and.z.f0.0 (1) null:w r[ECM_AddrReg, BitFlags]:ub FieldModeCurrentMbFlag:w
\r
33 mov (2) MSGSRC.0<1>:ud ORIX_TOP<2;2,1>:w { NoDDClr } // Block origin
\r
34 mov (1) MSGSRC.2<1>:ud 0x0003000F:ud { NoDDChk } // Block width and height (16x4)
\r
38 (f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(0) // Compressed inst
\r
39 (-f0.1) mov (16) MSGPAYLOADD(0)<1> PREV_MB_YD(2) // for dual field mode, write last 4 rows
\r
41 // Set message descriptor
\r
43 and.nz.f0.1 (1) NULLREGW BitFields:w BotFieldFlag:w
\r
45 (f0.0) if (1) ELSE_Y_16x4_SAVE
\r
48 mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y
\r
50 // Add vertical offset 16 for bot MB in MBAFF mode
\r
51 (f0.1) add (1) MSGSRC.1:d MSGSRC.1:d 16:w
\r
54 else (1) ENDIF_Y_16x4_SAVE
\r
56 asr (1) MSGSRC.1:d ORIY_CUR:w 1:w // Reduce y by half in field access mode
\r
59 (f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCBF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y bottom field
\r
60 (-f0.1) mov (1) MSGDSC MSG_LEN(2)+DWBWMSGDSC_WC+ENMSGDSCTF+BI_DEST_Y:ud // Write 2 GRFs to DEST_Y top field
\r
62 add (1) MSGSRC.1:d MSGSRC.1:d -4:w // for last 4 rows of above MB
\r
67 send (8) WritebackResponse(0)<1> MSGHDR MSGSRC<8;8,1>:ud DAPWRITE MSGDSC
\r
69 // End of save_Top_Y_16x4.asm
\r