Files
Brian DegenhardtandClaude Opus 4.8 8aba55e4e9 emitter/arm64: fix Windows-arm64 link error on x86Emitter::rbx
VMManager.cpp (compiled on every target) includes x86emitter.h, which
pulls in x86types.h. That header binds `RTEXTPTR` as a reference to the
x86 register `rbx`:

    static constexpr const xAddressReg& RTEXTPTR = rbx;

`rbx` is defined only in x86emitter.cpp, which CMake compiles solely
under ARCH_X86. Binding the reference ODR-uses `rbx`, so on ARM64 it
needs a definition that does not exist. clang (macOS/Linux arm64) dead-
code-eliminates the unused reference and links fine, but MSVC keeps it,
so the Windows-arm64 link failed:

    VMManager.cpp.obj : error LNK2001: unresolved external symbol
      "class x86Emitter::xAddressReg const x86Emitter::rbx"
    pcsx2-qt.exe : fatal error LNK1120: 1 unresolved externals

RTEXTPTR is an x86 concept (the program-text pointer register) and every
real user lives in pcsx2/x86/** or common/emitter/*.cpp, all ARCH_X86-
only and never built on arm64. Gate the alias to _M_X86 so it simply
doesn't exist on arm64 -- no behavior change on x86, and the spurious
rbx reference disappears on Windows arm64.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 21:22:20 -07:00
..