1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright 2010 Jerome Glisse <glisse@freedesktop.org> 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 7bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub 8bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom 9bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions: 10bf215546Sopenharmony_ci * 11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next 12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 13bf215546Sopenharmony_ci * Software. 14bf215546Sopenharmony_ci * 15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18bf215546Sopenharmony_ci * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 19bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 21bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 22bf215546Sopenharmony_ci * 23bf215546Sopenharmony_ci * Authors: 24bf215546Sopenharmony_ci * Jerome Glisse 25bf215546Sopenharmony_ci */ 26bf215546Sopenharmony_ci#ifndef R700_SQ_H 27bf215546Sopenharmony_ci#define R700_SQ_H 28bf215546Sopenharmony_ci 29bf215546Sopenharmony_ci#define P_SQ_CF_WORD0 30bf215546Sopenharmony_ci#define S_SQ_CF_WORD0_ADDR(x) (((unsigned)(x) & 0xFFFFFFFF) << 0) 31bf215546Sopenharmony_ci#define G_SQ_CF_WORD0_ADDR(x) (((x) >> 0) & 0xFFFFFFFF) 32bf215546Sopenharmony_ci#define C_SQ_CF_WORD0_ADDR 0x00000000 33bf215546Sopenharmony_ci#define P_SQ_CF_WORD1 34bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_POP_COUNT(x) (((unsigned)(x) & 0x7) << 0) 35bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_POP_COUNT(x) (((x) >> 0) & 0x7) 36bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_POP_COUNT 0xFFFFFFF8 37bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_CF_CONST(x) (((unsigned)(x) & 0x1F) << 3) 38bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_CF_CONST(x) (((x) >> 3) & 0x1F) 39bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_CF_CONST 0xFFFFFF07 40bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_COND(x) (((unsigned)(x) & 0x3) << 8) 41bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_COND(x) (((x) >> 8) & 0x3) 42bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_COND 0xFFFFFCFF 43bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_COUNT(x) (((unsigned)(x) & 0x7) << 10) 44bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_COUNT(x) (((x) >> 10) & 0x7) 45bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_COUNT 0xFFFFE3FF 46bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_CALL_COUNT(x) (((unsigned)(x) & 0x3F) << 13) 47bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_CALL_COUNT(x) (((x) >> 13) & 0x3F) 48bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_CALL_COUNT 0xFFF81FFF 49bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21) 50bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1) 51bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_END_OF_PROGRAM 0xFFDFFFFF 52bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22) 53bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1) 54bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF 55bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23) 56bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_CF_INST(x) (((x) >> 23) & 0x7F) 57bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_CF_INST 0xC07FFFFF 58bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 59bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 60bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 61bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 62bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 63bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_BARRIER 0x7FFFFFFF 64bf215546Sopenharmony_ci#define S_SQ_CF_WORD1_COUNT_3(x) (((unsigned)(x) & 0x1) << 19) 65bf215546Sopenharmony_ci#define G_SQ_CF_WORD1_COUNT_3(x) (((x) >> 19) & 0x1) 66bf215546Sopenharmony_ci#define C_SQ_CF_WORD1_COUNT_3 0xFFF7FFFF 67bf215546Sopenharmony_ci#define P_SQ_CF_ALU_WORD0 68bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD0_ADDR(x) (((unsigned)(x) & 0x3FFFFF) << 0) 69bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD0_ADDR(x) (((x) >> 0) & 0x3FFFFF) 70bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD0_ADDR 0xFFC00000 71bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((unsigned)(x) & 0xF) << 22) 72bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD0_KCACHE_BANK0(x) (((x) >> 22) & 0xF) 73bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD0_KCACHE_BANK0 0xFC3FFFFF 74bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((unsigned)(x) & 0xF) << 26) 75bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD0_KCACHE_BANK1(x) (((x) >> 26) & 0xF) 76bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD0_KCACHE_BANK1 0xC3FFFFFF 77bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((unsigned)(x) & 0x3) << 30) 78bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD0_KCACHE_MODE0(x) (((x) >> 30) & 0x3) 79bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD0_KCACHE_MODE0 0x3FFFFFFF 80bf215546Sopenharmony_ci#define P_SQ_CF_ALU_WORD1 81bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((unsigned)(x) & 0x3) << 0) 82bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_KCACHE_MODE1(x) (((x) >> 0) & 0x3) 83bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_KCACHE_MODE1 0xFFFFFFFC 84bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((unsigned)(x) & 0xFF) << 2) 85bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_KCACHE_ADDR0(x) (((x) >> 2) & 0xFF) 86bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_KCACHE_ADDR0 0xFFFFFC03 87bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((unsigned)(x) & 0xFF) << 10) 88bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_KCACHE_ADDR1(x) (((x) >> 10) & 0xFF) 89bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_KCACHE_ADDR1 0xFFFC03FF 90bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_COUNT(x) (((unsigned)(x) & 0x7F) << 18) 91bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_COUNT(x) (((x) >> 18) & 0x7F) 92bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_COUNT 0xFE03FFFF 93bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((unsigned)(x) & 0x1) << 25) 94bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_USES_WATERFALL(x) (((x) >> 25) & 0x1) 95bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_USES_WATERFALL 0xFDFFFFFF 96bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_CF_INST(x) (((unsigned)(x) & 0xF) << 26) 97bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_CF_INST(x) (((x) >> 26) & 0xF) 98bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_CF_INST 0xC3FFFFFF 99bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 100bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 101bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 102bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 103bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 104bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_BARRIER 0x7FFFFFFF 105bf215546Sopenharmony_ci#define S_SQ_CF_ALU_WORD1_ALT_CONST(x) (((unsigned)(x) & 0x1) << 25) 106bf215546Sopenharmony_ci#define G_SQ_CF_ALU_WORD1_ALT_CONST(x) (((x) >> 25) & 0x1) 107bf215546Sopenharmony_ci#define C_SQ_CF_ALU_WORD1_ALT_CONST 0xFDFFFFFF 108bf215546Sopenharmony_ci#define P_SQ_CF_ALLOC_EXPORT_WORD0 109bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((unsigned)(x) & 0x1FFF) << 0) 110bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE(x) (((x) >> 0) & 0x1FFF) 111bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_ARRAY_BASE 0xFFFFE000 112bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((unsigned)(x) & 0x3) << 13) 113bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_TYPE(x) (((x) >> 13) & 0x3) 114bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_TYPE 0xFFFF9FFF 115bf215546Sopenharmony_ci#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL 0x00000000 116bf215546Sopenharmony_ci#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_POS 0x00000001 117bf215546Sopenharmony_ci#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PARAM 0x00000002 118bf215546Sopenharmony_ci#define V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_SX 0x00000003 119bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((unsigned)(x) & 0x7F) << 15) 120bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(x) (((x) >> 15) & 0x7F) 121bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR 0xFFC07FFF 122bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((unsigned)(x) & 0x1) << 22) 123bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL(x) (((x) >> 22) & 0x1) 124bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_RW_REL 0xFFBFFFFF 125bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((unsigned)(x) & 0x7F) << 23) 126bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR(x) (((x) >> 23) & 0x7F) 127bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_INDEX_GPR 0xC07FFFFF 128bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((unsigned)(x) & 0x3) << 30) 129bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE(x) (((x) >> 30) & 0x3) 130bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD0_ELEM_SIZE 0x3FFFFFFF 131bf215546Sopenharmony_ci#define P_SQ_CF_ALLOC_EXPORT_WORD1 132bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((unsigned)(x) & 0xF) << 17) 133bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(x) (((x) >> 17) & 0xF) 134bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT 0xFFE1FFFF 135bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((unsigned)(x) & 0x1) << 21) 136bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(x) (((x) >> 21) & 0x1) 137bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM 0xFFDFFFFF 138bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((unsigned)(x) & 0x1) << 22) 139bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE(x) (((x) >> 22) & 0x1) 140bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_VALID_PIXEL_MODE 0xFFBFFFFF 141bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((unsigned)(x) & 0x7F) << 23) 142bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST(x) (((x) >> 23) & 0x7F) 143bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_CF_INST 0xC07FFFFF 144bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((unsigned)(x) & 0x1) << 30) 145bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE(x) (((x) >> 30) & 0x1) 146bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_WHOLE_QUAD_MODE 0xBFFFFFFF 147bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((unsigned)(x) & 0x1) << 31) 148bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER(x) (((x) >> 31) & 0x1) 149bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_BARRIER 0x7FFFFFFF 150bf215546Sopenharmony_ci#define P_SQ_CF_ALLOC_EXPORT_WORD1_BUF 151bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((unsigned)(x) & 0xFFF) << 0) 152bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE(x) (((x) >> 0) & 0xFFF) 153bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_ARRAY_SIZE 0xFFFFF000 154bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((unsigned)(x) & 0xF) << 12) 155bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK(x) (((x) >> 12) & 0xF) 156bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_BUF_COMP_MASK 0xFFFF0FFF 157bf215546Sopenharmony_ci#define P_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ 158bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((unsigned)(x) & 0x7) << 0) 159bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X(x) (((x) >> 0) & 0x7) 160bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_X 0xFFFFFFF8 161bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((unsigned)(x) & 0x7) << 3) 162bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y(x) (((x) >> 3) & 0x7) 163bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Y 0xFFFFFFC7 164bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((unsigned)(x) & 0x7) << 6) 165bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z(x) (((x) >> 6) & 0x7) 166bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_Z 0xFFFFFE3F 167bf215546Sopenharmony_ci#define S_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((unsigned)(x) & 0x7) << 9) 168bf215546Sopenharmony_ci#define G_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W(x) (((x) >> 9) & 0x7) 169bf215546Sopenharmony_ci#define C_SQ_CF_ALLOC_EXPORT_WORD1_SWIZ_SEL_W 0xFFFFF1FF 170bf215546Sopenharmony_ci#define P_SQ_ALU_WORD0 171bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC0_SEL(x) (((unsigned)(x) & 0x1FF) << 0) 172bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC0_SEL(x) (((x) >> 0) & 0x1FF) 173bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC0_SEL 0xFFFFFE00 174bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC0_REL(x) (((unsigned)(x) & 0x1) << 9) 175bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC0_REL(x) (((x) >> 9) & 0x1) 176bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC0_REL 0xFFFFFDFF 177bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC0_CHAN(x) (((unsigned)(x) & 0x3) << 10) 178bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC0_CHAN(x) (((x) >> 10) & 0x3) 179bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC0_CHAN 0xFFFFF3FF 180bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC0_NEG(x) (((unsigned)(x) & 0x1) << 12) 181bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC0_NEG(x) (((x) >> 12) & 0x1) 182bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC0_NEG 0xFFFFEFFF 183bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC1_SEL(x) (((unsigned)(x) & 0x1FF) << 13) 184bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC1_SEL(x) (((x) >> 13) & 0x1FF) 185bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC1_SEL 0xFFC01FFF 186bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC1_REL(x) (((unsigned)(x) & 0x1) << 22) 187bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC1_REL(x) (((x) >> 22) & 0x1) 188bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC1_REL 0xFFBFFFFF 189bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC1_CHAN(x) (((unsigned)(x) & 0x3) << 23) 190bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC1_CHAN(x) (((x) >> 23) & 0x3) 191bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC1_CHAN 0xFE7FFFFF 192bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_SRC1_NEG(x) (((unsigned)(x) & 0x1) << 25) 193bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_SRC1_NEG(x) (((x) >> 25) & 0x1) 194bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_SRC1_NEG 0xFDFFFFFF 195bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_INDEX_MODE(x) (((unsigned)(x) & 0x7) << 26) 196bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_INDEX_MODE(x) (((x) >> 26) & 0x7) 197bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_INDEX_MODE 0xE3FFFFFF 198bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_PRED_SEL(x) (((unsigned)(x) & 0x3) << 29) 199bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_PRED_SEL(x) (((x) >> 29) & 0x3) 200bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_PRED_SEL 0x9FFFFFFF 201bf215546Sopenharmony_ci#define S_SQ_ALU_WORD0_LAST(x) (((unsigned)(x) & 0x1) << 31) 202bf215546Sopenharmony_ci#define G_SQ_ALU_WORD0_LAST(x) (((x) >> 31) & 0x1) 203bf215546Sopenharmony_ci#define C_SQ_ALU_WORD0_LAST 0x7FFFFFFF 204bf215546Sopenharmony_ci#define P_SQ_ALU_WORD1 205bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_ENCODING(x) (((unsigned)(x) & 0x7) << 15) 206bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_ENCODING(x) (((x) >> 15) & 0x7) 207bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_ENCODING 0xFFFC7FFF 208bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((unsigned)(x) & 0x7) << 18) 209bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_BANK_SWIZZLE(x) (((x) >> 18) & 0x7) 210bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_BANK_SWIZZLE 0xFFE3FFFF 211bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 21) 212bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_DST_GPR(x) (((x) >> 21) & 0x7F) 213bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_DST_GPR 0xF01FFFFF 214bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 28) 215bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_DST_REL(x) (((x) >> 28) & 0x1) 216bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_DST_REL 0xEFFFFFFF 217bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_DST_CHAN(x) (((unsigned)(x) & 0x3) << 29) 218bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_DST_CHAN(x) (((x) >> 29) & 0x3) 219bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_DST_CHAN 0x9FFFFFFF 220bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_CLAMP(x) (((unsigned)(x) & 0x1) << 31) 221bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_CLAMP(x) (((x) >> 31) & 0x1) 222bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_CLAMP 0x7FFFFFFF 223bf215546Sopenharmony_ci#define P_SQ_ALU_WORD1_OP2 224bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((unsigned)(x) & 0x1) << 0) 225bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_SRC0_ABS(x) (((x) >> 0) & 0x1) 226bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_SRC0_ABS 0xFFFFFFFE 227bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((unsigned)(x) & 0x1) << 1) 228bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_SRC1_ABS(x) (((x) >> 1) & 0x1) 229bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_SRC1_ABS 0xFFFFFFFD 230bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((unsigned)(x) & 0x1) << 2) 231bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK(x) (((x) >> 2) & 0x1) 232bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_UPDATE_EXECUTE_MASK 0xFFFFFFFB 233bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((unsigned)(x) & 0x1) << 3) 234bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_UPDATE_PRED(x) (((x) >> 3) & 0x1) 235bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_UPDATE_PRED 0xFFFFFFF7 236bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((unsigned)(x) & 0x1) << 4) 237bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_WRITE_MASK(x) (((x) >> 4) & 0x1) 238bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_WRITE_MASK 0xFFFFFFEF 239bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_OMOD(x) (((unsigned)(x) & 0x3) << 5) 240bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_OMOD(x) (((x) >> 5) & 0x3) 241bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_OMOD 0xFFFFFF9F 242bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP2_ALU_INST(x) (((unsigned)(x) & 0x7FF) << 7) 243bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP2_ALU_INST(x) (((x) >> 7) & 0x7FF) 244bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP2_ALU_INST 0xFFFC007F 245bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD 0x00000000 246bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL 0x00000001 247bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MUL_IEEE 0x00000002 248bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX 0x00000003 249bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN 0x00000004 250bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_DX10 0x00000005 251bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_DX10 0x00000006 252bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE 0x00000008 253bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT 0x00000009 254bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE 0x0000000A 255bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE 0x0000000B 256bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_DX10 0x0000000C 257bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_DX10 0x0000000D 258bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_DX10 0x0000000E 259bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_DX10 0x0000000F 260bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FRACT 0x00000010 261bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC 0x00000011 262bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CEIL 0x00000012 263bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RNDNE 0x00000013 264bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLOOR 0x00000014 265bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA 0x00000015 266bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_FLOOR 0x00000016 267bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_INT 0x00000018 268bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOV 0x00000019 269bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP 0x0000001A 270bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_UINT 0x0000001E 271bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_UINT 0x0000001F 272bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE 0x00000020 273bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT 0x00000021 274bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE 0x00000022 275bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE 0x00000023 276bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_INV 0x00000024 277bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_POP 0x00000025 278bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_CLR 0x00000026 279bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SET_RESTORE 0x00000027 280bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH 0x00000028 281bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH 0x00000029 282bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH 0x0000002A 283bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH 0x0000002B 284bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE 0x0000002C 285bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT 0x0000002D 286bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE 0x0000002E 287bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE 0x0000002F 288bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_AND_INT 0x00000030 289bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_OR_INT 0x00000031 290bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_XOR_INT 0x00000032 291bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOT_INT 0x00000033 292bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT 0x00000034 293bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SUB_INT 0x00000035 294bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_INT 0x00000036 295bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_INT 0x00000037 296bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_UINT 0x00000038 297bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_UINT 0x00000039 298bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETE_INT 0x0000003A 299bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_INT 0x0000003B 300bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_INT 0x0000003C 301bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETNE_INT 0x0000003D 302bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_UINT 0x0000003E 303bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_UINT 0x0000003F 304bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_UINT 0x00000040 305bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_UINT 0x00000041 306bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT 0x00000042 307bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_INT 0x00000043 308bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_INT 0x00000044 309bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT 0x00000045 310bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLE_INT 0x00000046 311bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGT_INT 0x00000047 312bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLGE_INT 0x00000048 313bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_KILLNE_INT 0x00000049 314bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_PUSH_INT 0x0000004A 315bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGT_PUSH_INT 0x0000004B 316bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE_PUSH_INT 0x0000004C 317bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_PUSH_INT 0x0000004D 318bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLT_PUSH_INT 0x0000004E 319bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETLE_PUSH_INT 0x0000004F 320bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4 0x00000050 321bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE 0x00000051 322bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE 0x00000052 323bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX4 0x00000053 324bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MOVA_GPR_INT 0x00000060 325bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_EXP_IEEE 0x00000061 326bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_CLAMPED 0x00000062 327bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE 0x00000063 328bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED 0x00000064 329bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_FF 0x00000065 330bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE 0x00000066 331bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED 0x00000067 332bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_FF 0x00000068 333bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE 0x00000069 334bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SQRT_IEEE 0x0000006A 335bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT 0x0000006B 336bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_INT_TO_FLT 0x0000006C 337bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT 0x0000006D 338bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SIN 0x0000006E 339bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_COS 0x0000006F 340bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT 0x00000070 341bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHR_INT 0x00000071 342bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LSHL_INT 0x00000072 343bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_INT 0x00000073 344bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_INT 0x00000074 345bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULLO_UINT 0x00000075 346bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MULHI_UINT 0x00000076 347bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT 0x00000077 348bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT 0x00000078 349bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT 0x00000079 350bf215546Sopenharmony_ci#define P_SQ_ALU_WORD1_OP3 351bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((unsigned)(x) & 0x1FF) << 0) 352bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP3_SRC2_SEL(x) (((x) >> 0) & 0x1FF) 353bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP3_SRC2_SEL 0xFFFFFE00 354bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((unsigned)(x) & 0x1) << 9) 355bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP3_SRC2_REL(x) (((x) >> 9) & 0x1) 356bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP3_SRC2_REL 0xFFFFFDFF 357bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((unsigned)(x) & 0x3) << 10) 358bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP3_SRC2_CHAN(x) (((x) >> 10) & 0x3) 359bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP3_SRC2_CHAN 0xFFFFF3FF 360bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((unsigned)(x) & 0x1) << 12) 361bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP3_SRC2_NEG(x) (((x) >> 12) & 0x1) 362bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP3_SRC2_NEG 0xFFFFEFFF 363bf215546Sopenharmony_ci#define S_SQ_ALU_WORD1_OP3_ALU_INST(x) (((unsigned)(x) & 0x1F) << 13) 364bf215546Sopenharmony_ci#define G_SQ_ALU_WORD1_OP3_ALU_INST(x) (((x) >> 13) & 0x1F) 365bf215546Sopenharmony_ci#define C_SQ_ALU_WORD1_OP3_ALU_INST 0xFFFC1FFF 366bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT 0x0000000C 367bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M2 0x0000000D 368bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_M4 0x0000000E 369bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MUL_LIT_D2 0x0000000F 370bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD 0x00000010 371bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M2 0x00000011 372bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_M4 0x00000012 373bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_D2 0x00000013 374bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE 0x00000014 375bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_M2 0x00000015 376bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_M4 0x00000016 377bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_MULADD_IEEE_D2 0x00000017 378bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE 0x00000018 379bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT 0x00000019 380bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE 0x0000001A 381bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDE_INT 0x0000001C 382bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGT_INT 0x0000001D 383bf215546Sopenharmony_ci#define V_SQ_ALU_WORD1_OP3_SQ_OP3_INST_CNDGE_INT 0x0000001E 384bf215546Sopenharmony_ci#define P_SQ_VTX_WORD0 385bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_VTX_INST(x) (((unsigned)(x) & 0x1F) << 0) 386bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_VTX_INST(x) (((x) >> 0) & 0x1F) 387bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_VTX_INST 0xFFFFFFE0 388bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_FETCH_TYPE(x) (((unsigned)(x) & 0x3) << 5) 389bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_FETCH_TYPE(x) (((x) >> 5) & 0x3) 390bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_FETCH_TYPE 0xFFFFFF9F 391bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7) 392bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1) 393bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F 394bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_BUFFER_ID(x) (((unsigned)(x) & 0xFF) << 8) 395bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_BUFFER_ID(x) (((x) >> 8) & 0xFF) 396bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_BUFFER_ID 0xFFFF00FF 397bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16) 398bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F) 399bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_SRC_GPR 0xFF80FFFF 400bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23) 401bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1) 402bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_SRC_REL 0xFF7FFFFF 403bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_SRC_SEL_X(x) (((unsigned)(x) & 0x3) << 24) 404bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_SRC_SEL_X(x) (((x) >> 24) & 0x3) 405bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_SRC_SEL_X 0xFCFFFFFF 406bf215546Sopenharmony_ci#define S_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((unsigned)(x) & 0x3F) << 26) 407bf215546Sopenharmony_ci#define G_SQ_VTX_WORD0_MEGA_FETCH_COUNT(x) (((x) >> 26) & 0x3F) 408bf215546Sopenharmony_ci#define C_SQ_VTX_WORD0_MEGA_FETCH_COUNT 0x03FFFFFF 409bf215546Sopenharmony_ci#define P_SQ_VTX_WORD1 410bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9) 411bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7) 412bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_DST_SEL_X 0xFFFFF1FF 413bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12) 414bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7) 415bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_DST_SEL_Y 0xFFFF8FFF 416bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15) 417bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7) 418bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_DST_SEL_Z 0xFFFC7FFF 419bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18) 420bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7) 421bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_DST_SEL_W 0xFFE3FFFF 422bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((unsigned)(x) & 0x1) << 21) 423bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_USE_CONST_FIELDS(x) (((x) >> 21) & 0x1) 424bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_USE_CONST_FIELDS 0xFFDFFFFF 425bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_DATA_FORMAT(x) (((unsigned)(x) & 0x3F) << 22) 426bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_DATA_FORMAT(x) (((x) >> 22) & 0x3F) 427bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_DATA_FORMAT 0xF03FFFFF 428bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((unsigned)(x) & 0x3) << 28) 429bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_NUM_FORMAT_ALL(x) (((x) >> 28) & 0x3) 430bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_NUM_FORMAT_ALL 0xCFFFFFFF 431bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((unsigned)(x) & 0x1) << 30) 432bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_FORMAT_COMP_ALL(x) (((x) >> 30) & 0x1) 433bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_FORMAT_COMP_ALL 0xBFFFFFFF 434bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((unsigned)(x) & 0x1) << 31) 435bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_SRF_MODE_ALL(x) (((x) >> 31) & 0x1) 436bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_SRF_MODE_ALL 0x7FFFFFFF 437bf215546Sopenharmony_ci#define P_SQ_VTX_WORD1_GPR 438bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_GPR_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0) 439bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_GPR_DST_GPR(x) (((x) >> 0) & 0x7F) 440bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_GPR_DST_GPR 0xFFFFFF80 441bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_GPR_DST_REL(x) (((unsigned)(x) & 0x1) << 7) 442bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_GPR_DST_REL(x) (((x) >> 7) & 0x1) 443bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_GPR_DST_REL 0xFFFFFF7F 444bf215546Sopenharmony_ci#define P_SQ_VTX_WORD1_SEM 445bf215546Sopenharmony_ci#define S_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((unsigned)(x) & 0xFF) << 0) 446bf215546Sopenharmony_ci#define G_SQ_VTX_WORD1_SEM_SEMANTIC_ID(x) (((x) >> 0) & 0xFF) 447bf215546Sopenharmony_ci#define C_SQ_VTX_WORD1_SEM_SEMANTIC_ID 0xFFFFFF00 448bf215546Sopenharmony_ci#define P_SQ_VTX_WORD2 449bf215546Sopenharmony_ci#define S_SQ_VTX_WORD2_OFFSET(x) (((unsigned)(x) & 0xFFFF) << 0) 450bf215546Sopenharmony_ci#define G_SQ_VTX_WORD2_OFFSET(x) (((x) >> 0) & 0xFFFF) 451bf215546Sopenharmony_ci#define C_SQ_VTX_WORD2_OFFSET 0xFFFF0000 452bf215546Sopenharmony_ci#define S_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((unsigned)(x) & 0x3) << 16) 453bf215546Sopenharmony_ci#define G_SQ_VTX_WORD2_ENDIAN_SWAP(x) (((x) >> 16) & 0x3) 454bf215546Sopenharmony_ci#define C_SQ_VTX_WORD2_ENDIAN_SWAP 0xFFFCFFFF 455bf215546Sopenharmony_ci#define S_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((unsigned)(x) & 0x1) << 18) 456bf215546Sopenharmony_ci#define G_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE(x) (((x) >> 18) & 0x1) 457bf215546Sopenharmony_ci#define C_SQ_VTX_WORD2_CONST_BUF_NO_STRIDE 0xFFFBFFFF 458bf215546Sopenharmony_ci#define S_SQ_VTX_WORD2_MEGA_FETCH(x) (((unsigned)(x) & 0x1) << 19) 459bf215546Sopenharmony_ci#define G_SQ_VTX_WORD2_MEGA_FETCH(x) (((x) >> 19) & 0x1) 460bf215546Sopenharmony_ci#define C_SQ_VTX_WORD2_MEGA_FETCH 0xFFF7FFFF 461bf215546Sopenharmony_ci#define S_SQ_VTX_WORD2_ALT_CONST(x) (((unsigned)(x) & 0x1) << 20) 462bf215546Sopenharmony_ci#define G_SQ_VTX_WORD2_ALT_CONST(x) (((x) >> 20) & 0x1) 463bf215546Sopenharmony_ci#define C_SQ_VTX_WORD2_ALT_CONST 0xFFEFFFFF 464bf215546Sopenharmony_ci#define P_SQ_TEX_WORD0 465bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_TEX_INST(x) (((unsigned)(x) & 0x1F) << 0) 466bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_TEX_INST(x) (((x) >> 0) & 0x1F) 467bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_TEX_INST 0xFFFFFFE0 468bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((unsigned)(x) & 0x1) << 5) 469bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_BC_FRAC_MODE(x) (((x) >> 5) & 0x1) 470bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_BC_FRAC_MODE 0xFFFFFFDF 471bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((unsigned)(x) & 0x1) << 7) 472bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_FETCH_WHOLE_QUAD(x) (((x) >> 7) & 0x1) 473bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_FETCH_WHOLE_QUAD 0xFFFFFF7F 474bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_RESOURCE_ID(x) (((unsigned)(x) & 0xFF) << 8) 475bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_RESOURCE_ID(x) (((x) >> 8) & 0xFF) 476bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_RESOURCE_ID 0xFFFF00FF 477bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_SRC_GPR(x) (((unsigned)(x) & 0x7F) << 16) 478bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_SRC_GPR(x) (((x) >> 16) & 0x7F) 479bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_SRC_GPR 0xFF80FFFF 480bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_SRC_REL(x) (((unsigned)(x) & 0x1) << 23) 481bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_SRC_REL(x) (((x) >> 23) & 0x1) 482bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_SRC_REL 0xFF7FFFFF 483bf215546Sopenharmony_ci#define S_SQ_TEX_WORD0_ALT_CONST(x) (((unsigned)(x) & 0x1) << 24) 484bf215546Sopenharmony_ci#define G_SQ_TEX_WORD0_ALT_CONST(x) (((x) >> 24) & 0x1) 485bf215546Sopenharmony_ci#define C_SQ_TEX_WORD0_ALT_CONST 0xFEFFFFFF 486bf215546Sopenharmony_ci#define P_SQ_TEX_WORD1 487bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_GPR(x) (((unsigned)(x) & 0x7F) << 0) 488bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_GPR(x) (((x) >> 0) & 0x7F) 489bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_GPR 0xFFFFFF80 490bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_REL(x) (((unsigned)(x) & 0x1) << 7) 491bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_REL(x) (((x) >> 7) & 0x1) 492bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_REL 0xFFFFFF7F 493bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_SEL_X(x) (((unsigned)(x) & 0x7) << 9) 494bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_SEL_X(x) (((x) >> 9) & 0x7) 495bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_SEL_X 0xFFFFF1FF 496bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_SEL_Y(x) (((unsigned)(x) & 0x7) << 12) 497bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_SEL_Y(x) (((x) >> 12) & 0x7) 498bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_SEL_Y 0xFFFF8FFF 499bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_SEL_Z(x) (((unsigned)(x) & 0x7) << 15) 500bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_SEL_Z(x) (((x) >> 15) & 0x7) 501bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_SEL_Z 0xFFFC7FFF 502bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_DST_SEL_W(x) (((unsigned)(x) & 0x7) << 18) 503bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_DST_SEL_W(x) (((x) >> 18) & 0x7) 504bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_DST_SEL_W 0xFFE3FFFF 505bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_LOD_BIAS(x) (((unsigned)(x) & 0x7F) << 21) 506bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_LOD_BIAS(x) (((x) >> 21) & 0x7F) 507bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_LOD_BIAS 0xF01FFFFF 508bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_COORD_TYPE_X(x) (((unsigned)(x) & 0x1) << 28) 509bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_COORD_TYPE_X(x) (((x) >> 28) & 0x1) 510bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_COORD_TYPE_X 0xEFFFFFFF 511bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((unsigned)(x) & 0x1) << 29) 512bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_COORD_TYPE_Y(x) (((x) >> 29) & 0x1) 513bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_COORD_TYPE_Y 0xDFFFFFFF 514bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((unsigned)(x) & 0x1) << 30) 515bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_COORD_TYPE_Z(x) (((x) >> 30) & 0x1) 516bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_COORD_TYPE_Z 0xBFFFFFFF 517bf215546Sopenharmony_ci#define S_SQ_TEX_WORD1_COORD_TYPE_W(x) (((unsigned)(x) & 0x1) << 31) 518bf215546Sopenharmony_ci#define G_SQ_TEX_WORD1_COORD_TYPE_W(x) (((x) >> 31) & 0x1) 519bf215546Sopenharmony_ci#define C_SQ_TEX_WORD1_COORD_TYPE_W 0x7FFFFFFF 520bf215546Sopenharmony_ci#define P_SQ_TEX_WORD2 521bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_OFFSET_X(x) (((unsigned)(x) & 0x1F) << 0) 522bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_OFFSET_X(x) (((x) >> 0) & 0x1F) 523bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_OFFSET_X 0xFFFFFFE0 524bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_OFFSET_Y(x) (((unsigned)(x) & 0x1F) << 5) 525bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_OFFSET_Y(x) (((x) >> 5) & 0x1F) 526bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_OFFSET_Y 0xFFFFFC1F 527bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_OFFSET_Z(x) (((unsigned)(x) & 0x1F) << 10) 528bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_OFFSET_Z(x) (((x) >> 10) & 0x1F) 529bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_OFFSET_Z 0xFFFF83FF 530bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_SAMPLER_ID(x) (((unsigned)(x) & 0x1F) << 15) 531bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_SAMPLER_ID(x) (((x) >> 15) & 0x1F) 532bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_SAMPLER_ID 0xFFF07FFF 533bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_SRC_SEL_X(x) (((unsigned)(x) & 0x7) << 20) 534bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_SRC_SEL_X(x) (((x) >> 20) & 0x7) 535bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_SRC_SEL_X 0xFF8FFFFF 536bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_SRC_SEL_Y(x) (((unsigned)(x) & 0x7) << 23) 537bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_SRC_SEL_Y(x) (((x) >> 23) & 0x7) 538bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_SRC_SEL_Y 0xFC7FFFFF 539bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_SRC_SEL_Z(x) (((unsigned)(x) & 0x7) << 26) 540bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_SRC_SEL_Z(x) (((x) >> 26) & 0x7) 541bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_SRC_SEL_Z 0xE3FFFFFF 542bf215546Sopenharmony_ci#define S_SQ_TEX_WORD2_SRC_SEL_W(x) (((unsigned)(x) & 0x7) << 29) 543bf215546Sopenharmony_ci#define G_SQ_TEX_WORD2_SRC_SEL_W(x) (((x) >> 29) & 0x7) 544bf215546Sopenharmony_ci#define C_SQ_TEX_WORD2_SRC_SEL_W 0x1FFFFFFF 545bf215546Sopenharmony_ci 546bf215546Sopenharmony_ci#define P_SQ_MEM_RD_WORD0 547bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_MEM_INST(x) (((x) & 0x1F) << 0) 548bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_ELEM_SIZE(x) (((x) & 0x3) << 5) 549bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_FETCH_WHOLE_QUAD(x) (((x) & 0x1) << 7) 550bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_MEM_OP(x) (((x) & 0x7) << 8) 551bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_UNCACHED(x) (((x) & 0x1) << 11) 552bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_INDEXED(x) (((x) & 0x1) << 12) 553bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_SRC_SEL_Y(x) (((x) & 0x3) << 13) 554bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_SRC_GPR(x) (((x) & 0x7F) << 16) 555bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_SRC_REL(x) (((x) & 0x1) << 23) 556bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_SRC_SEL_X(x) (((x) & 0x3) << 24) 557bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_BURST_COUNT(x) (((x) & 0xF) << 26) 558bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_LDS_REQ(x) (((x) & 0x1) << 30) 559bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD0_COALESCED_READ(x) (((x) & 0x1) << 31) 560bf215546Sopenharmony_ci#define P_SQ_MEM_RD_WORD1 561bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_GPR(x) (((x) & 0x7f) << 0) 562bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_REL(x) (((x) & 0x1) << 7) 563bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_SEL_X(x) (((x) & 0x7) << 9) 564bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_SEL_Y(x) (((x) & 0x7) << 12) 565bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_SEL_Z(x) (((x) & 0x7) << 15) 566bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DST_SEL_W(x) (((x) & 0x7) << 18) 567bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_DATA_FORMAT(x) (((x) & 0x3F) << 22) 568bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_NUM_FORMAT_ALL(x) (((x) & 0x3) << 28) 569bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_FORMAT_COMP_ALL(x) (((x) & 0x1) << 30) 570bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD1_SRF_MODE_ALL(x) (((x) & 0x1) << 31) 571bf215546Sopenharmony_ci#define P_SQ_MEM_RD_WORD2 572bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD2_ARRAY_BASE(x) (((x) & 0x1FFF) << 0) 573bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD2_ENDIAN_SWAP(x) (((x) & 0x3) << 16) 574bf215546Sopenharmony_ci#define S_SQ_MEM_RD_WORD2_ARRAY_SIZE(x) (((x) & 0xFFF) << 20) 575bf215546Sopenharmony_ci 576bf215546Sopenharmony_ci#endif 577