diff options
author | Christian Gmeiner <cgmeiner@igalia.com> | 2024-04-17 10:47:56 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-07-03 00:07:54 +0000 |
commit | 59406a9d85b42e9f8f86c970d5b1dc87bbaf6061 (patch) | |
tree | bd12f17084ca6c18eb0b14bba0411ede1399c06d /src/etnaviv | |
parent | 9e3e12e6a97a5412ab12d64b41045f040f4c4bbd (diff) |
etnaviv: isa: Add meta elements to instructions
This commits adds a meta elements with the following attributes:
- has_dest: does the instruction has a dest register?
- valid_srcs: which sources need to be valid?
Is used to generate PEST grammar and defines which of the three source
registers needs to be != void.
- type: which <template> shall be used?
Must match a known template name by the last part.
E.g.: <meta type=tex"/> --> <template name="INSTR_TEX">
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
Diffstat (limited to 'src/etnaviv')
-rw-r--r-- | src/etnaviv/isa/etnaviv.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/etnaviv/isa/etnaviv.xml b/src/etnaviv/isa/etnaviv.xml index dbbf0d27e47..96a39973be0 100644 --- a/src/etnaviv/isa/etnaviv.xml +++ b/src/etnaviv/isa/etnaviv.xml @@ -205,6 +205,8 @@ SPDX-License-Identifier: MIT </enum> <bitset name="#instruction-alu" extends="#instruction"> + <meta type="alu"/> + <field name="DST_USE" pos="12" type="bool"/> <field name="DST" low="13" high="26" type="#instruction-dst"> <param name="DST_USE"/> @@ -417,6 +419,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src0" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="0"/> + <display> {INSTR_ALU} {DST:align=18}, {SRC0}, void, void </display> @@ -452,6 +456,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src2" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="2"/> + <display> {INSTR_ALU} {DST:align=18}, void, void, {SRC2} </display> @@ -495,6 +501,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src0-src1" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="0|1"/> + <display> {INSTR_ALU} {DST:align=18}, {SRC0}, {SRC1}, void </display> @@ -532,6 +540,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src0-src2" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="0|2"/> + <display> {INSTR_ALU} {DST:align=18}, {SRC0}, void, {SRC2} </display> @@ -577,6 +587,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src1-src2" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="1|2"/> + <display> {INSTR_ALU} {DST:align=18}, void, {SRC1}, {SRC2} </display> @@ -627,6 +639,7 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-alu-src0-src1-src2" extends="#instruction-alu"> + <meta has_dest="true" valid_srcs="0|1|2"/> <display> {INSTR_ALU} {DST:align=18}, {SRC0}, {SRC1}, {SRC2} </display> @@ -666,6 +679,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-tex" extends="#instruction"> + <meta type="tex"/> + <field name="DST_USE" pos="12" type="bool"/> <field name="DST" low="13" high="26" type="#instruction-dst"> <param name="DST_USE"/> @@ -681,6 +696,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-tex-src0" extends="#instruction-tex"> + <meta has_dest="true" valid_srcs="0"/> + <display> {INSTR_TEX} {DST:align=18}, tex{TEX_ID}{TEX_SWIZ}, {SRC0}, void, void </display> @@ -716,6 +733,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-tex-src0-src1-src2" extends="#instruction-tex"> + <meta has_dest="true" valid_srcs="0|1|2"/> + <display> {INSTR_TEX} {DST:align=18}, tex{TEX_ID}{TEX_SWIZ}, {SRC0}, {SRC1}, {SRC2} </display> @@ -755,6 +774,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-tex-maybe-src0-src1" extends="#instruction-tex"> + <meta has_dest="true" valid_srcs="0|1"/> + <display> {INSTR_TEX} {DST:align=18}, tex{TEX_ID}{TEX_SWIZ}, {SRC0}, {SRC1}, void </display> @@ -798,6 +819,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-cf" extends="#instruction"> + <meta type="cf"/> + <pattern low="12" high="31">00000000000000000000</pattern> <pattern low="32" high="33">00</pattern> <!-- RMODE --> @@ -887,6 +910,9 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-load" extends="#instruction"> + <meta type="load_store"/> + <meta has_dest="true" valid_srcs="0|1"/> + <field name="DST_USE" pos="12" type="bool"/> <field name="DST" low="13" high="26" type="#instruction-dst"> <param name="DST_USE"/> @@ -949,6 +975,9 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="#instruction-store" extends="#instruction"> + <meta type="load_store"/> + <meta has_dest="true" valid_srcs="0|1|2"/> + <pattern low="12" high="16">xxxxx</pattern> <pattern pos="17">x</pattern> <pattern low="18" high="22">xxxxx</pattern> @@ -1275,6 +1304,8 @@ SPDX-License-Identifier: MIT </bitset> <bitset name="movai" extends="#instruction-alu-src2"> + <meta has_dest="false"/> + <pattern low="0" high="5">010110</pattern> <!-- OPC --> <pattern pos="80">1</pattern> <!-- OPCODE_BIT6 --> </bitset> |