diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 15:51:40 +0100 |
| commit | df91c6624b69ee4e6c6eeca20ed68d331ed0e728 (patch) | |
| tree | 323c88b9df89bf8abaa2b98d10808474ab675dc2 /tools/salu_diff.py | |
| parent | b40d8039a98f57b26bd05860febbabbe59b97873 (diff) | |
| parent | 6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff) | |
Merge main into test/valu-int-misc (#1492)
Conflicted files: runtime/test/shaders/check.py, scripts/run_gpu_tests.py
AI-assisted.
Diffstat (limited to 'tools/salu_diff.py')
| -rw-r--r-- | tools/salu_diff.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/salu_diff.py b/tools/salu_diff.py index 244bee384..e34c5c96f 100644 --- a/tools/salu_diff.py +++ b/tools/salu_diff.py | |||
| @@ -71,7 +71,8 @@ OUT_SCC = 30 # s_cselect_b32 s30, 1, 0 observes SCC at the end | |||
| 71 | BFE_ANY = False # any s_bfe_* control word (--bfe-any), not only offset + width <= 32 | 71 | BFE_ANY = False # any s_bfe_* control word (--bfe-any), not only offset + width <= 32 |
| 72 | INLINE64 = False # inline constants in 64-bit positions (--inline64); the translator reads those as lane masks | 72 | INLINE64 = False # inline constants in 64-bit positions (--inline64); the translator reads those as lane masks |
| 73 | 73 | ||
| 74 | LANE_MASK_OPS = ("s_and_b64", "s_or_b64", "s_xor_b64", "s_andn2_b64", "s_orn2_b64", "s_not_b64", "s_wqm_b64", | 74 | LANE_MASK_OPS = ("s_and_b64", "s_or_b64", "s_xor_b64", "s_andn2_b64", "s_orn2_b64", "s_nand_b64", "s_nor_b64", |
| 75 | "s_xnor_b64", "s_not_b64", "s_wqm_b64", | ||
| 75 | "s_wqm_b32", "s_cselect_b64", "s_bfm_b64") | 76 | "s_wqm_b32", "s_cselect_b64", "s_bfm_b64") |
| 76 | 77 | ||
| 77 | INTERESTING = (0, 1, 2, 3, 31, 32, 33, 63, 64, 0x7FFFFFFF, 0x80000000, 0x80000001, 0xFFFFFFFF, 0xFFFFFFFE, | 78 | INTERESTING = (0, 1, 2, 3, 31, 32, 33, 63, 64, 0x7FFFFFFF, 0x80000000, 0x80000001, 0xFFFFFFFF, 0xFFFFFFFE, |
| @@ -172,7 +173,9 @@ def _sop2(): | |||
| 172 | def _sop2_64(): | 173 | def _sop2_64(): |
| 173 | ops = {} | 174 | ops = {} |
| 174 | for name, f in (("and", lambda a, b: a & b), ("or", lambda a, b: a | b), ("xor", lambda a, b: a ^ b), | 175 | for name, f in (("and", lambda a, b: a & b), ("or", lambda a, b: a | b), ("xor", lambda a, b: a ^ b), |
| 175 | ("andn2", lambda a, b: a & ~b), ("orn2", lambda a, b: a | ~b)): | 176 | ("andn2", lambda a, b: a & ~b), ("orn2", lambda a, b: a | ~b), |
| 177 | ("nand", lambda a, b: ~(a & b)), ("nor", lambda a, b: ~(a | b)), | ||
| 178 | ("xnor", lambda a, b: ~(a ^ b))): | ||
| 176 | ops[f"s_{name}_b64"] = ("sop2_64", lambda a, b, c, f=f: (f(a, b) & M64, int(f(a, b) & M64 != 0))) | 179 | ops[f"s_{name}_b64"] = ("sop2_64", lambda a, b, c, f=f: (f(a, b) & M64, int(f(a, b) & M64 != 0))) |
| 177 | ops["s_cselect_b64"] = ("sop2_64", lambda a, b, c: (a if c else b, None)) | 180 | ops["s_cselect_b64"] = ("sop2_64", lambda a, b, c: (a if c else b, None)) |
| 178 | ops["s_lshl_b64"] = ("sop2_64s", lambda a, b, c: ((a << (b & 63)) & M64, int((a << (b & 63)) & M64 != 0))) | 181 | ops["s_lshl_b64"] = ("sop2_64s", lambda a, b, c: ((a << (b & 63)) & M64, int((a << (b & 63)) & M64 != 0))) |