From 57c1af465ac9bd9b934fe49e7f6fb7b6db69b4e9 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Fri, 27 Mar 2026 01:18:19 +0900 Subject: [PATCH] [Build/CPU] Remove #pragma pack from Export and PPCOpcodeDisasmInfo Pack(1) causes unaligned pointer errors on ARM64 with Apple's linker. These are static read-only tables where the ~9KB size savings from packing is negligible. Removing the pack may also marginally improve access speed on x86 by avoiding unaligned loads. --- src/xenia/cpu/export_resolver.h | 2 -- src/xenia/cpu/ppc/ppc_opcode_info.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/xenia/cpu/export_resolver.h b/src/xenia/cpu/export_resolver.h index fa587e94b..7bc35935c 100644 --- a/src/xenia/cpu/export_resolver.h +++ b/src/xenia/cpu/export_resolver.h @@ -69,7 +69,6 @@ struct ExportTag { typedef void (*xe_kernel_export_shim_fn)(void*, void*); typedef void (*ExportTrampoline)(ppc::PPCContext* ppc_context); -#pragma pack(push, 1) class Export { public: enum class Type { @@ -113,7 +112,6 @@ class Export { : Type::kFunction; } }; -#pragma pack(pop) class ExportResolver { public: class Table { diff --git a/src/xenia/cpu/ppc/ppc_opcode_info.h b/src/xenia/cpu/ppc/ppc_opcode_info.h index 3a98210a8..db2d9d62a 100644 --- a/src/xenia/cpu/ppc/ppc_opcode_info.h +++ b/src/xenia/cpu/ppc/ppc_opcode_info.h @@ -133,7 +133,6 @@ enum class PPCOpcodeField : uint32_t { kTO, kLEV, }; -#pragma pack(push, 1) struct PPCOpcodeDisasmInfo { PPCOpcodeGroup group; PPCOpcodeFormat format; @@ -144,7 +143,6 @@ struct PPCOpcodeDisasmInfo { // std::vector writes; InstrDisasmFn disasm; }; -#pragma pack(pop) PPCOpcode LookupOpcode(uint32_t code); const PPCOpcodeInfo& GetOpcodeInfo(PPCOpcode opcode);