Fixing some particularly bad /W4.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace frontend {
|
||||
// 100: invalid
|
||||
// 128-256: VR
|
||||
|
||||
#pragma pack(push, 4)
|
||||
#pragma pack(push, 8)
|
||||
typedef struct alignas(64) PPCContext_s {
|
||||
// Must be stored at 0x0 for now.
|
||||
// TODO(benvanik): find a nice way to describe this to the JIT.
|
||||
@@ -49,9 +49,11 @@ typedef struct alignas(64) PPCContext_s {
|
||||
uint8_t* virtual_membase;
|
||||
|
||||
// Most frequently used registers first.
|
||||
uint64_t r[32]; // General purpose registers
|
||||
uint64_t lr; // Link register
|
||||
uint64_t ctr; // Count register
|
||||
uint64_t lr; // Link register
|
||||
uint64_t ctr; // Count register
|
||||
uint64_t r[32]; // General purpose registers
|
||||
double f[32]; // Floating-point registers
|
||||
vec128_t v[128]; // VMX128 vector registers
|
||||
|
||||
// XER register
|
||||
// Split to make it easier to do individual updates.
|
||||
@@ -188,9 +190,6 @@ typedef struct alignas(64) PPCContext_s {
|
||||
|
||||
uint8_t vscr_sat;
|
||||
|
||||
double f[32]; // Floating-point registers
|
||||
vec128_t v[128]; // VMX128 vector registers
|
||||
|
||||
// uint32_t get_fprf() {
|
||||
// return fpscr.value & 0x000F8000;
|
||||
// }
|
||||
@@ -216,11 +215,15 @@ typedef struct alignas(64) PPCContext_s {
|
||||
|
||||
uint8_t* physical_membase;
|
||||
|
||||
// Keep the struct padded out to 64b total.
|
||||
uint8_t _padding[8];
|
||||
|
||||
void SetRegFromString(const char* name, const char* value);
|
||||
bool CompareRegWithString(const char* name, const char* value,
|
||||
char* out_value, size_t out_value_size);
|
||||
} PPCContext;
|
||||
#pragma pack(pop)
|
||||
static_assert(sizeof(PPCContext) % 64 == 0, "64b padded");
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace cpu
|
||||
|
||||
@@ -295,10 +295,11 @@ void InstrAccessBits::Dump(std::string& out_str) {
|
||||
out_str = str.str();
|
||||
}
|
||||
|
||||
void InstrDisasm::Init(const char* name, const char* info, uint32_t flags) {
|
||||
this->name = name;
|
||||
this->info = info;
|
||||
this->flags = flags;
|
||||
void InstrDisasm::Init(const char* new_name, const char* new_info,
|
||||
uint32_t new_flags) {
|
||||
name = new_name;
|
||||
info = new_info;
|
||||
flags = new_flags;
|
||||
}
|
||||
|
||||
void InstrDisasm::AddLR(InstrRegister::Access access) {}
|
||||
|
||||
@@ -483,7 +483,7 @@ class InstrDisasm {
|
||||
const char* info;
|
||||
uint32_t flags;
|
||||
|
||||
void Init(const char* name, const char* info, uint32_t flags);
|
||||
void Init(const char* new_name, const char* new_info, uint32_t new_flags);
|
||||
void AddLR(InstrRegister::Access access);
|
||||
void AddCTR(InstrRegister::Access access);
|
||||
void AddCR(uint32_t bf, InstrRegister::Access access);
|
||||
|
||||
Reference in New Issue
Block a user