diff options
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))) |