diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 17:17:45 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 17:17:45 +0100 |
| commit | bb147680c724cd9199f5d21f38ecef0edf8c6285 (patch) | |
| tree | a510c9a40df53990a048d99deb640d8b843d868e /scripts | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
fix(audit): classify carry-in and carry-out operands separately
The scalar mask in the second operand is an output even when the instruction also has a separate carry-in. Mark it written to avoid reporting it as an incoming register value.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/audit_shader4_regs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/audit_shader4_regs.py b/scripts/audit_shader4_regs.py index 6a6c449de..6bc3b42af 100644 --- a/scripts/audit_shader4_regs.py +++ b/scripts/audit_shader4_regs.py | |||
| @@ -171,8 +171,8 @@ def rbw_registers(insns): | |||
| 171 | reads_imm_dst or "fmac" in op or "mac_" in op or op == "v_writelane_b32" | 171 | reads_imm_dst or "fmac" in op or "mac_" in op or op == "v_writelane_b32" |
| 172 | or op == "v_swap_b32" or "_atomic_" in op | 172 | or op == "v_swap_b32" or "_atomic_" in op |
| 173 | ) | 173 | ) |
| 174 | # v_add_co_u32 / v_sub_co_u32 write both a[0] (VGPR) and a[1] (carry SGPR/vcc). | 174 | # Carry-out forms write the VGPR and scalar mask first, even when they also take a carry-in source. |
| 175 | if not is_no_dest and op.startswith("v_") and "_co_" in op and "_ci_" not in op and len(args) >= 2: | 175 | if not is_no_dest and op.startswith("v_") and "_co_" in op and len(args) >= 2: |
| 176 | dsts = args[:2] | 176 | dsts = args[:2] |
| 177 | srcs = args[2:] | 177 | srcs = args[2:] |
| 178 | elif is_no_dest: | 178 | elif is_no_dest: |