Skip to content

codegen: always compile uop fatal checks, add missing ones - #20

Open
Cacodemon345 wants to merge 1 commit into
masterfrom
claude/uops-fatal-calls-3pq64m
Open

Cacodemon345 wants to merge 1 commit into
masterfrom
claude/uops-fatal-calls-3pq64m

Conversation

@Cacodemon345

Copy link
Copy Markdown
Owner

The x86-64 backend's uop handlers only reported unhandled register sizes
and out-of-range immediates under RECOMPILER_DEBUG, so in normal builds
they silently emitted nothing and returned success. Drop the guards so
these checks are always active, as they already are on arm64 and
LoongArch64.

Building the checks in uncovered format strings with more conversions
than arguments (FABS, FCHS, FSQRT, PF2ID, PFRCP, PFRSQRT, PI2FD); fix
them.

Also add the fatal calls that were missing:

  • x86-64 CALL_FUNC_RESULT_ORDERED now rejects a non-32-bit destination,
    like CALL_FUNC_RESULT.
  • arm64 and LoongArch64 MEM_LOAD_ABS / MEM_LOAD_REG now end their
    result write-back chains with a fatal, like the call chains above them.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KXB93KqPEdHSKMo4piNENg

The x86-64 backend's uop handlers only reported unhandled register sizes
and out-of-range immediates under RECOMPILER_DEBUG, so in normal builds
they silently emitted nothing and returned success. Drop the guards so
these checks are always active, as they already are on arm64 and
LoongArch64.

Building the checks in uncovered format strings with more conversions
than arguments (FABS, FCHS, FSQRT, PF2ID, PFRCP, PFRSQRT, PI2FD); fix
them.

Also add the fatal calls that were missing:
- x86-64 CALL_FUNC_RESULT_ORDERED now rejects a non-32-bit destination,
  like CALL_FUNC_RESULT.
- arm64 and LoongArch64 MEM_LOAD_ABS / MEM_LOAD_REG now end their
  result write-back chains with a fatal, like the call chains above them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXB93KqPEdHSKMo4piNENg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants