Skip to content

Commit

Permalink
Merge pull request #6608 from lioncash/gekko
Browse files Browse the repository at this point in the history
Gekko: In-class initialize members where applicable
  • Loading branch information
leoetlino committed Apr 8, 2018
2 parents 219728d + d5555b4 commit 2a535d5
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions Source/Core/Core/PowerPC/Gekko.h
Expand Up @@ -13,10 +13,10 @@

union UGeckoInstruction
{
u32 hex;
u32 hex = 0;

UGeckoInstruction(u32 _hex) : hex(_hex) {}
UGeckoInstruction() : hex(0) {}
UGeckoInstruction() = default;
UGeckoInstruction(u32 hex_) : hex(hex_) {}
struct
{
// Record bit
Expand Down Expand Up @@ -319,10 +319,10 @@ union UGQR
BitField<16, 3, EQuantizeType> ld_type;
BitField<24, 6, u32> ld_scale;

u32 Hex;
u32 Hex = 0;

UGQR(u32 _hex) { Hex = _hex; }
UGQR() { Hex = 0; }
UGQR() = default;
UGQR(u32 hex_) : Hex{hex_} {}
};

#define XER_CA_SHIFT 29
Expand All @@ -343,10 +343,10 @@ union UReg_XER
u32 OV : 1;
u32 SO : 1;
};
u32 Hex;
u32 Hex = 0;

UReg_XER(u32 _hex) { Hex = _hex; }
UReg_XER() { Hex = 0; }
UReg_XER() = default;
UReg_XER(u32 hex_) : Hex{hex_} {}
};

// Machine State Register
Expand Down Expand Up @@ -375,10 +375,10 @@ union UReg_MSR
u32 POW : 1;
u32 res : 13;
};
u32 Hex;
u32 Hex = 0;

UReg_MSR(u32 _hex) { Hex = _hex; }
UReg_MSR() { Hex = 0; }
UReg_MSR() = default;
UReg_MSR(u32 hex_) : Hex{hex_} {}
};

#define FPRF_SHIFT 12
Expand Down Expand Up @@ -472,10 +472,10 @@ union UReg_FPSCR
// Exception summary (sticky)
u32 FX : 1;
};
u32 Hex;
u32 Hex = 0;

UReg_FPSCR(u32 _hex) { Hex = _hex; }
UReg_FPSCR() { Hex = 0; }
UReg_FPSCR() = default;
UReg_FPSCR(u32 hex_) : Hex{hex_} {}
};

// Hardware Implementation-Dependent Register 0
Expand Down Expand Up @@ -514,7 +514,7 @@ union UReg_HID0
u32 DBP : 1;
u32 EMCP : 1;
};
u32 Hex;
u32 Hex = 0;
};

// Hardware Implementation-Dependent Register 2
Expand All @@ -537,10 +537,10 @@ union UReg_HID2
u32 WPE : 1;
u32 LSQE : 1;
};
u32 Hex;
u32 Hex = 0;

UReg_HID2(u32 _hex) { Hex = _hex; }
UReg_HID2() { Hex = 0; }
UReg_HID2() = default;
UReg_HID2(u32 hex_) : Hex{hex_} {}
};

// Hardware Implementation-Dependent Register 4
Expand All @@ -560,10 +560,10 @@ union UReg_HID4
u32 L2FM : 2;
u32 : 1;
};
u32 Hex;
u32 Hex = 0;

UReg_HID4(u32 _hex) { Hex = _hex; }
UReg_HID4() { Hex = 0; }
UReg_HID4() = default;
UReg_HID4(u32 hex_) : Hex{hex_} {}
};

// SPR1 - Page Table format
Expand Down Expand Up @@ -623,10 +623,10 @@ union UReg_WPAR
u32 : 4;
u32 GB_ADDR : 27;
};
u32 Hex;
u32 Hex = 0;

UReg_WPAR(u32 _hex) { Hex = _hex; }
UReg_WPAR() { Hex = 0; }
UReg_WPAR() = default;
UReg_WPAR(u32 hex_) : Hex{hex_} {}
};

// Direct Memory Access Upper register
Expand All @@ -637,10 +637,10 @@ union UReg_DMAU
u32 DMA_LEN_U : 5;
u32 MEM_ADDR : 27;
};
u32 Hex;
u32 Hex = 0;

UReg_DMAU(u32 _hex) { Hex = _hex; }
UReg_DMAU() { Hex = 0; }
UReg_DMAU() = default;
UReg_DMAU(u32 hex_) : Hex{hex_} {}
};

// Direct Memory Access Lower (DMAL) register
Expand All @@ -654,10 +654,10 @@ union UReg_DMAL
u32 DMA_LD : 1;
u32 LC_ADDR : 27;
};
u32 Hex;
u32 Hex = 0;

UReg_DMAL(u32 _hex) { Hex = _hex; }
UReg_DMAL() { Hex = 0; }
UReg_DMAL() = default;
UReg_DMAL(u32 hex_) : Hex{hex_} {}
};

union UReg_BAT_Up
Expand All @@ -670,10 +670,10 @@ union UReg_BAT_Up
u32 : 4;
u32 BEPI : 15;
};
u32 Hex;
u32 Hex = 0;

UReg_BAT_Up(u32 _hex) { Hex = _hex; }
UReg_BAT_Up() { Hex = 0; }
UReg_BAT_Up() = default;
UReg_BAT_Up(u32 hex_) : Hex{hex_} {}
};

union UReg_BAT_Lo
Expand All @@ -686,10 +686,10 @@ union UReg_BAT_Lo
u32 : 10;
u32 BRPN : 15; // Physical Block Number
};
u32 Hex;
u32 Hex = 0;

UReg_BAT_Lo(u32 _hex) { Hex = _hex; }
UReg_BAT_Lo() { Hex = 0; }
UReg_BAT_Lo() = default;
UReg_BAT_Lo(u32 hex_) : Hex{hex_} {}
};

union UReg_PTE
Expand All @@ -709,7 +709,7 @@ union UReg_PTE
u64 RPN : 20;
};

u64 Hex;
u64 Hex = 0;
u32 Hex32[2];
};

Expand Down

0 comments on commit 2a535d5

Please sign in to comment.