From 540344fd27cffca53da56a74561d90f38ae53175 Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Tue, 7 May 2024 06:34:50 -0700 Subject: [PATCH] [a64] Fix `EmitGetCurrentThreadId` type 16-bit word rather than 8-bit --- src/xenia/cpu/backend/a64/a64_emitter.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xenia/cpu/backend/a64/a64_emitter.cc b/src/xenia/cpu/backend/a64/a64_emitter.cc index 9325e5f3c..6dc702d17 100644 --- a/src/xenia/cpu/backend/a64/a64_emitter.cc +++ b/src/xenia/cpu/backend/a64/a64_emitter.cc @@ -359,8 +359,7 @@ void A64Emitter::MarkSourceOffset(const Instr* i) { void A64Emitter::EmitGetCurrentThreadId() { // rsi must point to context. We could fetch from the stack if needed. - // mov(ax, word[GetContextReg() + offsetof(ppc::PPCContext, thread_id)]); - LDRB(W0, GetContextReg(), offsetof(ppc::PPCContext, thread_id)); + LDRH(W0, GetContextReg(), offsetof(ppc::PPCContext, thread_id)); } void A64Emitter::EmitTraceUserCallReturn() {}