diff options
| author | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:07:53 +0100 |
|---|---|---|
| committer | Vonsek <45567075+Vonsek@users.noreply.github.com> | 2026-11-22 19:07:53 +0100 |
| commit | 46a196cde9328e2a232ee15c19556eb962cda0ab (patch) | |
| tree | d1cd03326530912d925ee1a7ba7fa735006f004f /tools/cpu_ref.py | |
| parent | d3fab00a78967adf357596996190afdf33dc09d5 (diff) | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
Merge upstream main into first-light shader identity
Diffstat (limited to 'tools/cpu_ref.py')
| -rw-r--r-- | tools/cpu_ref.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/cpu_ref.py b/tools/cpu_ref.py index 1a89b2766..694782f52 100644 --- a/tools/cpu_ref.py +++ b/tools/cpu_ref.py | |||
| @@ -392,9 +392,9 @@ class Machine: | |||
| 392 | else: | 392 | else: |
| 393 | raise Unsupported(arg.get("t", kind), self.pc, "operand kind is not modelled") | 393 | raise Unsupported(arg.get("t", kind), self.pc, "operand kind is not modelled") |
| 394 | if arg.get("abs"): | 394 | if arg.get("abs"): |
| 395 | value = abs(value - (1 << 32)) if value & SIGN32 else value | 395 | value &= 0x7FFFFFFF |
| 396 | if arg.get("neg"): | 396 | if arg.get("neg"): |
| 397 | value = (-value) & MASK32 | 397 | value ^= SIGN32 |
| 398 | return value & MASK32 | 398 | return value & MASK32 |
| 399 | 399 | ||
| 400 | def _float_src(self, arg, lane): | 400 | def _float_src(self, arg, lane): |