1bf215546Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2bf215546Sopenharmony_ci<!-- 3bf215546Sopenharmony_ciCopyright © 2020 Google, Inc. 4bf215546Sopenharmony_ci 5bf215546Sopenharmony_ciPermission is hereby granted, free of charge, to any person obtaining a 6bf215546Sopenharmony_cicopy of this software and associated documentation files (the "Software"), 7bf215546Sopenharmony_cito deal in the Software without restriction, including without limitation 8bf215546Sopenharmony_cithe rights to use, copy, modify, merge, publish, distribute, sublicense, 9bf215546Sopenharmony_ciand/or sell copies of the Software, and to permit persons to whom the 10bf215546Sopenharmony_ciSoftware is furnished to do so, subject to the following conditions: 11bf215546Sopenharmony_ci 12bf215546Sopenharmony_ciThe above copyright notice and this permission notice (including the next 13bf215546Sopenharmony_ciparagraph) shall be included in all copies or substantial portions of the 14bf215546Sopenharmony_ciSoftware. 15bf215546Sopenharmony_ci 16bf215546Sopenharmony_ciTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17bf215546Sopenharmony_ciIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18bf215546Sopenharmony_ciFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19bf215546Sopenharmony_ciTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20bf215546Sopenharmony_ciLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21bf215546Sopenharmony_ciOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22bf215546Sopenharmony_ciSOFTWARE. 23bf215546Sopenharmony_ci --> 24bf215546Sopenharmony_ci 25bf215546Sopenharmony_ci<isa> 26bf215546Sopenharmony_ci 27bf215546Sopenharmony_ci<!-- 28bf215546Sopenharmony_ci Cat6 Instructions: load/store/atomic instructions 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ci There are instructions with suffixes like: 31bf215546Sopenharmony_ci "stg.a", "ldib.b", "atomic.g.add", "atomic.s.add" 32bf215546Sopenharmony_ci They have the following meaning: 33bf215546Sopenharmony_ci '.a' - "addrcalc" stg/ldg with complex address computations 34bf215546Sopenharmony_ci '.b' - "bindless" instructions 35bf215546Sopenharmony_ci '.g' - "global" atomics that operate on raw iova addresses 36bf215546Sopenharmony_ci '.s' - "ssbo" pre-a6xx image/ssbo atomics 37bf215546Sopenharmony_ci --> 38bf215546Sopenharmony_ci 39bf215546Sopenharmony_ci<bitset name="#instruction-cat6" extends="#instruction"> 40bf215546Sopenharmony_ci <field pos="59" name="JP" type="bool" display="(jp)"/> 41bf215546Sopenharmony_ci <field pos="60" name="SY" type="bool" display="(sy)"/> 42bf215546Sopenharmony_ci <pattern low="61" high="63">110</pattern> <!-- cat6 --> 43bf215546Sopenharmony_ci <!-- is load dst / store src a half-reg? --> 44bf215546Sopenharmony_ci <derived name="TYPE_HALF" expr="#type-half" type="bool" display="h"/> 45bf215546Sopenharmony_ci <encode> 46bf215546Sopenharmony_ci <map name="TYPE">src->cat6.type</map> 47bf215546Sopenharmony_ci </encode> 48bf215546Sopenharmony_ci</bitset> 49bf215546Sopenharmony_ci 50bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx" extends="#instruction-cat6"> 51bf215546Sopenharmony_ci <field name="TYPE" low="49" high="51" type="#type"/> 52bf215546Sopenharmony_ci <!-- TODO pull more fields up to this level, when they are common across sub-encodings --> 53bf215546Sopenharmony_ci</bitset> 54bf215546Sopenharmony_ci 55bf215546Sopenharmony_ci<bitset name="#instruction-cat6-ldg" extends="#instruction-cat6-a3xx"> 56bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> 57bf215546Sopenharmony_ci <field low="14" high="21" name="SRC1" type="#reg-gpr"/> 58bf215546Sopenharmony_ci <pattern pos="23" >1</pattern> 59bf215546Sopenharmony_ci <field low="24" high="31" name="SIZE" type="uint"/> 60bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 61bf215546Sopenharmony_ci <pattern low="40" high="48">xxxxxxxxx</pattern> 62bf215546Sopenharmony_ci <pattern low="52" high="53">00</pattern> 63bf215546Sopenharmony_ci <pattern low="54" high="58">00000</pattern> <!-- OPC --> 64bf215546Sopenharmony_ci</bitset> 65bf215546Sopenharmony_ci 66bf215546Sopenharmony_ci<bitset name="ldg" extends="#instruction-cat6-ldg"> 67bf215546Sopenharmony_ci <doc> 68bf215546Sopenharmony_ci LoaD Global 69bf215546Sopenharmony_ci </doc> 70bf215546Sopenharmony_ci 71bf215546Sopenharmony_ci <display> 72bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {TYPE_HALF}{DST}, g[{SRC1}{OFF}], {SIZE} 73bf215546Sopenharmony_ci </display> 74bf215546Sopenharmony_ci 75bf215546Sopenharmony_ci <field low="1" high="13" name="OFF" type="offset"/> 76bf215546Sopenharmony_ci <pattern pos="22" >0</pattern> <!-- Imm offset ldg form --> 77bf215546Sopenharmony_ci 78bf215546Sopenharmony_ci <encode> 79bf215546Sopenharmony_ci <map name="OFF">extract_reg_iim(src->srcs[1])</map> 80bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[2])</map> 81bf215546Sopenharmony_ci </encode> 82bf215546Sopenharmony_ci</bitset> 83bf215546Sopenharmony_ci 84bf215546Sopenharmony_ci<bitset name="ldg.a" extends="#instruction-cat6-ldg"> 85bf215546Sopenharmony_ci <doc> 86bf215546Sopenharmony_ci LoaD Global 87bf215546Sopenharmony_ci </doc> 88bf215546Sopenharmony_ci 89bf215546Sopenharmony_ci <gen min="600"/> 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ci <display> 92bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {TYPE_HALF}{DST}, g[{SRC1}+({SRC2}{OFF})<<{SRC2_BYTE_SHIFT}], {SIZE} 93bf215546Sopenharmony_ci </display> 94bf215546Sopenharmony_ci 95bf215546Sopenharmony_ci <override> 96bf215546Sopenharmony_ci <display> 97bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {TYPE_HALF}{DST}, g[{SRC1}+{SRC2}<<{SRC2_BYTE_SHIFT}{OFF}<<2], {SIZE} 98bf215546Sopenharmony_ci </display> 99bf215546Sopenharmony_ci <expr>{SRC2_ADD_DWORD_SHIFT} > 0</expr> 100bf215546Sopenharmony_ci </override> 101bf215546Sopenharmony_ci 102bf215546Sopenharmony_ci <field low="1" high="8" name="SRC2" type="#reg-gpr"/> 103bf215546Sopenharmony_ci <field low="9" high="10" name="OFF" type="uoffset"/> 104bf215546Sopenharmony_ci <assert pos="11" >0</assert> 105bf215546Sopenharmony_ci <field low="12" high="13" name="SRC2_ADD_DWORD_SHIFT" type="uint"/> 106bf215546Sopenharmony_ci <pattern pos="22" >1</pattern> <!-- Reg offset ldg form --> 107bf215546Sopenharmony_ci 108bf215546Sopenharmony_ci <derived name="SRC2_BYTE_SHIFT" width="3" type="uint"> 109bf215546Sopenharmony_ci <expr>{SRC2_ADD_DWORD_SHIFT} + 2</expr> 110bf215546Sopenharmony_ci </derived> 111bf215546Sopenharmony_ci 112bf215546Sopenharmony_ci <encode> 113bf215546Sopenharmony_ci <map name="SRC2">src->srcs[1]</map> 114bf215546Sopenharmony_ci <map name="SRC2_ADD_DWORD_SHIFT">extract_reg_uim(src->srcs[2])</map> 115bf215546Sopenharmony_ci <map name="OFF">extract_reg_uim(src->srcs[3])</map> 116bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[4])</map> 117bf215546Sopenharmony_ci </encode> 118bf215546Sopenharmony_ci</bitset> 119bf215546Sopenharmony_ci 120bf215546Sopenharmony_ci<bitset name="#instruction-cat6-stg" extends="#instruction-cat6-a3xx"> 121bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 122bf215546Sopenharmony_ci <field low="1" high="8" name="SRC3" type="#reg-gpr"/> 123bf215546Sopenharmony_ci <pattern low="14" high="21">xxxxxxxx</pattern> 124bf215546Sopenharmony_ci <pattern low="22" high="23">1x</pattern> 125bf215546Sopenharmony_ci <field low="24" high="31" name="SIZE" type="uint"/> 126bf215546Sopenharmony_ci <field pos="40" name="DST_OFF" type="bool"/> 127bf215546Sopenharmony_ci <field low="41" high="48" name="SRC1" type="#reg-gpr"/> 128bf215546Sopenharmony_ci <pattern pos="53" >x</pattern> 129bf215546Sopenharmony_ci <pattern low="54" high="58">00011</pattern> <!-- OPC --> 130bf215546Sopenharmony_ci 131bf215546Sopenharmony_ci <encode> 132bf215546Sopenharmony_ci <map name="DST_OFF" force="true">1</map> 133bf215546Sopenharmony_ci </encode> 134bf215546Sopenharmony_ci</bitset> 135bf215546Sopenharmony_ci 136bf215546Sopenharmony_ci<bitset name="stg" extends="#instruction-cat6-stg"> 137bf215546Sopenharmony_ci <doc> 138bf215546Sopenharmony_ci STore Global 139bf215546Sopenharmony_ci </doc> 140bf215546Sopenharmony_ci 141bf215546Sopenharmony_ci <display> 142bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} g[{SRC1}{OFF}], {TYPE_HALF}{SRC3}, {SIZE} 143bf215546Sopenharmony_ci </display> 144bf215546Sopenharmony_ci 145bf215546Sopenharmony_ci <derived name="OFF" width="13" type="offset"> 146bf215546Sopenharmony_ci <expr>({OFF_HI} << 8) | {OFF_LO}</expr> 147bf215546Sopenharmony_ci </derived> 148bf215546Sopenharmony_ci 149bf215546Sopenharmony_ci <field low="9" high="13" name="OFF_HI" type="int"/> 150bf215546Sopenharmony_ci <field low="32" high="39" name="OFF_LO" type="uint"/> 151bf215546Sopenharmony_ci <pattern pos="52" >0</pattern> <!-- Imm offset stg form --> 152bf215546Sopenharmony_ci 153bf215546Sopenharmony_ci <encode> 154bf215546Sopenharmony_ci <map name="OFF_LO">extract_reg_iim(src->srcs[1]) & 0xff</map> 155bf215546Sopenharmony_ci <map name="OFF_HI">extract_reg_iim(src->srcs[1]) >> 8</map> 156bf215546Sopenharmony_ci <map name="SRC3">src->srcs[2]</map> 157bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[3])</map> 158bf215546Sopenharmony_ci </encode> 159bf215546Sopenharmony_ci</bitset> 160bf215546Sopenharmony_ci 161bf215546Sopenharmony_ci<bitset name="stg.a" extends="#instruction-cat6-stg"> 162bf215546Sopenharmony_ci <doc> 163bf215546Sopenharmony_ci STore Global 164bf215546Sopenharmony_ci </doc> 165bf215546Sopenharmony_ci 166bf215546Sopenharmony_ci <gen min="600"/> 167bf215546Sopenharmony_ci 168bf215546Sopenharmony_ci <display> 169bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} g[{SRC1}+({SRC2}{OFF})<<{DST_BYTE_SHIFT}], {TYPE_HALF}{SRC3}, {SIZE} 170bf215546Sopenharmony_ci </display> 171bf215546Sopenharmony_ci 172bf215546Sopenharmony_ci <override> 173bf215546Sopenharmony_ci <display> 174bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} g[{SRC1}+{SRC2}<<{DST_BYTE_SHIFT}{OFF}<<2], {TYPE_HALF}{SRC3}, {SIZE} 175bf215546Sopenharmony_ci </display> 176bf215546Sopenharmony_ci <expr>{SRC2_ADD_DWORD_SHIFT} > 0</expr> 177bf215546Sopenharmony_ci </override> 178bf215546Sopenharmony_ci 179bf215546Sopenharmony_ci <derived name="DST_BYTE_SHIFT" width="3" type="uint"> 180bf215546Sopenharmony_ci <expr>{SRC2_ADD_DWORD_SHIFT} + 2</expr> 181bf215546Sopenharmony_ci </derived> 182bf215546Sopenharmony_ci 183bf215546Sopenharmony_ci <field low="9" high="10" name="OFF" type="uoffset"/> 184bf215546Sopenharmony_ci <assert pos="11" >0</assert> 185bf215546Sopenharmony_ci <field low="12" high="13" name="SRC2_ADD_DWORD_SHIFT" type="uint"/> 186bf215546Sopenharmony_ci <field low="32" high="39" name="SRC2" type="#reg-gpr"/> 187bf215546Sopenharmony_ci <pattern pos="52" >1</pattern> <!-- Reg offset stg form --> 188bf215546Sopenharmony_ci 189bf215546Sopenharmony_ci <encode> 190bf215546Sopenharmony_ci <map name="SRC2">src->srcs[1]</map> 191bf215546Sopenharmony_ci <map name="SRC2_ADD_DWORD_SHIFT">extract_reg_uim(src->srcs[2])</map> 192bf215546Sopenharmony_ci <map name="OFF">extract_reg_uim(src->srcs[3])</map> 193bf215546Sopenharmony_ci <map name="SRC3">src->srcs[4]</map> 194bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[5])</map> 195bf215546Sopenharmony_ci </encode> 196bf215546Sopenharmony_ci</bitset> 197bf215546Sopenharmony_ci 198bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ld" extends="#instruction-cat6-a3xx"> 199bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> 200bf215546Sopenharmony_ci <field low="1" high="13" name="OFF" type="offset"/> 201bf215546Sopenharmony_ci <field low="14" high="21" name="SRC" type="#reg-gpr"/> 202bf215546Sopenharmony_ci <pattern pos="22" >x</pattern> 203bf215546Sopenharmony_ci <pattern pos="23" >1</pattern> 204bf215546Sopenharmony_ci <field low="24" high="31" name="SIZE" type="uint"/> 205bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 206bf215546Sopenharmony_ci <pattern low="40" high="48">xxxxxxxxx</pattern> 207bf215546Sopenharmony_ci <pattern low="52" high="53">xx</pattern> 208bf215546Sopenharmony_ci <encode> 209bf215546Sopenharmony_ci <map name="OFF">extract_reg_uim(src->srcs[1])</map> 210bf215546Sopenharmony_ci <map name="SRC">src->srcs[0]</map> 211bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[2])</map> 212bf215546Sopenharmony_ci </encode> 213bf215546Sopenharmony_ci</bitset> 214bf215546Sopenharmony_ci 215bf215546Sopenharmony_ci<bitset name="ldl" extends="#instruction-cat6-a3xx-ld"> 216bf215546Sopenharmony_ci <doc> 217bf215546Sopenharmony_ci LoaD Local 218bf215546Sopenharmony_ci </doc> 219bf215546Sopenharmony_ci <display> 220bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST}, l[{SRC}{OFF}], {SIZE} 221bf215546Sopenharmony_ci </display> 222bf215546Sopenharmony_ci <pattern low="54" high="58">00001</pattern> <!-- OPC --> 223bf215546Sopenharmony_ci</bitset> 224bf215546Sopenharmony_ci 225bf215546Sopenharmony_ci<bitset name="ldp" extends="#instruction-cat6-a3xx-ld"> 226bf215546Sopenharmony_ci <doc> 227bf215546Sopenharmony_ci LoaD Private 228bf215546Sopenharmony_ci </doc> 229bf215546Sopenharmony_ci <display> 230bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST}, p[{SRC}{OFF}], {SIZE} 231bf215546Sopenharmony_ci </display> 232bf215546Sopenharmony_ci <pattern low="54" high="58">00010</pattern> <!-- OPC --> 233bf215546Sopenharmony_ci</bitset> 234bf215546Sopenharmony_ci 235bf215546Sopenharmony_ci<bitset name="ldlw" extends="#instruction-cat6-a3xx-ld"> 236bf215546Sopenharmony_ci <doc> 237bf215546Sopenharmony_ci LoaD Local (variant used for passing data between geom stages) 238bf215546Sopenharmony_ci </doc> 239bf215546Sopenharmony_ci <display> 240bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST}, l[{SRC}{OFF}], {SIZE} 241bf215546Sopenharmony_ci </display> 242bf215546Sopenharmony_ci <pattern low="54" high="58">01010</pattern> <!-- OPC --> 243bf215546Sopenharmony_ci</bitset> 244bf215546Sopenharmony_ci 245bf215546Sopenharmony_ci<bitset name="ldlv" extends="#instruction-cat6-a3xx"> 246bf215546Sopenharmony_ci <doc> 247bf215546Sopenharmony_ci LoaD Local Varying - read directly from varying storage 248bf215546Sopenharmony_ci </doc> 249bf215546Sopenharmony_ci <display> 250bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST}, l[{OFF}], {SIZE} 251bf215546Sopenharmony_ci </display> 252bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 253bf215546Sopenharmony_ci <field low="1" high="13" name="OFF" type="uint"/> 254bf215546Sopenharmony_ci <pattern low="14" high="21">xxxxxxxx</pattern> <!-- SRC --> 255bf215546Sopenharmony_ci <pattern low="22" high="23">11</pattern> 256bf215546Sopenharmony_ci <field low="24" high="31" name="SIZE" type="uint"/> 257bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 258bf215546Sopenharmony_ci <pattern low="40" high="48">xxxxxxxxx</pattern> 259bf215546Sopenharmony_ci <pattern low="52" high="53">xx</pattern> 260bf215546Sopenharmony_ci <pattern low="54" high="58">11111</pattern> <!-- OPC --> 261bf215546Sopenharmony_ci <encode> 262bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[1])</map> 263bf215546Sopenharmony_ci <map name="OFF">extract_reg_uim(src->srcs[0])</map> 264bf215546Sopenharmony_ci </encode> 265bf215546Sopenharmony_ci</bitset> 266bf215546Sopenharmony_ci 267bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-st" extends="#instruction-cat6-a3xx"> 268bf215546Sopenharmony_ci <derived name="OFF" width="13" type="offset"> 269bf215546Sopenharmony_ci <expr>({OFF_HI} << 8) | {OFF_LO}</expr> 270bf215546Sopenharmony_ci </derived> 271bf215546Sopenharmony_ci 272bf215546Sopenharmony_ci <field low="1" high="8" name="SRC" type="#reg-gpr"/> 273bf215546Sopenharmony_ci <field low="9" high="13" name="OFF_HI" type="int"/> 274bf215546Sopenharmony_ci <pattern low="14" high="22">xxxxxxxxx</pattern> 275bf215546Sopenharmony_ci <pattern pos="23" >1</pattern> 276bf215546Sopenharmony_ci <field low="24" high="31" name="SIZE" type="uint"/> 277bf215546Sopenharmony_ci <field low="32" high="39" name="OFF_LO" type="uint"/> 278bf215546Sopenharmony_ci <pattern pos="40" >1</pattern> 279bf215546Sopenharmony_ci <field low="41" high="48" name="DST" type="#reg-gpr"/> 280bf215546Sopenharmony_ci <pattern low="52" high="53">xx</pattern> 281bf215546Sopenharmony_ci <encode> 282bf215546Sopenharmony_ci <!-- 283bf215546Sopenharmony_ci TODO get rid of dst_offset and use a normal (potentially 284bf215546Sopenharmony_ci immed) reg.. for now match the existing ir3 until we can 285bf215546Sopenharmony_ci drop the old packed-struct encoding 286bf215546Sopenharmony_ci --> 287bf215546Sopenharmony_ci <map name="OFF_HI">src->cat6.dst_offset >> 8</map> 288bf215546Sopenharmony_ci <map name="OFF_LO">src->cat6.dst_offset & 0xff</map> 289bf215546Sopenharmony_ci <map name="SRC">src->srcs[1]</map> 290bf215546Sopenharmony_ci <map name="DST">src->srcs[0]</map>" 291bf215546Sopenharmony_ci <map name="SIZE">extract_reg_uim(src->srcs[2])</map> 292bf215546Sopenharmony_ci </encode> 293bf215546Sopenharmony_ci</bitset> 294bf215546Sopenharmony_ci 295bf215546Sopenharmony_ci<bitset name="stl" extends="#instruction-cat6-a3xx-st"> 296bf215546Sopenharmony_ci <doc> 297bf215546Sopenharmony_ci STore Local 298bf215546Sopenharmony_ci </doc> 299bf215546Sopenharmony_ci <display> 300bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} l[{DST}{OFF}], {SRC}, {SIZE} 301bf215546Sopenharmony_ci </display> 302bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 303bf215546Sopenharmony_ci <pattern low="54" high="58">00100</pattern> <!-- OPC --> 304bf215546Sopenharmony_ci</bitset> 305bf215546Sopenharmony_ci 306bf215546Sopenharmony_ci<bitset name="stp" extends="#instruction-cat6-a3xx-st"> 307bf215546Sopenharmony_ci <doc> 308bf215546Sopenharmony_ci STore Private 309bf215546Sopenharmony_ci </doc> 310bf215546Sopenharmony_ci <display> 311bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} p[{DST}{OFF}], {SRC}, {SIZE} 312bf215546Sopenharmony_ci </display> 313bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> <!-- SRC_OFF --> 314bf215546Sopenharmony_ci <pattern low="54" high="58">00101</pattern> <!-- OPC --> 315bf215546Sopenharmony_ci</bitset> 316bf215546Sopenharmony_ci 317bf215546Sopenharmony_ci<bitset name="stlw" extends="#instruction-cat6-a3xx-st"> 318bf215546Sopenharmony_ci <doc> 319bf215546Sopenharmony_ci STore Local (variant used for passing data between geom stages) 320bf215546Sopenharmony_ci </doc> 321bf215546Sopenharmony_ci <display> 322bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} l[{DST}{OFF}], {SRC}, {SIZE} 323bf215546Sopenharmony_ci </display> 324bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 325bf215546Sopenharmony_ci <pattern low="54" high="58">01011</pattern> <!-- OPC --> 326bf215546Sopenharmony_ci</bitset> 327bf215546Sopenharmony_ci 328bf215546Sopenharmony_ci<bitset name="#stc-dst-imm" extends="#stc-dst"> 329bf215546Sopenharmony_ci <display> 330bf215546Sopenharmony_ci {OFFSET} 331bf215546Sopenharmony_ci </display> 332bf215546Sopenharmony_ci <field name="OFFSET" low="0" high="7" type="uint"/> 333bf215546Sopenharmony_ci <pattern pos="8">0</pattern> 334bf215546Sopenharmony_ci</bitset> 335bf215546Sopenharmony_ci 336bf215546Sopenharmony_ci<bitset name="#stc-dst-a1" extends="#stc-dst"> 337bf215546Sopenharmony_ci <display> 338bf215546Sopenharmony_ci a1.x{OFFSET} 339bf215546Sopenharmony_ci </display> 340bf215546Sopenharmony_ci <field name="OFFSET" low="0" high="7" type="uoffset"/> 341bf215546Sopenharmony_ci <pattern pos="8">1</pattern> 342bf215546Sopenharmony_ci</bitset> 343bf215546Sopenharmony_ci 344bf215546Sopenharmony_ci<bitset name="#stc-dst" size="9"> 345bf215546Sopenharmony_ci <doc> 346bf215546Sopenharmony_ci Encoding for stc destination which can be constant or have an 347bf215546Sopenharmony_ci offset of a1.x. 348bf215546Sopenharmony_ci </doc> 349bf215546Sopenharmony_ci <encode type="struct ir3_instruction *" case-prefix=""> 350bf215546Sopenharmony_ci <map name="OFFSET">extract_reg_uim(src->srcs[0])</map> 351bf215546Sopenharmony_ci </encode> 352bf215546Sopenharmony_ci</bitset> 353bf215546Sopenharmony_ci 354bf215546Sopenharmony_ci<bitset name="stc" extends="#instruction-cat6-a3xx"> 355bf215546Sopenharmony_ci <doc> 356bf215546Sopenharmony_ci STore Const - used for shader prolog (between shps and shpe) 357bf215546Sopenharmony_ci to store "uniform folded" values into CONST file 358bf215546Sopenharmony_ci 359bf215546Sopenharmony_ci NOTE: TYPE field actually seems to be set to different 360bf215546Sopenharmony_ci values (ie f32 vs u32), but it seems that only the size (16b vs 361bf215546Sopenharmony_ci 32b) matters. Setting a 16-bit type (f16, u16, or s16) doesn't 362bf215546Sopenharmony_ci cause any promotion to 32-bit, it causes the 16-bit sources to 363bf215546Sopenharmony_ci be stored one after the other starting with the low half of the 364bf215546Sopenharmony_ci constant. So e.g. "stc.f16 c[1], hr0.x, 1" copies hr0.x to the 365bf215546Sopenharmony_ci bottom half of c0.y. There seems to be no way to set just the 366bf215546Sopenharmony_ci upper half. In any case, the blob seems to only use the 32-bit 367bf215546Sopenharmony_ci versions. 368bf215546Sopenharmony_ci 369bf215546Sopenharmony_ci The blob disassembly doesn't include the type, but we still 370bf215546Sopenharmony_ci display it so that we can preserve the different values the blob 371bf215546Sopenharmony_ci sets when round-tripping. 372bf215546Sopenharmony_ci 373bf215546Sopenharmony_ci NOTE: this conflicts with stgb from earlier gens 374bf215546Sopenharmony_ci </doc> 375bf215546Sopenharmony_ci <display> 376bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} c[{DST}], {SRC}, {SIZE} 377bf215546Sopenharmony_ci </display> 378bf215546Sopenharmony_ci <gen min="600"/> 379bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 380bf215546Sopenharmony_ci <field low="1" high="8" name="SRC" type="#reg-gpr"/> 381bf215546Sopenharmony_ci <pattern low="9" high="22">xxxxxxxxxxxxxx</pattern> 382bf215546Sopenharmony_ci <pattern pos="23" >1</pattern> 383bf215546Sopenharmony_ci <field low="24" high="26" name="SIZE" type="uint"/> 384bf215546Sopenharmony_ci <pattern low="27" high="31">xxxxx</pattern> 385bf215546Sopenharmony_ci <field low="32" high="40" name="DST" type="#stc-dst"/> 386bf215546Sopenharmony_ci <pattern low="41" high="48">xxxxxxxx</pattern> 387bf215546Sopenharmony_ci <pattern low="52" high="53">xx</pattern> 388bf215546Sopenharmony_ci <pattern low="54" high="58">11100</pattern> <!-- OPC --> 389bf215546Sopenharmony_ci <encode> 390bf215546Sopenharmony_ci <map name="DST">src</map> 391bf215546Sopenharmony_ci <map name="SRC">src->srcs[1]</map> 392bf215546Sopenharmony_ci <map name="SIZE">src->cat6.iim_val</map> 393bf215546Sopenharmony_ci </encode> 394bf215546Sopenharmony_ci</bitset> 395bf215546Sopenharmony_ci 396bf215546Sopenharmony_ci<bitset name="resinfo" extends="#instruction-cat6-a3xx"> 397bf215546Sopenharmony_ci <display> 398bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE}.{D}d {DST}, g[{SSBO}] 399bf215546Sopenharmony_ci </display> 400bf215546Sopenharmony_ci <derived name="D" expr="#cat6-d" type="uint"/> 401bf215546Sopenharmony_ci 402bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 403bf215546Sopenharmony_ci <pattern low="1" high="8" >xxxxxxxx</pattern> <!-- SRC3 --> 404bf215546Sopenharmony_ci <field low="9" high="10" name="D_MINUS_ONE" type="uint"/> 405bf215546Sopenharmony_ci <pattern pos="11" >x</pattern> <!-- TYPED --> 406bf215546Sopenharmony_ci <pattern low="12" high="13">xx</pattern> <!-- TYPE_SIZE --> 407bf215546Sopenharmony_ci <pattern low="14" high="21">xxxxxxxx</pattern> <!-- SRC1 --> 408bf215546Sopenharmony_ci <pattern pos="22" >x</pattern> <!-- SRC1_IM --> 409bf215546Sopenharmony_ci <pattern pos="23" >x</pattern> <!-- SRC2_IM --> 410bf215546Sopenharmony_ci <pattern low="24" high="31">xxxxxxxx</pattern> <!-- SRC2 --> 411bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 412bf215546Sopenharmony_ci <pattern pos="40" >0</pattern> 413bf215546Sopenharmony_ci <field low="41" high="48" name="SSBO" type="#cat6-src"> <!-- SSBO/image binding point --> 414bf215546Sopenharmony_ci <param name="SSBO_IM" as="SRC_IM"/> 415bf215546Sopenharmony_ci </field> 416bf215546Sopenharmony_ci <pattern pos="52" >x</pattern> <!-- G --> 417bf215546Sopenharmony_ci <field pos="53" name="SSBO_IM" type="bool"/> 418bf215546Sopenharmony_ci <pattern low="54" high="58">01111</pattern> <!-- OPC --> 419bf215546Sopenharmony_ci <encode> 420bf215546Sopenharmony_ci <map name="D_MINUS_ONE">src->cat6.d - 1</map> 421bf215546Sopenharmony_ci <map name="SSBO">src->srcs[0]</map> 422bf215546Sopenharmony_ci <map name="SSBO_IM">!!(src->srcs[0]->flags & IR3_REG_IMMED)</map> 423bf215546Sopenharmony_ci </encode> 424bf215546Sopenharmony_ci</bitset> 425bf215546Sopenharmony_ci 426bf215546Sopenharmony_ci<!-- base pattern for a3xx cat6 ssbo/ibo load/store instructions --> 427bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ibo" extends="#instruction-cat6-a3xx"> 428bf215546Sopenharmony_ci <derived name="D" expr="#cat6-d" type="uint"/> 429bf215546Sopenharmony_ci <derived name="TYPE_SIZE" expr="#cat6-type-size" type="uint"/> 430bf215546Sopenharmony_ci 431bf215546Sopenharmony_ci <field low="9" high="10" name="D_MINUS_ONE" type="uint"/> 432bf215546Sopenharmony_ci <field pos="11" name="TYPED" type="#cat6-typed"/> 433bf215546Sopenharmony_ci <field low="12" high="13" name="TYPE_SIZE_MINUS_ONE" type="uint"/> 434bf215546Sopenharmony_ci <field low="41" high="48" name="SSBO" type="#cat6-src"> <!-- SSBO/image binding point --> 435bf215546Sopenharmony_ci <param name="SSBO_IM" as="SRC_IM"/> 436bf215546Sopenharmony_ci </field> 437bf215546Sopenharmony_ci <pattern pos="52" >x</pattern> <!-- G --> 438bf215546Sopenharmony_ci <field pos="53" name="SSBO_IM" type="bool"/> 439bf215546Sopenharmony_ci <encode> 440bf215546Sopenharmony_ci <map name="D_MINUS_ONE">src->cat6.d - 1</map> 441bf215546Sopenharmony_ci <map name="TYPED">src</map> 442bf215546Sopenharmony_ci <map name="TYPE_SIZE_MINUS_ONE">src->cat6.iim_val - 1</map> 443bf215546Sopenharmony_ci <map name="SSBO">src->srcs[0]</map> 444bf215546Sopenharmony_ci <map name="SSBO_IM">!!(src->srcs[0]->flags & IR3_REG_IMMED)</map> 445bf215546Sopenharmony_ci </encode> 446bf215546Sopenharmony_ci</bitset> 447bf215546Sopenharmony_ci 448bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ibo-load" extends="#instruction-cat6-a3xx-ibo"> 449bf215546Sopenharmony_ci <display> 450bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE} {DST}, g[{SSBO}], {SRC1}, {SRC2} 451bf215546Sopenharmony_ci </display> 452bf215546Sopenharmony_ci <gen max="599"/> 453bf215546Sopenharmony_ci 454bf215546Sopenharmony_ci <pattern low="1" high="8" >xxxxxxxx</pattern> <!-- SRC3 --> 455bf215546Sopenharmony_ci <field low="14" high="21" name="SRC1" type="#cat6-src"> 456bf215546Sopenharmony_ci <param name="SRC1_IM" as="SRC_IM"/> 457bf215546Sopenharmony_ci </field> 458bf215546Sopenharmony_ci <field pos="22" name="SRC1_IM" type="bool"/> 459bf215546Sopenharmony_ci <field pos="23" name="SRC2_IM" type="bool"/> 460bf215546Sopenharmony_ci <field low="24" high="31" name="SRC2" type="#cat6-src"> 461bf215546Sopenharmony_ci <param name="SRC2_IM" as="SRC_IM"/> 462bf215546Sopenharmony_ci </field> 463bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 464bf215546Sopenharmony_ci <pattern pos="40" >x</pattern> <!-- .rck --> 465bf215546Sopenharmony_ci <encode> 466bf215546Sopenharmony_ci <map name="SRC1">src->srcs[1]</map> 467bf215546Sopenharmony_ci <map name="SRC1_IM">!!(src->srcs[1]->flags & IR3_REG_IMMED)</map> 468bf215546Sopenharmony_ci <map name="SRC2">src->srcs[2]</map> 469bf215546Sopenharmony_ci <map name="SRC2_IM">!!(src->srcs[2]->flags & IR3_REG_IMMED)</map> 470bf215546Sopenharmony_ci </encode> 471bf215546Sopenharmony_ci</bitset> 472bf215546Sopenharmony_ci 473bf215546Sopenharmony_ci<bitset name="ldgb" extends="#instruction-cat6-a3xx-ibo-load"> 474bf215546Sopenharmony_ci <gen max="499"/> 475bf215546Sopenharmony_ci <pattern low="54" high="58">11011</pattern> <!-- OPC --> 476bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> <!-- .a --> 477bf215546Sopenharmony_ci</bitset> 478bf215546Sopenharmony_ci 479bf215546Sopenharmony_ci<bitset name="ldgb" extends="#instruction-cat6-a3xx-ibo-load"> 480bf215546Sopenharmony_ci <gen min="500"/> 481bf215546Sopenharmony_ci <pattern low="54" high="58">11011</pattern> <!-- OPC --> 482bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> <!-- .a --> 483bf215546Sopenharmony_ci</bitset> 484bf215546Sopenharmony_ci 485bf215546Sopenharmony_ci<bitset name="ldib" extends="#instruction-cat6-a3xx-ibo-load"> 486bf215546Sopenharmony_ci <pattern low="54" high="58">00110</pattern> <!-- OPC --> 487bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> <!-- .a --> 488bf215546Sopenharmony_ci</bitset> 489bf215546Sopenharmony_ci 490bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ibo-store" extends="#instruction-cat6-a3xx-ibo"> 491bf215546Sopenharmony_ci <display> 492bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE} g[{SSBO}], {SRC1}, {SRC2}, {SRC3} 493bf215546Sopenharmony_ci </display> 494bf215546Sopenharmony_ci <gen max="599"/> 495bf215546Sopenharmony_ci 496bf215546Sopenharmony_ci <field low="1" high="8" name="SRC1" type="#reg-gpr"/> 497bf215546Sopenharmony_ci <pattern low="14" high="22">xxxxxxxxx</pattern> 498bf215546Sopenharmony_ci <field pos="23" name="SRC2_IM" type="bool"/> 499bf215546Sopenharmony_ci <field low="24" high="31" name="SRC2" type="#cat6-src"> 500bf215546Sopenharmony_ci <param name="SRC2_IM" as="SRC_IM"/> 501bf215546Sopenharmony_ci </field> 502bf215546Sopenharmony_ci <field low="32" high="39" name="SRC3" type="#cat6-src"> 503bf215546Sopenharmony_ci <param name="SRC3_IM" as="SRC_IM"/> 504bf215546Sopenharmony_ci </field> 505bf215546Sopenharmony_ci <field pos="40" name="SRC3_IM" type="bool"/> 506bf215546Sopenharmony_ci <encode> 507bf215546Sopenharmony_ci <map name="SRC1">src->srcs[1]</map> 508bf215546Sopenharmony_ci <map name="SRC1_IM">!!(src->srcs[1]->flags & IR3_REG_IMMED)</map> 509bf215546Sopenharmony_ci <map name="SRC2">src->srcs[2]</map> 510bf215546Sopenharmony_ci <map name="SRC2_IM">!!(src->srcs[2]->flags & IR3_REG_IMMED)</map> 511bf215546Sopenharmony_ci <map name="SRC3">src->srcs[3]</map> 512bf215546Sopenharmony_ci <map name="SRC3_IM">!!(src->srcs[3]->flags & IR3_REG_IMMED)</map> 513bf215546Sopenharmony_ci </encode> 514bf215546Sopenharmony_ci</bitset> 515bf215546Sopenharmony_ci 516bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ibo-store-a4xx" extends="#instruction-cat6-a3xx-ibo-store"> 517bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> <!-- .a --> 518bf215546Sopenharmony_ci</bitset> 519bf215546Sopenharmony_ci 520bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-ibo-store-a5xx" extends="#instruction-cat6-a3xx-ibo-store"> 521bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> <!-- .a --> 522bf215546Sopenharmony_ci</bitset> 523bf215546Sopenharmony_ci 524bf215546Sopenharmony_ci<bitset name="stgb" extends="#instruction-cat6-a3xx-ibo-store-a5xx"> 525bf215546Sopenharmony_ci <gen min="500"/> 526bf215546Sopenharmony_ci <pattern low="54" high="58">11100</pattern> <!-- OPC --> 527bf215546Sopenharmony_ci</bitset> 528bf215546Sopenharmony_ci 529bf215546Sopenharmony_ci<bitset name="stib" extends="#instruction-cat6-a3xx-ibo-store-a5xx"> 530bf215546Sopenharmony_ci <gen min="500"/> 531bf215546Sopenharmony_ci <pattern low="54" high="58">11101</pattern> <!-- OPC --> 532bf215546Sopenharmony_ci</bitset> 533bf215546Sopenharmony_ci 534bf215546Sopenharmony_ci<bitset name="stgb" extends="#instruction-cat6-a3xx-ibo-store-a4xx"> 535bf215546Sopenharmony_ci <gen max="499"/> 536bf215546Sopenharmony_ci <pattern low="54" high="58">11100</pattern> <!-- OPC --> 537bf215546Sopenharmony_ci</bitset> 538bf215546Sopenharmony_ci 539bf215546Sopenharmony_ci<bitset name="stib" extends="#instruction-cat6-a3xx-ibo-store-a4xx"> 540bf215546Sopenharmony_ci <gen max="499"/> 541bf215546Sopenharmony_ci <pattern low="54" high="58">11101</pattern> <!-- OPC --> 542bf215546Sopenharmony_ci</bitset> 543bf215546Sopenharmony_ci 544bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic" extends="#instruction-cat6-a3xx"> 545bf215546Sopenharmony_ci <doc> 546bf215546Sopenharmony_ci Base for atomic instructions (I think mostly a4xx+, as 547bf215546Sopenharmony_ci a3xx didn't have real image/ssbo.. it was all just global). 548bf215546Sopenharmony_ci Still used as of a6xx for local. 549bf215546Sopenharmony_ci 550bf215546Sopenharmony_ci NOTE that existing disasm and asm parser expect atomic inc/dec 551bf215546Sopenharmony_ci to still have an extra src. For now, match that. 552bf215546Sopenharmony_ci </doc> 553bf215546Sopenharmony_ci 554bf215546Sopenharmony_ci <display> 555bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE}.l {DST}, l[{SRC1}], {SRC2} 556bf215546Sopenharmony_ci </display> 557bf215546Sopenharmony_ci 558bf215546Sopenharmony_ci <derived name="D" expr="#cat6-d" type="uint"/> 559bf215546Sopenharmony_ci <derived name="TYPE_SIZE" expr="#cat6-type-size" type="uint"/> 560bf215546Sopenharmony_ci 561bf215546Sopenharmony_ci <field low="9" high="10" name="D_MINUS_ONE" type="uint"/> 562bf215546Sopenharmony_ci <field pos="11" name="TYPED" type="#cat6-typed"/> 563bf215546Sopenharmony_ci <field low="12" high="13" name="TYPE_SIZE_MINUS_ONE" type="uint"/> 564bf215546Sopenharmony_ci <field low="14" high="21" name="SRC1" type="#cat6-src"> 565bf215546Sopenharmony_ci <param name="SRC1_IM" as="SRC_IM"/> 566bf215546Sopenharmony_ci </field> 567bf215546Sopenharmony_ci <field pos="22" name="SRC1_IM" type="bool"/> 568bf215546Sopenharmony_ci <field pos="23" name="SRC2_IM" type="bool"/> 569bf215546Sopenharmony_ci <field low="24" high="31" name="SRC2" type="#cat6-src"> 570bf215546Sopenharmony_ci <param name="SRC2_IM" as="SRC_IM"/> 571bf215546Sopenharmony_ci </field> 572bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 573bf215546Sopenharmony_ci <pattern pos="40" >x</pattern> 574bf215546Sopenharmony_ci <encode> 575bf215546Sopenharmony_ci <map name="TYPED">src</map> 576bf215546Sopenharmony_ci <map name="D_MINUS_ONE">src->cat6.d - 1</map> 577bf215546Sopenharmony_ci <map name="TYPE_SIZE_MINUS_ONE">src->cat6.iim_val - 1</map> 578bf215546Sopenharmony_ci <map name="SRC1">extract_cat6_SRC(src, 0)</map> 579bf215546Sopenharmony_ci <map name="SRC1_IM">!!(extract_cat6_SRC(src, 0)->flags & IR3_REG_IMMED)</map> 580bf215546Sopenharmony_ci <map name="SRC2">extract_cat6_SRC(src, 1)</map> 581bf215546Sopenharmony_ci <map name="SRC2_IM">!!(extract_cat6_SRC(src, 1)->flags & IR3_REG_IMMED)</map> 582bf215546Sopenharmony_ci </encode> 583bf215546Sopenharmony_ci</bitset> 584bf215546Sopenharmony_ci 585bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-local" extends="#instruction-cat6-a3xx-atomic"> 586bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> 587bf215546Sopenharmony_ci <pattern low="1" high="8" >00000000</pattern> <!-- SRC3 --> 588bf215546Sopenharmony_ci <pattern low="41" high="48" >00000000</pattern> <!-- SSBO/image binding point --> 589bf215546Sopenharmony_ci <pattern pos="52" >0</pattern> <!-- "G" --> 590bf215546Sopenharmony_ci <pattern pos="53" >0</pattern> <!-- SSBO_IM --> 591bf215546Sopenharmony_ci</bitset> 592bf215546Sopenharmony_ci 593bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-1src" extends="#instruction-cat6-a3xx-atomic-local"> 594bf215546Sopenharmony_ci <!-- TODO when asm parser is updated, shift display templates, etc, here --> 595bf215546Sopenharmony_ci</bitset> 596bf215546Sopenharmony_ci 597bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-2src" extends="#instruction-cat6-a3xx-atomic-local"> 598bf215546Sopenharmony_ci <!-- TODO when asm parser is updated, shift display templates, etc, here --> 599bf215546Sopenharmony_ci</bitset> 600bf215546Sopenharmony_ci 601bf215546Sopenharmony_ci<bitset name="atomic.add" extends="#instruction-cat6-a3xx-atomic-2src"> 602bf215546Sopenharmony_ci <pattern low="54" high="58">10000</pattern> <!-- OPC --> 603bf215546Sopenharmony_ci</bitset> 604bf215546Sopenharmony_ci 605bf215546Sopenharmony_ci<bitset name="atomic.sub" extends="#instruction-cat6-a3xx-atomic-2src"> 606bf215546Sopenharmony_ci <pattern low="54" high="58">10001</pattern> <!-- OPC --> 607bf215546Sopenharmony_ci</bitset> 608bf215546Sopenharmony_ci 609bf215546Sopenharmony_ci<bitset name="atomic.xchg" extends="#instruction-cat6-a3xx-atomic-2src"> 610bf215546Sopenharmony_ci <pattern low="54" high="58">10010</pattern> <!-- OPC --> 611bf215546Sopenharmony_ci</bitset> 612bf215546Sopenharmony_ci 613bf215546Sopenharmony_ci<bitset name="atomic.inc" extends="#instruction-cat6-a3xx-atomic-1src"> 614bf215546Sopenharmony_ci <pattern low="54" high="58">10011</pattern> <!-- OPC --> 615bf215546Sopenharmony_ci</bitset> 616bf215546Sopenharmony_ci 617bf215546Sopenharmony_ci<bitset name="atomic.dec" extends="#instruction-cat6-a3xx-atomic-1src"> 618bf215546Sopenharmony_ci <pattern low="54" high="58">10100</pattern> <!-- OPC --> 619bf215546Sopenharmony_ci</bitset> 620bf215546Sopenharmony_ci 621bf215546Sopenharmony_ci<bitset name="atomic.cmpxchg" extends="#instruction-cat6-a3xx-atomic-2src"> 622bf215546Sopenharmony_ci <pattern low="54" high="58">10101</pattern> <!-- OPC --> 623bf215546Sopenharmony_ci</bitset> 624bf215546Sopenharmony_ci 625bf215546Sopenharmony_ci<bitset name="atomic.min" extends="#instruction-cat6-a3xx-atomic-2src"> 626bf215546Sopenharmony_ci <pattern low="54" high="58">10110</pattern> <!-- OPC --> 627bf215546Sopenharmony_ci</bitset> 628bf215546Sopenharmony_ci 629bf215546Sopenharmony_ci<bitset name="atomic.max" extends="#instruction-cat6-a3xx-atomic-2src"> 630bf215546Sopenharmony_ci <pattern low="54" high="58">10111</pattern> <!-- OPC --> 631bf215546Sopenharmony_ci</bitset> 632bf215546Sopenharmony_ci 633bf215546Sopenharmony_ci<bitset name="atomic.and" extends="#instruction-cat6-a3xx-atomic-2src"> 634bf215546Sopenharmony_ci <pattern low="54" high="58">11000</pattern> <!-- OPC --> 635bf215546Sopenharmony_ci</bitset> 636bf215546Sopenharmony_ci 637bf215546Sopenharmony_ci<bitset name="atomic.or" extends="#instruction-cat6-a3xx-atomic-2src"> 638bf215546Sopenharmony_ci <pattern low="54" high="58">11001</pattern> <!-- OPC --> 639bf215546Sopenharmony_ci</bitset> 640bf215546Sopenharmony_ci 641bf215546Sopenharmony_ci<bitset name="atomic.xor" extends="#instruction-cat6-a3xx-atomic-2src"> 642bf215546Sopenharmony_ci <pattern low="54" high="58">11010</pattern> <!-- OPC --> 643bf215546Sopenharmony_ci</bitset> 644bf215546Sopenharmony_ci 645bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-global" extends="#instruction-cat6-a3xx-atomic"> 646bf215546Sopenharmony_ci <doc> 647bf215546Sopenharmony_ci Pre-a6xx atomics for Image/SSBO 648bf215546Sopenharmony_ci </doc> 649bf215546Sopenharmony_ci 650bf215546Sopenharmony_ci <gen max="599"/> 651bf215546Sopenharmony_ci 652bf215546Sopenharmony_ci <display> 653bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE}.g {DST}, g[{SSBO}], {SRC1}, {SRC2}, {SRC3} 654bf215546Sopenharmony_ci </display> 655bf215546Sopenharmony_ci 656bf215546Sopenharmony_ci <field low="1" high="8" name="SRC3" type="#reg-gpr"/> 657bf215546Sopenharmony_ci <field low="41" high="48" name="SSBO" type="#cat6-src"> <!-- SSBO/image binding point --> 658bf215546Sopenharmony_ci <param name="SSBO_IM" as="SRC_IM"/> 659bf215546Sopenharmony_ci </field> 660bf215546Sopenharmony_ci <pattern pos="52" >1</pattern> <!-- "G" --> 661bf215546Sopenharmony_ci <field pos="53" name="SSBO_IM" type="bool"/> 662bf215546Sopenharmony_ci 663bf215546Sopenharmony_ci <encode> 664bf215546Sopenharmony_ci <map name="SSBO">src->srcs[0]</map> 665bf215546Sopenharmony_ci <map name="SSBO_IM">!!(src->srcs[0]->flags & IR3_REG_IMMED)</map> 666bf215546Sopenharmony_ci <map name="SRC3">extract_cat6_SRC(src, 2)</map> 667bf215546Sopenharmony_ci <map name="SRC3_IM">!!(extract_cat6_SRC(src, 2)->flags & IR3_REG_IMMED)</map> 668bf215546Sopenharmony_ci </encode> 669bf215546Sopenharmony_ci</bitset> 670bf215546Sopenharmony_ci 671bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-global-a4xx" extends="#instruction-cat6-a3xx-atomic-global"> 672bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 673bf215546Sopenharmony_ci</bitset> 674bf215546Sopenharmony_ci 675bf215546Sopenharmony_ci<bitset name="atomic.s.add" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 676bf215546Sopenharmony_ci <gen max="499"/> 677bf215546Sopenharmony_ci <pattern low="54" high="58">10000</pattern> <!-- OPC --> 678bf215546Sopenharmony_ci</bitset> 679bf215546Sopenharmony_ci 680bf215546Sopenharmony_ci<bitset name="atomic.s.sub" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 681bf215546Sopenharmony_ci <gen max="499"/> 682bf215546Sopenharmony_ci <pattern low="54" high="58">10001</pattern> <!-- OPC --> 683bf215546Sopenharmony_ci</bitset> 684bf215546Sopenharmony_ci 685bf215546Sopenharmony_ci<bitset name="atomic.s.xchg" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 686bf215546Sopenharmony_ci <gen max="499"/> 687bf215546Sopenharmony_ci <pattern low="54" high="58">10010</pattern> <!-- OPC --> 688bf215546Sopenharmony_ci</bitset> 689bf215546Sopenharmony_ci 690bf215546Sopenharmony_ci<bitset name="atomic.s.inc" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 691bf215546Sopenharmony_ci <gen max="499"/> 692bf215546Sopenharmony_ci <pattern low="54" high="58">10011</pattern> <!-- OPC --> 693bf215546Sopenharmony_ci</bitset> 694bf215546Sopenharmony_ci 695bf215546Sopenharmony_ci<bitset name="atomic.s.dec" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 696bf215546Sopenharmony_ci <gen max="499"/> 697bf215546Sopenharmony_ci <pattern low="54" high="58">10100</pattern> <!-- OPC --> 698bf215546Sopenharmony_ci</bitset> 699bf215546Sopenharmony_ci 700bf215546Sopenharmony_ci<bitset name="atomic.s.cmpxchg" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 701bf215546Sopenharmony_ci <gen max="499"/> 702bf215546Sopenharmony_ci <pattern low="54" high="58">10101</pattern> <!-- OPC --> 703bf215546Sopenharmony_ci</bitset> 704bf215546Sopenharmony_ci 705bf215546Sopenharmony_ci<bitset name="atomic.s.min" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 706bf215546Sopenharmony_ci <gen max="499"/> 707bf215546Sopenharmony_ci <pattern low="54" high="58">10110</pattern> <!-- OPC --> 708bf215546Sopenharmony_ci</bitset> 709bf215546Sopenharmony_ci 710bf215546Sopenharmony_ci<bitset name="atomic.s.max" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 711bf215546Sopenharmony_ci <gen max="499"/> 712bf215546Sopenharmony_ci <pattern low="54" high="58">10111</pattern> <!-- OPC --> 713bf215546Sopenharmony_ci</bitset> 714bf215546Sopenharmony_ci 715bf215546Sopenharmony_ci<bitset name="atomic.s.and" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 716bf215546Sopenharmony_ci <gen max="499"/> 717bf215546Sopenharmony_ci <pattern low="54" high="58">11000</pattern> <!-- OPC --> 718bf215546Sopenharmony_ci</bitset> 719bf215546Sopenharmony_ci 720bf215546Sopenharmony_ci<bitset name="atomic.s.or" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 721bf215546Sopenharmony_ci <gen max="499"/> 722bf215546Sopenharmony_ci <pattern low="54" high="58">11001</pattern> <!-- OPC --> 723bf215546Sopenharmony_ci</bitset> 724bf215546Sopenharmony_ci 725bf215546Sopenharmony_ci<bitset name="atomic.s.xor" extends="#instruction-cat6-a3xx-atomic-global-a4xx"> 726bf215546Sopenharmony_ci <gen max="499"/> 727bf215546Sopenharmony_ci <pattern low="54" high="58">11010</pattern> <!-- OPC --> 728bf215546Sopenharmony_ci</bitset> 729bf215546Sopenharmony_ci 730bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a3xx-atomic-global-a5xx" extends="#instruction-cat6-a3xx-atomic-global"> 731bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> 732bf215546Sopenharmony_ci</bitset> 733bf215546Sopenharmony_ci 734bf215546Sopenharmony_ci<bitset name="atomic.s.add" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 735bf215546Sopenharmony_ci <gen min="500"/> 736bf215546Sopenharmony_ci <pattern low="54" high="58">10000</pattern> <!-- OPC --> 737bf215546Sopenharmony_ci</bitset> 738bf215546Sopenharmony_ci 739bf215546Sopenharmony_ci<bitset name="atomic.s.sub" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 740bf215546Sopenharmony_ci <gen min="500"/> 741bf215546Sopenharmony_ci <pattern low="54" high="58">10001</pattern> <!-- OPC --> 742bf215546Sopenharmony_ci</bitset> 743bf215546Sopenharmony_ci 744bf215546Sopenharmony_ci<bitset name="atomic.s.xchg" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 745bf215546Sopenharmony_ci <gen min="500"/> 746bf215546Sopenharmony_ci <pattern low="54" high="58">10010</pattern> <!-- OPC --> 747bf215546Sopenharmony_ci</bitset> 748bf215546Sopenharmony_ci 749bf215546Sopenharmony_ci<bitset name="atomic.s.inc" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 750bf215546Sopenharmony_ci <gen min="500"/> 751bf215546Sopenharmony_ci <pattern low="54" high="58">10011</pattern> <!-- OPC --> 752bf215546Sopenharmony_ci</bitset> 753bf215546Sopenharmony_ci 754bf215546Sopenharmony_ci<bitset name="atomic.s.dec" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 755bf215546Sopenharmony_ci <gen min="500"/> 756bf215546Sopenharmony_ci <pattern low="54" high="58">10100</pattern> <!-- OPC --> 757bf215546Sopenharmony_ci</bitset> 758bf215546Sopenharmony_ci 759bf215546Sopenharmony_ci<bitset name="atomic.s.cmpxchg" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 760bf215546Sopenharmony_ci <gen min="500"/> 761bf215546Sopenharmony_ci <pattern low="54" high="58">10101</pattern> <!-- OPC --> 762bf215546Sopenharmony_ci</bitset> 763bf215546Sopenharmony_ci 764bf215546Sopenharmony_ci<bitset name="atomic.s.min" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 765bf215546Sopenharmony_ci <gen min="500"/> 766bf215546Sopenharmony_ci <pattern low="54" high="58">10110</pattern> <!-- OPC --> 767bf215546Sopenharmony_ci</bitset> 768bf215546Sopenharmony_ci 769bf215546Sopenharmony_ci<bitset name="atomic.s.max" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 770bf215546Sopenharmony_ci <gen min="500"/> 771bf215546Sopenharmony_ci <pattern low="54" high="58">10111</pattern> <!-- OPC --> 772bf215546Sopenharmony_ci</bitset> 773bf215546Sopenharmony_ci 774bf215546Sopenharmony_ci<bitset name="atomic.s.and" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 775bf215546Sopenharmony_ci <gen min="500"/> 776bf215546Sopenharmony_ci <pattern low="54" high="58">11000</pattern> <!-- OPC --> 777bf215546Sopenharmony_ci</bitset> 778bf215546Sopenharmony_ci 779bf215546Sopenharmony_ci<bitset name="atomic.s.or" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 780bf215546Sopenharmony_ci <gen min="500"/> 781bf215546Sopenharmony_ci <pattern low="54" high="58">11001</pattern> <!-- OPC --> 782bf215546Sopenharmony_ci</bitset> 783bf215546Sopenharmony_ci 784bf215546Sopenharmony_ci<bitset name="atomic.s.xor" extends="#instruction-cat6-a3xx-atomic-global-a5xx"> 785bf215546Sopenharmony_ci <gen min="500"/> 786bf215546Sopenharmony_ci <pattern low="54" high="58">11010</pattern> <!-- OPC --> 787bf215546Sopenharmony_ci</bitset> 788bf215546Sopenharmony_ci 789bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a6xx-atomic-global" extends="#instruction-cat6-a3xx-atomic"> 790bf215546Sopenharmony_ci <doc> 791bf215546Sopenharmony_ci a6xx+ global atomics which take iova in SRC1 792bf215546Sopenharmony_ci </doc> 793bf215546Sopenharmony_ci 794bf215546Sopenharmony_ci <gen min="600"/> 795bf215546Sopenharmony_ci 796bf215546Sopenharmony_ci <display> 797bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE}.g {DST}, {SRC1}, {SRC2} 798bf215546Sopenharmony_ci </display> 799bf215546Sopenharmony_ci 800bf215546Sopenharmony_ci <pattern pos="0" >1</pattern> 801bf215546Sopenharmony_ci <pattern low="1" high="8" >00000000</pattern> <!-- SRC3 --> 802bf215546Sopenharmony_ci <pattern low="41" high="48" >00000000</pattern> <!-- SSBO/image binding point --> 803bf215546Sopenharmony_ci <pattern pos="52" >1</pattern> <!-- "G" --> 804bf215546Sopenharmony_ci <pattern pos="53" >0</pattern> <!-- SSBO_IM --> 805bf215546Sopenharmony_ci</bitset> 806bf215546Sopenharmony_ci 807bf215546Sopenharmony_ci<bitset name="atomic.g.add" extends="#instruction-cat6-a6xx-atomic-global"> 808bf215546Sopenharmony_ci <pattern low="54" high="58">10000</pattern> <!-- OPC --> 809bf215546Sopenharmony_ci</bitset> 810bf215546Sopenharmony_ci 811bf215546Sopenharmony_ci<bitset name="atomic.g.sub" extends="#instruction-cat6-a6xx-atomic-global"> 812bf215546Sopenharmony_ci <pattern low="54" high="58">10001</pattern> <!-- OPC --> 813bf215546Sopenharmony_ci</bitset> 814bf215546Sopenharmony_ci 815bf215546Sopenharmony_ci<bitset name="atomic.g.xchg" extends="#instruction-cat6-a6xx-atomic-global"> 816bf215546Sopenharmony_ci <pattern low="54" high="58">10010</pattern> <!-- OPC --> 817bf215546Sopenharmony_ci</bitset> 818bf215546Sopenharmony_ci 819bf215546Sopenharmony_ci<bitset name="atomic.g.inc" extends="#instruction-cat6-a6xx-atomic-global"> 820bf215546Sopenharmony_ci <pattern low="54" high="58">10011</pattern> <!-- OPC --> 821bf215546Sopenharmony_ci</bitset> 822bf215546Sopenharmony_ci 823bf215546Sopenharmony_ci<bitset name="atomic.g.dec" extends="#instruction-cat6-a6xx-atomic-global"> 824bf215546Sopenharmony_ci <pattern low="54" high="58">10100</pattern> <!-- OPC --> 825bf215546Sopenharmony_ci</bitset> 826bf215546Sopenharmony_ci 827bf215546Sopenharmony_ci<bitset name="atomic.g.cmpxchg" extends="#instruction-cat6-a6xx-atomic-global"> 828bf215546Sopenharmony_ci <pattern low="54" high="58">10101</pattern> <!-- OPC --> 829bf215546Sopenharmony_ci</bitset> 830bf215546Sopenharmony_ci 831bf215546Sopenharmony_ci<bitset name="atomic.g.min" extends="#instruction-cat6-a6xx-atomic-global"> 832bf215546Sopenharmony_ci <pattern low="54" high="58">10110</pattern> <!-- OPC --> 833bf215546Sopenharmony_ci</bitset> 834bf215546Sopenharmony_ci 835bf215546Sopenharmony_ci<bitset name="atomic.g.max" extends="#instruction-cat6-a6xx-atomic-global"> 836bf215546Sopenharmony_ci <pattern low="54" high="58">10111</pattern> <!-- OPC --> 837bf215546Sopenharmony_ci</bitset> 838bf215546Sopenharmony_ci 839bf215546Sopenharmony_ci<bitset name="atomic.g.and" extends="#instruction-cat6-a6xx-atomic-global"> 840bf215546Sopenharmony_ci <pattern low="54" high="58">11000</pattern> <!-- OPC --> 841bf215546Sopenharmony_ci</bitset> 842bf215546Sopenharmony_ci 843bf215546Sopenharmony_ci<bitset name="atomic.g.or" extends="#instruction-cat6-a6xx-atomic-global"> 844bf215546Sopenharmony_ci <pattern low="54" high="58">11001</pattern> <!-- OPC --> 845bf215546Sopenharmony_ci</bitset> 846bf215546Sopenharmony_ci 847bf215546Sopenharmony_ci<bitset name="atomic.g.xor" extends="#instruction-cat6-a6xx-atomic-global"> 848bf215546Sopenharmony_ci <pattern low="54" high="58">11010</pattern> <!-- OPC --> 849bf215546Sopenharmony_ci</bitset> 850bf215546Sopenharmony_ci 851bf215546Sopenharmony_ci<!-- 852bf215546Sopenharmony_ci New a6xx+ encodings for potentially bindless image/ssbo: 853bf215546Sopenharmony_ci --> 854bf215546Sopenharmony_ci 855bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a6xx" extends="#instruction-cat6"> 856bf215546Sopenharmony_ci <doc> 857bf215546Sopenharmony_ci Base for new instruction encoding that started being used 858bf215546Sopenharmony_ci with a6xx for instructions supporting bindless mode. 859bf215546Sopenharmony_ci </doc> 860bf215546Sopenharmony_ci <gen min="600"/> 861bf215546Sopenharmony_ci 862bf215546Sopenharmony_ci <derived name="TYPE_SIZE" expr="#cat6-type-size" type="uint"/> 863bf215546Sopenharmony_ci 864bf215546Sopenharmony_ci <field low="1" high="3" name="BASE" type="#cat6-base"> 865bf215546Sopenharmony_ci <param name="BINDLESS"/> 866bf215546Sopenharmony_ci </field> 867bf215546Sopenharmony_ci <pattern low="4" high="5" >00</pattern> 868bf215546Sopenharmony_ci <field low="6" high="7" name="MODE" type="#cat6-src-mode"/> 869bf215546Sopenharmony_ci <field pos="8" name="BINDLESS" type="bool"/> 870bf215546Sopenharmony_ci <field low="12" high="13" name="TYPE_SIZE_MINUS_ONE" type="uint"/> 871bf215546Sopenharmony_ci <pattern pos="40" >0</pattern> 872bf215546Sopenharmony_ci <pattern low="54" high="58">00000</pattern> 873bf215546Sopenharmony_ci <encode> 874bf215546Sopenharmony_ci <map name="MODE">extract_cat6_DESC_MODE(src)</map> 875bf215546Sopenharmony_ci <map name="TYPE_SIZE_MINUS_ONE">src->cat6.iim_val - 1</map> 876bf215546Sopenharmony_ci <map name="BINDLESS">!!(src->flags & IR3_INSTR_B)</map> 877bf215546Sopenharmony_ci <map name="BASE">src</map> 878bf215546Sopenharmony_ci </encode> 879bf215546Sopenharmony_ci</bitset> 880bf215546Sopenharmony_ci 881bf215546Sopenharmony_ci<bitset name="#cat6-ldc-common" extends="#instruction-cat6-a6xx"> 882bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 883bf215546Sopenharmony_ci <pattern pos="11" >x</pattern> <!-- TYPED --> 884bf215546Sopenharmony_ci <pattern low="14" high="19">011110</pattern> <!-- OPC --> 885bf215546Sopenharmony_ci <pattern low="20" high="22">1xx</pattern> 886bf215546Sopenharmony_ci <field pos="23" name="SRC1_IM" type="bool"/> 887bf215546Sopenharmony_ci <derived name="SRC2_IM" expr="#cat6-direct" type="bool"/> 888bf215546Sopenharmony_ci <field low="41" high="48" name="SRC2" type="#cat6-src"> 889bf215546Sopenharmony_ci <param name="SRC2_IM" as="SRC_IM"/> 890bf215546Sopenharmony_ci </field> 891bf215546Sopenharmony_ci <field low="24" high="31" name="SRC1" type="#cat6-src"> 892bf215546Sopenharmony_ci <param name="SRC1_IM" as="SRC_IM"/> 893bf215546Sopenharmony_ci </field> 894bf215546Sopenharmony_ci <pattern low="49" high="51">x11</pattern> <!-- TYPE --> 895bf215546Sopenharmony_ci <encode> 896bf215546Sopenharmony_ci <map name="SRC1_IM">!!(src->srcs[1]->flags & IR3_REG_IMMED)</map> 897bf215546Sopenharmony_ci <map name="SRC1">src->srcs[1]</map> 898bf215546Sopenharmony_ci <map name="SRC2">src->srcs[0]</map> 899bf215546Sopenharmony_ci </encode> 900bf215546Sopenharmony_ci</bitset> 901bf215546Sopenharmony_ci 902bf215546Sopenharmony_ci<bitset name="ldc.k" extends="#cat6-ldc-common"> 903bf215546Sopenharmony_ci <doc> 904bf215546Sopenharmony_ci ldc.k copies a series of UBO values to constants. In other 905bf215546Sopenharmony_ci words, it acts the same as a series of ldc followed by stc. It's 906bf215546Sopenharmony_ci also similar to a CP_LOAD_STATE with a UBO source but executed 907bf215546Sopenharmony_ci in the shader. 908bf215546Sopenharmony_ci 909bf215546Sopenharmony_ci Like CP_LOAD_STATE, the UBO offset and const file offset must be 910bf215546Sopenharmony_ci a multiple of 4 vec4's but it can load any number of vec4's. The 911bf215546Sopenharmony_ci UBO descriptor and offset are the same as a normal ldc. The 912bf215546Sopenharmony_ci const file offset is specified in a1.x and is in units of 913bf215546Sopenharmony_ci components, and the number of vec4's to copy is specified in 914bf215546Sopenharmony_ci LOAD_SIZE. 915bf215546Sopenharmony_ci </doc> 916bf215546Sopenharmony_ci <display> 917bf215546Sopenharmony_ci {SY}{JP}ldc.{LOAD_SIZE}.k.{MODE}{BASE} c[a1.x], {SRC1}, {SRC2} 918bf215546Sopenharmony_ci </display> 919bf215546Sopenharmony_ci 920bf215546Sopenharmony_ci <derived name="LOAD_SIZE" expr="#cat6-load-size" type="uint"/> 921bf215546Sopenharmony_ci 922bf215546Sopenharmony_ci <field low="32" high="39" name="LOAD_SIZE_MINUS_ONE" type="uint"/> 923bf215546Sopenharmony_ci <pattern low="9" high="10">xx</pattern> <!-- D_MINUS_ONE --> 924bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 925bf215546Sopenharmony_ci 926bf215546Sopenharmony_ci <encode> 927bf215546Sopenharmony_ci <map name="LOAD_SIZE_MINUS_ONE">src->cat6.iim_val - 1</map> 928bf215546Sopenharmony_ci </encode> 929bf215546Sopenharmony_ci</bitset> 930bf215546Sopenharmony_ci 931bf215546Sopenharmony_ci<bitset name="ldc" extends="#cat6-ldc-common"> 932bf215546Sopenharmony_ci <doc> 933bf215546Sopenharmony_ci LoaD Constant - UBO load 934bf215546Sopenharmony_ci </doc> 935bf215546Sopenharmony_ci <!-- 936bf215546Sopenharmony_ci TODO are these *really* all bindless? Or does that bit have a different 937bf215546Sopenharmony_ci meaning? Maybe I don't have enough ldc examples from deqp-glesN 938bf215546Sopenharmony_ci --> 939bf215546Sopenharmony_ci <display> 940bf215546Sopenharmony_ci {SY}{JP}{NAME}.offset{OFFSET}.{TYPE_SIZE}.{MODE}{BASE} {DST}, {SRC1}, {SRC2} 941bf215546Sopenharmony_ci </display> 942bf215546Sopenharmony_ci <field low="9" high="10" name="OFFSET" type="uint"/> <!-- D_MINUS_ONE --> 943bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 944bf215546Sopenharmony_ci <pattern low="52" high="53">10</pattern> 945bf215546Sopenharmony_ci <encode> 946bf215546Sopenharmony_ci <map name="OFFSET">src->cat6.d</map> 947bf215546Sopenharmony_ci </encode> 948bf215546Sopenharmony_ci</bitset> 949bf215546Sopenharmony_ci 950bf215546Sopenharmony_ci<bitset name="getspid" extends="#instruction-cat6-a6xx"> 951bf215546Sopenharmony_ci <doc> 952bf215546Sopenharmony_ci GET Shader Processor ID? 953bf215546Sopenharmony_ci </doc> 954bf215546Sopenharmony_ci <display> 955bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST} 956bf215546Sopenharmony_ci </display> 957bf215546Sopenharmony_ci 958bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 959bf215546Sopenharmony_ci <pattern low="9" high="10">xx</pattern> <!-- D_MINUS_ONE --> 960bf215546Sopenharmony_ci <pattern pos="11" >x</pattern> <!-- TYPED --> 961bf215546Sopenharmony_ci <pattern low="14" high="19">100100</pattern> <!-- OPC --> 962bf215546Sopenharmony_ci <pattern low="20" high="23">x1xx</pattern> 963bf215546Sopenharmony_ci <pattern low="24" high="31">xxxxxxxx</pattern> <!-- SRC2 --> 964bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 965bf215546Sopenharmony_ci <pattern low="41" high="48">xxxxxxxx</pattern> <!-- SSBO/image binding point --> 966bf215546Sopenharmony_ci <field low="49" high="51" name="TYPE" type="#type"/> 967bf215546Sopenharmony_ci <pattern low="52" high="53">1x</pattern> 968bf215546Sopenharmony_ci</bitset> 969bf215546Sopenharmony_ci 970bf215546Sopenharmony_ci<bitset name="getwid" extends="#instruction-cat6-a6xx"> 971bf215546Sopenharmony_ci <doc> 972bf215546Sopenharmony_ci GET Wavefront ID 973bf215546Sopenharmony_ci </doc> 974bf215546Sopenharmony_ci <display> 975bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST} 976bf215546Sopenharmony_ci </display> 977bf215546Sopenharmony_ci 978bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 979bf215546Sopenharmony_ci <pattern low="9" high="10">xx</pattern> <!-- D_MINUS_ONE --> 980bf215546Sopenharmony_ci <pattern pos="11" >x</pattern> <!-- TYPED --> 981bf215546Sopenharmony_ci <pattern low="14" high="19">100101</pattern> <!-- OPC --> 982bf215546Sopenharmony_ci <pattern low="20" high="23">x1xx</pattern> 983bf215546Sopenharmony_ci <pattern low="24" high="31">xxxxxxxx</pattern> <!-- SRC2 --> 984bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 985bf215546Sopenharmony_ci <pattern low="41" high="48">xxxxxxxx</pattern> <!-- SSBO/image binding point --> 986bf215546Sopenharmony_ci <field low="49" high="51" name="TYPE" type="#type"/> 987bf215546Sopenharmony_ci <pattern low="52" high="53">1x</pattern> 988bf215546Sopenharmony_ci</bitset> 989bf215546Sopenharmony_ci 990bf215546Sopenharmony_ci<bitset name="getfiberid" extends="#instruction-cat6-a6xx"> 991bf215546Sopenharmony_ci <doc> 992bf215546Sopenharmony_ci GET Fiber ID (gl_SubgroupID) 993bf215546Sopenharmony_ci </doc> 994bf215546Sopenharmony_ci 995bf215546Sopenharmony_ci <gen min="600"/> 996bf215546Sopenharmony_ci 997bf215546Sopenharmony_ci <display> 998bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPE} {DST} 999bf215546Sopenharmony_ci </display> 1000bf215546Sopenharmony_ci 1001bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 1002bf215546Sopenharmony_ci <pattern low="9" high="10">xx</pattern> <!-- D_MINUS_ONE --> 1003bf215546Sopenharmony_ci <pattern pos="11" >x</pattern> <!-- TYPED --> 1004bf215546Sopenharmony_ci <pattern low="14" high="19">100110</pattern> <!-- OPC --> 1005bf215546Sopenharmony_ci <pattern low="20" high="23">11xx</pattern> 1006bf215546Sopenharmony_ci <pattern low="24" high="31">xxxxxxxx</pattern> <!-- SRC2 --> 1007bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 1008bf215546Sopenharmony_ci <pattern low="41" high="48">xxxxxxxx</pattern> <!-- SSBO/image binding point --> 1009bf215546Sopenharmony_ci <field low="49" high="51" name="TYPE" type="#type"/> 1010bf215546Sopenharmony_ci <pattern low="52" high="53">1x</pattern> 1011bf215546Sopenharmony_ci</bitset> 1012bf215546Sopenharmony_ci 1013bf215546Sopenharmony_ci<bitset name="resinfo.b" extends="#instruction-cat6-a6xx"> 1014bf215546Sopenharmony_ci <doc> 1015bf215546Sopenharmony_ci RESourceINFO - returns image/ssbo dimensions (3 components) 1016bf215546Sopenharmony_ci </doc> 1017bf215546Sopenharmony_ci <display> 1018bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE}.{MODE}{BASE} {DST}, {SSBO} 1019bf215546Sopenharmony_ci </display> 1020bf215546Sopenharmony_ci 1021bf215546Sopenharmony_ci <derived name="D" expr="#cat6-d" type="uint"/> 1022bf215546Sopenharmony_ci <derived name="TRUE" expr="#true" type="bool"/> 1023bf215546Sopenharmony_ci 1024bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 1025bf215546Sopenharmony_ci <field low="9" high="10" name="D_MINUS_ONE" type="uint"/> 1026bf215546Sopenharmony_ci <field pos="11" name="TYPED" type="#cat6-typed"/> 1027bf215546Sopenharmony_ci <pattern low="14" high="19">001111</pattern> <!-- OPC --> 1028bf215546Sopenharmony_ci <pattern low="20" high="23">0110</pattern> 1029bf215546Sopenharmony_ci <pattern low="24" high="31">xxxxxxxx</pattern> <!-- SRC2 --> 1030bf215546Sopenharmony_ci <field low="32" high="39" name="DST" type="#reg-gpr"/> 1031bf215546Sopenharmony_ci <field low="41" high="48" name="SSBO" type="#cat6-src"> <!-- SSBO/image binding point --> 1032bf215546Sopenharmony_ci <param name="SSBO_IM" as="SRC_IM"/> 1033bf215546Sopenharmony_ci </field> 1034bf215546Sopenharmony_ci <derived name="SSBO_IM" expr="#cat6-direct" type="bool"/> 1035bf215546Sopenharmony_ci <field low="49" high="51" name="TYPE" type="#type"/> 1036bf215546Sopenharmony_ci <pattern low="52" high="53">1x</pattern> 1037bf215546Sopenharmony_ci <encode> 1038bf215546Sopenharmony_ci <map name="D_MINUS_ONE">src->cat6.d - 1</map> 1039bf215546Sopenharmony_ci <map name="TYPED">src</map> 1040bf215546Sopenharmony_ci <map name="SSBO">src->srcs[0]</map> 1041bf215546Sopenharmony_ci <map name="SRC1">src->srcs[1]</map> 1042bf215546Sopenharmony_ci </encode> 1043bf215546Sopenharmony_ci</bitset> 1044bf215546Sopenharmony_ci 1045bf215546Sopenharmony_ci<bitset name="#instruction-cat6-a6xx-ibo" extends="#instruction-cat6-a6xx"> 1046bf215546Sopenharmony_ci <doc> 1047bf215546Sopenharmony_ci IBO (ie. Image/SSBO) instructions 1048bf215546Sopenharmony_ci </doc> 1049bf215546Sopenharmony_ci <display> 1050bf215546Sopenharmony_ci {SY}{JP}{NAME}.{TYPED}.{D}d.{TYPE}.{TYPE_SIZE}.{MODE}{BASE} {TYPE_HALF}{SRC1}, {SRC2}, {SSBO} 1051bf215546Sopenharmony_ci </display> 1052bf215546Sopenharmony_ci 1053bf215546Sopenharmony_ci <derived name="D" expr="#cat6-d" type="uint"/> 1054bf215546Sopenharmony_ci <derived name="TRUE" expr="#true" type="bool"/> 1055bf215546Sopenharmony_ci 1056bf215546Sopenharmony_ci <field low="9" high="10" name="D_MINUS_ONE" type="uint"/> 1057bf215546Sopenharmony_ci <field pos="11" name="TYPED" type="#cat6-typed"/> 1058bf215546Sopenharmony_ci <pattern low="20" high="23">0110</pattern> 1059bf215546Sopenharmony_ci <field low="24" high="31" name="SRC2" type="#reg-gpr"/> 1060bf215546Sopenharmony_ci <field low="32" high="39" name="SRC1" type="#reg-gpr"/> 1061bf215546Sopenharmony_ci <field low="41" high="48" name="SSBO" type="#cat6-src"> <!-- SSBO/image binding point --> 1062bf215546Sopenharmony_ci <param name="SSBO_IM" as="SRC_IM"/> 1063bf215546Sopenharmony_ci </field> 1064bf215546Sopenharmony_ci <derived name="SSBO_IM" expr="#cat6-direct" type="bool"/> 1065bf215546Sopenharmony_ci <field low="49" high="51" name="TYPE" type="#type"/> 1066bf215546Sopenharmony_ci <encode> 1067bf215546Sopenharmony_ci <map name="TYPED">src</map> 1068bf215546Sopenharmony_ci <map name="D_MINUS_ONE">src->cat6.d - 1</map> 1069bf215546Sopenharmony_ci <map name="SSBO">src->srcs[0]</map> 1070bf215546Sopenharmony_ci <map name="SRC1">src->srcs[2]</map> 1071bf215546Sopenharmony_ci <map name="SRC2">src->srcs[1]</map> 1072bf215546Sopenharmony_ci </encode> 1073bf215546Sopenharmony_ci</bitset> 1074bf215546Sopenharmony_ci 1075bf215546Sopenharmony_ci<bitset name="stib.b" extends="#instruction-cat6-a6xx-ibo"> 1076bf215546Sopenharmony_ci <doc> 1077bf215546Sopenharmony_ci STore IBo 1078bf215546Sopenharmony_ci </doc> 1079bf215546Sopenharmony_ci <pattern pos="0" >0</pattern> 1080bf215546Sopenharmony_ci <pattern low="14" high="19">011101</pattern> <!-- OPC --> 1081bf215546Sopenharmony_ci <pattern low="52" high="53">10</pattern> 1082bf215546Sopenharmony_ci</bitset> 1083bf215546Sopenharmony_ci 1084bf215546Sopenharmony_ci<bitset name="ldib.b" extends="#instruction-cat6-a6xx-ibo"> 1085bf215546Sopenharmony_ci <doc> 1086bf215546Sopenharmony_ci LoaD IBo 1087bf215546Sopenharmony_ci </doc> 1088bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> <!-- blob seems to set randomly? --> 1089bf215546Sopenharmony_ci <pattern low="14" high="19">000110</pattern> <!-- OPC --> 1090bf215546Sopenharmony_ci <pattern low="52" high="53">10</pattern> 1091bf215546Sopenharmony_ci <encode> 1092bf215546Sopenharmony_ci <map name="SRC1">src->dsts[0]</map> 1093bf215546Sopenharmony_ci </encode> 1094bf215546Sopenharmony_ci</bitset> 1095bf215546Sopenharmony_ci 1096bf215546Sopenharmony_ci<bitset name="atomic.b.add" extends="#instruction-cat6-a6xx-ibo"> 1097bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1098bf215546Sopenharmony_ci <pattern low="14" high="19">010000</pattern> <!-- OPC --> 1099bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1100bf215546Sopenharmony_ci</bitset> 1101bf215546Sopenharmony_ci 1102bf215546Sopenharmony_ci<bitset name="atomic.b.sub" extends="#instruction-cat6-a6xx-ibo"> 1103bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1104bf215546Sopenharmony_ci <pattern low="14" high="19">010001</pattern> <!-- OPC --> 1105bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1106bf215546Sopenharmony_ci</bitset> 1107bf215546Sopenharmony_ci 1108bf215546Sopenharmony_ci<bitset name="atomic.b.xchg" extends="#instruction-cat6-a6xx-ibo"> 1109bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1110bf215546Sopenharmony_ci <pattern low="14" high="19">010010</pattern> <!-- OPC --> 1111bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1112bf215546Sopenharmony_ci</bitset> 1113bf215546Sopenharmony_ci 1114bf215546Sopenharmony_ci<!-- inc/dec? --> 1115bf215546Sopenharmony_ci 1116bf215546Sopenharmony_ci<bitset name="atomic.b.cmpxchg" extends="#instruction-cat6-a6xx-ibo"> 1117bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1118bf215546Sopenharmony_ci <pattern low="14" high="19">010101</pattern> <!-- OPC --> 1119bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1120bf215546Sopenharmony_ci</bitset> 1121bf215546Sopenharmony_ci 1122bf215546Sopenharmony_ci<bitset name="atomic.b.min" extends="#instruction-cat6-a6xx-ibo"> 1123bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1124bf215546Sopenharmony_ci <pattern low="14" high="19">010110</pattern> <!-- OPC --> 1125bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1126bf215546Sopenharmony_ci</bitset> 1127bf215546Sopenharmony_ci 1128bf215546Sopenharmony_ci<bitset name="atomic.b.max" extends="#instruction-cat6-a6xx-ibo"> 1129bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1130bf215546Sopenharmony_ci <pattern low="14" high="19">010111</pattern> <!-- OPC --> 1131bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1132bf215546Sopenharmony_ci</bitset> 1133bf215546Sopenharmony_ci 1134bf215546Sopenharmony_ci<bitset name="atomic.b.and" extends="#instruction-cat6-a6xx-ibo"> 1135bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1136bf215546Sopenharmony_ci <pattern low="14" high="19">011000</pattern> <!-- OPC --> 1137bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1138bf215546Sopenharmony_ci</bitset> 1139bf215546Sopenharmony_ci 1140bf215546Sopenharmony_ci<bitset name="atomic.b.or" extends="#instruction-cat6-a6xx-ibo"> 1141bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1142bf215546Sopenharmony_ci <pattern low="14" high="19">011001</pattern> <!-- OPC --> 1143bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1144bf215546Sopenharmony_ci</bitset> 1145bf215546Sopenharmony_ci 1146bf215546Sopenharmony_ci<bitset name="atomic.b.xor" extends="#instruction-cat6-a6xx-ibo"> 1147bf215546Sopenharmony_ci <pattern pos="0" >x</pattern> 1148bf215546Sopenharmony_ci <pattern low="14" high="19">011010</pattern> <!-- OPC --> 1149bf215546Sopenharmony_ci <pattern low="52" high="53">11</pattern> 1150bf215546Sopenharmony_ci</bitset> 1151bf215546Sopenharmony_ci 1152bf215546Sopenharmony_ci 1153bf215546Sopenharmony_ci 1154bf215546Sopenharmony_ci<expr name="#cat6-d"> 1155bf215546Sopenharmony_ci {D_MINUS_ONE} + 1 1156bf215546Sopenharmony_ci</expr> 1157bf215546Sopenharmony_ci 1158bf215546Sopenharmony_ci<expr name="#cat6-type-size"> 1159bf215546Sopenharmony_ci {TYPE_SIZE_MINUS_ONE} + 1 1160bf215546Sopenharmony_ci</expr> 1161bf215546Sopenharmony_ci 1162bf215546Sopenharmony_ci<expr name="#cat6-load-size"> 1163bf215546Sopenharmony_ci {LOAD_SIZE_MINUS_ONE} + 1 1164bf215546Sopenharmony_ci</expr> 1165bf215546Sopenharmony_ci 1166bf215546Sopenharmony_ci<bitset name="#cat6-typed" size="1"> 1167bf215546Sopenharmony_ci <override> 1168bf215546Sopenharmony_ci <expr>{TYPED}</expr> 1169bf215546Sopenharmony_ci <display> 1170bf215546Sopenharmony_ci typed 1171bf215546Sopenharmony_ci </display> 1172bf215546Sopenharmony_ci </override> 1173bf215546Sopenharmony_ci <display> 1174bf215546Sopenharmony_ci untyped 1175bf215546Sopenharmony_ci </display> 1176bf215546Sopenharmony_ci <field name="TYPED" pos="0" type="bool"/> 1177bf215546Sopenharmony_ci <encode type="struct ir3_instruction *"> 1178bf215546Sopenharmony_ci <map name="TYPED" force="true">src->cat6.typed</map> 1179bf215546Sopenharmony_ci </encode> 1180bf215546Sopenharmony_ci</bitset> 1181bf215546Sopenharmony_ci 1182bf215546Sopenharmony_ci<bitset name="#cat6-base" size="3"> 1183bf215546Sopenharmony_ci <override> 1184bf215546Sopenharmony_ci <expr>{BINDLESS}</expr> 1185bf215546Sopenharmony_ci <display> 1186bf215546Sopenharmony_ci .base{BASE} 1187bf215546Sopenharmony_ci </display> 1188bf215546Sopenharmony_ci </override> 1189bf215546Sopenharmony_ci <display/> 1190bf215546Sopenharmony_ci <field name="BASE" low="0" high="2" type="uint"/> 1191bf215546Sopenharmony_ci <encode type="struct ir3_instruction *"> 1192bf215546Sopenharmony_ci <map name="BASE">src->cat6.base</map> 1193bf215546Sopenharmony_ci </encode> 1194bf215546Sopenharmony_ci</bitset> 1195bf215546Sopenharmony_ci 1196bf215546Sopenharmony_ci<bitset name="#cat6-src" size="8"> 1197bf215546Sopenharmony_ci <doc> 1198bf215546Sopenharmony_ci Source value that can be either immed or gpr 1199bf215546Sopenharmony_ci </doc> 1200bf215546Sopenharmony_ci <override> 1201bf215546Sopenharmony_ci <expr>{SRC_IM}</expr> 1202bf215546Sopenharmony_ci <display> 1203bf215546Sopenharmony_ci {IMMED} 1204bf215546Sopenharmony_ci </display> 1205bf215546Sopenharmony_ci <field name="IMMED" low="0" high="7" type="uint"/> 1206bf215546Sopenharmony_ci </override> 1207bf215546Sopenharmony_ci <display> 1208bf215546Sopenharmony_ci r{GPR}.{SWIZ} 1209bf215546Sopenharmony_ci </display> 1210bf215546Sopenharmony_ci <field name="SWIZ" low="0" high="1" type="#swiz"/> 1211bf215546Sopenharmony_ci <field name="GPR" low="2" high="7" type="uint"/> 1212bf215546Sopenharmony_ci <encode type="struct ir3_register *"> 1213bf215546Sopenharmony_ci <map name="GPR">src->num >> 2</map> 1214bf215546Sopenharmony_ci <map name="SWIZ">src->num & 0x3</map> 1215bf215546Sopenharmony_ci <map name="IMMED">extract_reg_iim(src)</map> 1216bf215546Sopenharmony_ci </encode> 1217bf215546Sopenharmony_ci</bitset> 1218bf215546Sopenharmony_ci 1219bf215546Sopenharmony_ci<expr name="#cat6-direct"> 1220bf215546Sopenharmony_ci {MODE} == 0 1221bf215546Sopenharmony_ci</expr> 1222bf215546Sopenharmony_ci 1223bf215546Sopenharmony_ci<enum name="#cat6-src-mode"> 1224bf215546Sopenharmony_ci <doc> 1225bf215546Sopenharmony_ci Source mode for "new" a6xx+ instruction encodings 1226bf215546Sopenharmony_ci </doc> 1227bf215546Sopenharmony_ci <value val="0" display="imm"> 1228bf215546Sopenharmony_ci <doc> 1229bf215546Sopenharmony_ci Immediate index. 1230bf215546Sopenharmony_ci </doc> 1231bf215546Sopenharmony_ci </value> 1232bf215546Sopenharmony_ci <value val="1" display="uniform"> 1233bf215546Sopenharmony_ci <doc> 1234bf215546Sopenharmony_ci Index from a uniform register (ie. does not depend on flow control) 1235bf215546Sopenharmony_ci </doc> 1236bf215546Sopenharmony_ci </value> 1237bf215546Sopenharmony_ci <value val="2" display="nonuniform"> 1238bf215546Sopenharmony_ci <doc> 1239bf215546Sopenharmony_ci Index from a non-uniform register (ie. potentially depends on flow control) 1240bf215546Sopenharmony_ci </doc> 1241bf215546Sopenharmony_ci </value> 1242bf215546Sopenharmony_ci</enum> 1243bf215546Sopenharmony_ci 1244bf215546Sopenharmony_ci</isa> 1245