mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 00:10:10 +01:00
pan/bi: Add staging register counts to ISA.xml
Message-passing instructions that read/write staging registers access either: * a fixed number of registers * vecsize registers (/2 for LD/ST_CVT if register_format is 16-bit) * a computed number for TEXC This adds the fixed counts into the XML for the first type and space to specify the latter types. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8213>
This commit is contained in:
parent
faa18708d1
commit
cffc1d90da
2 changed files with 64 additions and 55 deletions
|
|
@ -2454,31 +2454,31 @@
|
|||
<mod name="neg2" start="12" size="1" opt="neg"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+ACMPSTORE.i32" staging="r" mask="0xffdc0" exact="0x648c0" message="atomic">
|
||||
<ins name="+ACMPSTORE.i32" staging="r=2" mask="0xffdc0" exact="0x648c0" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+ACMPSTORE.i64" staging="r" mask="0xffdc0" exact="0x64900" message="atomic">
|
||||
<ins name="+ACMPSTORE.i64" staging="r=4" mask="0xffdc0" exact="0x64900" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+ACMPXCHG.i32" staging="rw" mask="0xffdc0" exact="0x644c0" message="atomic">
|
||||
<ins name="+ACMPXCHG.i32" staging="rw=2" mask="0xffdc0" exact="0x644c0" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+ACMPXCHG.i64" staging="rw" mask="0xffdc0" exact="0x64500" message="atomic">
|
||||
<ins name="+ACMPXCHG.i64" staging="rw=4" mask="0xffdc0" exact="0x64500" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+ATEST" staging="w" mask="0xfff00" exact="0xc8f00" message="atest">
|
||||
<ins name="+ATEST" staging="w=1" mask="0xfff00" exact="0xc8f00" message="atest">
|
||||
<src start="0" mask="0xf7"/>
|
||||
<src start="3" mask="0xf7"/>
|
||||
<mod name="widen1" start="6" size="2">
|
||||
|
|
@ -2489,19 +2489,21 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+ATOM_CX" staging="rw" mask="0xffe00" exact="0xd7400" message="atomic">
|
||||
<ins name="+ATOM_CX" staging="rw=sr_count" mask="0xffe00" exact="0xd7400" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
<!-- not actually encoded, but used for IR -->
|
||||
<immediate name="sr_count" size="4" pseudo="true"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+AXCHG.i32" staging="rw" mask="0xffdc0" exact="0x640c0" message="atomic">
|
||||
<ins name="+AXCHG.i32" staging="rw=1" mask="0xffdc0" exact="0x640c0" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+AXCHG.i64" staging="rw" mask="0xffdc0" exact="0x64100" message="atomic">
|
||||
<ins name="+AXCHG.i64" staging="rw=2" mask="0xffdc0" exact="0x64100" message="atomic">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="9" size="1" opt="wls"/>
|
||||
|
|
@ -2509,7 +2511,7 @@
|
|||
|
||||
<ins name="+BARRIER" mask="0xfffff" exact="0xd7874" message="barrier"/>
|
||||
|
||||
<ins name="+BLEND" staging="r" mask="0xffe00" exact="0xca800" message="blend">
|
||||
<ins name="+BLEND" staging="r=4" mask="0xffe00" exact="0xca800" message="blend">
|
||||
<src start="0"/>
|
||||
<src start="3" mask="0xf7"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
|
|
@ -6191,7 +6193,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_ATTR" staging="w" message="attribute">
|
||||
<ins name="+LD_ATTR" staging="w=format" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -6230,7 +6232,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_ATTR_IMM" staging="w" message="attribute">
|
||||
<ins name="+LD_ATTR_IMM" staging="w=format" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<immediate name="attribute_index" start="6" size="4"/>
|
||||
|
|
@ -6269,7 +6271,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_ATTR_TEX" staging="w" message="attribute">
|
||||
<ins name="+LD_ATTR_TEX" staging="w=format" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -6308,7 +6310,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_CVT" staging="w" mask="0xff800" exact="0xc9000" message="load">
|
||||
<ins name="+LD_CVT" staging="w=format" mask="0xff800" exact="0xc9000" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
|
|
@ -6320,7 +6322,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_GCLK.u64" staging="w" mask="0xffff8" exact="0xd7800" message="attribute">
|
||||
<ins name="+LD_GCLK.u64" staging="w=1" mask="0xffff8" exact="0xd7800" message="attribute">
|
||||
<mod name="source" start="0" size="3">
|
||||
<reserved/>
|
||||
<reserved/>
|
||||
|
|
@ -6333,7 +6335,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_TILE" staging="w" mask="0xff800" exact="0xcb000" message="tile">
|
||||
<ins name="+LD_TILE" staging="w=vecsize" mask="0xff800" exact="0xcb000" message="tile">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
|
|
@ -6345,7 +6347,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_VAR" staging="w" message="varying">
|
||||
<ins name="+LD_VAR" staging="w=vecsize" message="varying">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="vecsize" start="8" size="2">
|
||||
|
|
@ -6486,7 +6488,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_VAR_FLAT" staging="w" message="varying">
|
||||
<ins name="+LD_VAR_FLAT" staging="w=format" message="varying">
|
||||
<src start="3"/>
|
||||
<mod name="vecsize" start="8" size="2">
|
||||
<opt>none</opt>
|
||||
|
|
@ -6539,7 +6541,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_VAR_FLAT_IMM" staging="w" message="varying">
|
||||
<ins name="+LD_VAR_FLAT_IMM" staging="w=format" message="varying">
|
||||
<immediate name="index" start="3" size="5"/>
|
||||
<mod name="vecsize" start="8" size="2">
|
||||
<opt>none</opt>
|
||||
|
|
@ -6592,7 +6594,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_VAR_IMM" staging="w" message="varying">
|
||||
<ins name="+LD_VAR_IMM" staging="w=format" message="varying">
|
||||
<src start="0"/>
|
||||
<immediate name="index" start="3" size="5"/>
|
||||
<mod name="vecsize" start="8" size="2">
|
||||
|
|
@ -6733,7 +6735,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LD_VAR_SPECIAL" staging="w" message="varying">
|
||||
<ins name="+LD_VAR_SPECIAL" staging="w=format" message="varying">
|
||||
<src start="0"/>
|
||||
<mod name="varying_name" size="5">
|
||||
<opt>point</opt>
|
||||
|
|
@ -6919,7 +6921,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LEA_ATTR" staging="w" message="attribute">
|
||||
<ins name="+LEA_ATTR" staging="w=3" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -6952,7 +6954,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LEA_ATTR_IMM" staging="w" message="attribute">
|
||||
<ins name="+LEA_ATTR_IMM" staging="w=3" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<immediate name="attribute_index" start="6" size="4"/>
|
||||
|
|
@ -6985,7 +6987,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LEA_ATTR_TEX" staging="w" message="attribute">
|
||||
<ins name="+LEA_ATTR_TEX" staging="w=3" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -7018,7 +7020,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LEA_TEX" staging="w" mask="0xff600" exact="0xd6600" message="attribute">
|
||||
<ins name="+LEA_TEX" staging="w=3" mask="0xff600" exact="0xd6600" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -7028,7 +7030,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LEA_TEX_IMM" staging="w" mask="0xff000" exact="0xd6000" message="attribute">
|
||||
<ins name="+LEA_TEX_IMM" staging="w=3" mask="0xff000" exact="0xd6000" message="attribute">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<immediate name="texture_index" start="6" size="5"/>
|
||||
|
|
@ -7038,7 +7040,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i128" staging="w" mask="0xffe00" exact="0x61000" message="load">
|
||||
<ins name="+LOAD.i128" staging="w=4" mask="0xffe00" exact="0x61000" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7053,7 +7055,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i16" staging="w" message="load">
|
||||
<ins name="+LOAD.i16" staging="w=1" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7112,7 +7114,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i24" staging="w" mask="0xffe00" exact="0x65000" message="load">
|
||||
<ins name="+LOAD.i24" staging="w=1" mask="0xffe00" exact="0x65000" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7127,7 +7129,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i32" staging="w" message="load">
|
||||
<ins name="+LOAD.i32" staging="w=1" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7164,7 +7166,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i48" staging="w" mask="0xffe00" exact="0x65200" message="load">
|
||||
<ins name="+LOAD.i48" staging="w=2" mask="0xffe00" exact="0x65200" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7179,7 +7181,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i64" staging="w" mask="0xffe00" exact="0x60e00" message="load">
|
||||
<ins name="+LOAD.i64" staging="w=2" mask="0xffe00" exact="0x60e00" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7194,7 +7196,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i8" staging="w" message="load">
|
||||
<ins name="+LOAD.i8" staging="w=1" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7278,7 +7280,7 @@
|
|||
</encoding>
|
||||
</ins>
|
||||
|
||||
<ins name="+LOAD.i96" staging="w" mask="0xffe00" exact="0x65400" message="load">
|
||||
<ins name="+LOAD.i96" staging="w=3" mask="0xffe00" exact="0x65400" message="load">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7492,7 +7494,7 @@
|
|||
<src start="6"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i128" staging="r" mask="0xffe00" exact="0x61200" message="store">
|
||||
<ins name="+STORE.i128" staging="r=4" mask="0xffe00" exact="0x61200" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7507,7 +7509,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i16" staging="r" mask="0xffe00" exact="0x62800" message="store">
|
||||
<ins name="+STORE.i16" staging="r=1" mask="0xffe00" exact="0x62800" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7522,7 +7524,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i24" staging="r" mask="0xffe00" exact="0x65800" message="store">
|
||||
<ins name="+STORE.i24" staging="r=1" mask="0xffe00" exact="0x65800" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7537,7 +7539,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i32" staging="r" mask="0xffe00" exact="0x62c00" message="store">
|
||||
<ins name="+STORE.i32" staging="r=1" mask="0xffe00" exact="0x62c00" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7552,7 +7554,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i48" staging="r" mask="0xffe00" exact="0x65a00" message="store">
|
||||
<ins name="+STORE.i48" staging="r=2" mask="0xffe00" exact="0x65a00" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7567,7 +7569,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i64" staging="r" mask="0xffe00" exact="0x62e00" message="store">
|
||||
<ins name="+STORE.i64" staging="r=2" mask="0xffe00" exact="0x62e00" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7582,7 +7584,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i8" staging="r" mask="0xffe00" exact="0x62000" message="store">
|
||||
<ins name="+STORE.i8" staging="r=1" mask="0xffe00" exact="0x62000" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7597,7 +7599,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+STORE.i96" staging="r" mask="0xffe00" exact="0x65c00" message="store">
|
||||
<ins name="+STORE.i96" staging="r=3" mask="0xffe00" exact="0x65c00" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<mod name="seg" start="6" size="3">
|
||||
|
|
@ -7612,7 +7614,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+ST_CVT" staging="r" mask="0xff800" exact="0xc9800" message="store">
|
||||
<ins name="+ST_CVT" staging="r=format" mask="0xff800" exact="0xc9800" message="store">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
|
|
@ -7624,7 +7626,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+ST_TILE" staging="r" mask="0xff800" exact="0xcb800" message="tile">
|
||||
<ins name="+ST_TILE" staging="r=vecsize" mask="0xff800" exact="0xcb800" message="tile">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
|
|
@ -7660,14 +7662,16 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXC" staging="rw" mask="0xffc00" exact="0xd7000" message="tex">
|
||||
<ins name="+TEXC" staging="rw=sr_count" mask="0xffc00" exact="0xd7000" message="tex">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6" mask="0xf7"/>
|
||||
<mod name="skip" start="9" size="1" opt="skip"/>
|
||||
<!-- not actually encoded, but used for IR -->
|
||||
<immediate name="sr_count" size="4" pseudo="true"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXS_2D.f16" staging="w" mask="0xfc000" exact="0xd8000" message="tex">
|
||||
<ins name="+TEXS_2D.f16" staging="w=4" mask="0xfc000" exact="0xd8000" message="tex">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<immediate name="texture_index" start="6" size="3"/>
|
||||
|
|
@ -7679,7 +7683,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXS_2D.f32" staging="w" mask="0xfc000" exact="0x58000" message="tex">
|
||||
<ins name="+TEXS_2D.f32" staging="w=2" mask="0xfc000" exact="0x58000" message="tex">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<immediate name="texture_index" start="6" size="3"/>
|
||||
|
|
@ -7691,7 +7695,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXS_CUBE.f16" staging="w" mask="0xfc000" exact="0xdc000" message="tex">
|
||||
<ins name="+TEXS_CUBE.f16" staging="w=2" mask="0xfc000" exact="0xdc000" message="tex">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -7700,7 +7704,7 @@
|
|||
<mod name="skip" start="9" size="1" opt="skip"/>
|
||||
</ins>
|
||||
|
||||
<ins name="+TEXS_CUBE.f32" staging="w" mask="0xfc000" exact="0x5c000" message="tex">
|
||||
<ins name="+TEXS_CUBE.f32" staging="w=4" mask="0xfc000" exact="0x5c000" message="tex">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
@ -8022,7 +8026,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+VAR_TEX.f16" staging="w" mask="0xffd00" exact="0xca100" message="vartex">
|
||||
<ins name="+VAR_TEX.f16" staging="w=2" mask="0xffd00" exact="0xca100" message="vartex">
|
||||
<immediate name="varying_index" start="0" size="3"/>
|
||||
<immediate name="texture_index" start="3" size="2"/>
|
||||
<mod name="update" size="1">
|
||||
|
|
@ -8052,7 +8056,7 @@
|
|||
</derived>
|
||||
</ins>
|
||||
|
||||
<ins name="+VAR_TEX.f32" staging="w" mask="0xffd00" exact="0xca000" message="vartex">
|
||||
<ins name="+VAR_TEX.f32" staging="w=4" mask="0xffd00" exact="0xca000" message="vartex">
|
||||
<immediate name="varying_index" start="0" size="3"/>
|
||||
<immediate name="texture_index" start="3" size="2"/>
|
||||
<mod name="update" size="1">
|
||||
|
|
@ -8111,7 +8115,7 @@
|
|||
</mod>
|
||||
</ins>
|
||||
|
||||
<ins name="+ZS_EMIT" staging="w" mask="0xff800" exact="0xd7800" message="z_stencil">
|
||||
<ins name="+ZS_EMIT" staging="w=1" mask="0xff800" exact="0xd7800" message="z_stencil">
|
||||
<src start="0"/>
|
||||
<src start="3"/>
|
||||
<src start="6"/>
|
||||
|
|
|
|||
|
|
@ -89,14 +89,15 @@ def parse_copy(enc, existing):
|
|||
if ex[0][0] == name:
|
||||
ex[0][1] = node.get('start')
|
||||
|
||||
def parse_instruction(ins):
|
||||
def parse_instruction(ins, include_pseudo):
|
||||
common = {
|
||||
'srcs': [],
|
||||
'modifiers': [],
|
||||
'immediates': [],
|
||||
'swaps': [],
|
||||
'derived': [],
|
||||
'staging': ins.attrib.get('staging', ''),
|
||||
'staging': ins.attrib.get('staging', '').split('=')[0],
|
||||
'staging_count': ins.attrib.get('staging', '=0').split('=')[1],
|
||||
'unused': ins.attrib.get('unused', False),
|
||||
'pseudo': ins.attrib.get('pseudo', False),
|
||||
'message': ins.attrib.get('message', 'none'),
|
||||
|
|
@ -110,7 +111,11 @@ def parse_instruction(ins):
|
|||
common['srcs'].append([int(src.attrib['start'], 0), mask])
|
||||
|
||||
for imm in ins.findall('immediate'):
|
||||
common['immediates'].append([imm.attrib['name'], int(imm.attrib['start']), int(imm.attrib['size'])])
|
||||
if imm.attrib.get('pseudo', False) and not include_pseudo:
|
||||
continue
|
||||
|
||||
start = int(imm.attrib['start']) if 'start' in imm.attrib else None
|
||||
common['immediates'].append([imm.attrib['name'], start, int(imm.attrib['size'])])
|
||||
|
||||
common['derived'] = parse_derived(ins)
|
||||
common['modifiers'] = parse_modifiers(ins)
|
||||
|
|
@ -154,7 +159,7 @@ def parse_instructions(xml, include_unused = False, include_pseudo = False):
|
|||
instructions = ET.parse(xml).getroot().findall('ins')
|
||||
|
||||
for ins in instructions:
|
||||
parsed = parse_instruction(ins)
|
||||
parsed = parse_instruction(ins, include_pseudo)
|
||||
|
||||
# Some instructions are for useful disassembly only and can be stripped
|
||||
# out of the compiler, particularly useful for release builds
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue