[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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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<PPCOpcodeField> writes;
|
||||
InstrDisasmFn disasm;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
PPCOpcode LookupOpcode(uint32_t code);
|
||||
|
||||
const PPCOpcodeInfo& GetOpcodeInfo(PPCOpcode opcode);
|
||||
|
||||
Reference in New Issue
Block a user