| 1 |
/* |
| 2 |
* Copyright © 2012 Intel Corporation |
| 3 |
* |
| 4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
* copy of this software and associated documentation files (the "Software"), |
| 6 |
* to deal in the Software without restriction, including without limitation |
| 7 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 9 |
* Software is furnished to do so, subject to the following conditions: |
| 10 |
* |
| 11 |
* The above copyright notice and this permission notice (including the next |
| 12 |
* paragraph) shall be included in all copies or substantial portions of the |
| 13 |
* Software. |
| 14 |
* |
| 15 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 21 |
* IN THE SOFTWARE. |
| 22 |
* |
| 23 |
* Authors: |
| 24 |
* Xiang Haihao <[email protected]> |
| 25 |
*/ |
| 26 |
|
| 27 |
/* |
| 28 |
* __START |
| 29 |
*/ |
| 30 |
__START: |
| 31 |
mov (16) tmp_reg0<1>:ud 0x0:ud {align1} ; |
| 32 |
mov (16) tmp_reg2<1>:ud 0x0:ud {align1} ; |
| 33 |
|
| 34 |
mov (1) tmp_slice_header.20<1>:ub thread_id_ub {align1}; /* dispatch id */ |
| 35 |
mov (1) tmp_slice_header.8<1>:ud head_offset<0,1,0>:ud {align1}; |
| 36 |
mov (1) tmp_mfc_batchbuffer.20<1>:ub thread_id_ub {align1}; /* dispatch id */ |
| 37 |
mov (1) tmp_mfc_batchbuffer.8<1>:ud batchbuffer_offset<0,1,0>:ud {align1}; |
| 38 |
|
| 39 |
__HEAD: |
| 40 |
and.z.f0.0 (1) null<1>:uw flags<0,1,0>:uw FLAG_MASK_FIRST_OBJECT {align1}; |
| 41 |
(f0.0)jmpi (1) __PAK_OBJECT ; |
| 42 |
|
| 43 |
__HEAD_LOOP: |
| 44 |
mov (8) msg_reg0.0<1>:ud tmp_slice_header<8,8,1>:ud {align1} ; |
| 45 |
|
| 46 |
send (16) |
| 47 |
msg_ind |
| 48 |
ob_read_wb |
| 49 |
null |
| 50 |
data_port( |
| 51 |
OB_CACHE_TYPE, |
| 52 |
OB_READ, |
| 53 |
OB_CONTROL_0, |
| 54 |
BIND_IDX_MFC_SLICE_HEADER, |
| 55 |
OB_WRITE_COMMIT_CATEGORY, |
| 56 |
OB_HEADER_PRESENT |
| 57 |
) |
| 58 |
mlen 1 |
| 59 |
rlen ob_read_wb_len_slice_header |
| 60 |
{align1}; |
| 61 |
|
| 62 |
mov (8) msg_reg0.0<1>:ud tmp_mfc_batchbuffer<8,8,1>:ud {align1} ; |
| 63 |
mov (8) msg_reg1.0<1>:ud ob_read_wb0<8,8,1>:ud {align1} ; |
| 64 |
|
| 65 |
send (16) |
| 66 |
msg_ind |
| 67 |
ob_write_wb |
| 68 |
null |
| 69 |
data_port( |
| 70 |
OB_CACHE_TYPE, |
| 71 |
OB_WRITE, |
| 72 |
OB_CONTROL_0, |
| 73 |
BIND_IDX_MFC_BATCHBUFFER, |
| 74 |
OB_WRITE_COMMIT_CATEGORY, |
| 75 |
OB_HEADER_PRESENT |
| 76 |
) |
| 77 |
mlen 2 |
| 78 |
rlen ob_write_wb_length |
| 79 |
{align1}; |
| 80 |
|
| 81 |
/* the new offset */ |
| 82 |
add (1) tmp_slice_header.8<1>:ud tmp_slice_header.8<0,1,0>:ud 1:ud {align1} ; |
| 83 |
add (1) tmp_mfc_batchbuffer.8<1>:ud tmp_mfc_batchbuffer.8<0,1,0>:ud 1:ud {align1} ; |
| 84 |
|
| 85 |
add.z.f0.0 (1) head_size<1>:w head_size<0,1,0>:w -1:w {align1}; |
| 86 |
(-f0.0)jmpi (1) __HEAD_LOOP ; |
| 87 |
|