[LINT] Linted files + Added lint job to CI
This commit is contained in:
committed by
Radosław Gliński
parent
e8afad8f8a
commit
b9061e6292
@@ -375,11 +375,11 @@ typedef struct alignas(64) PPCContext_s {
|
||||
|
||||
// Most frequently used registers first.
|
||||
|
||||
uint64_t r[32]; // 0x20 General purpose registers
|
||||
uint64_t ctr; // 0x18 Count register
|
||||
uint64_t lr; // 0x10 Link register
|
||||
uint64_t r[32]; // 0x20 General purpose registers
|
||||
uint64_t ctr; // 0x18 Count register
|
||||
uint64_t lr; // 0x10 Link register
|
||||
|
||||
uint64_t msr; //machine state register
|
||||
uint64_t msr; // machine state register
|
||||
|
||||
double f[32]; // 0x120 Floating-point registers
|
||||
vec128_t v[128]; // 0x220 VMX128 vector registers
|
||||
|
||||
@@ -46,7 +46,7 @@ struct PPCDecodeData {
|
||||
uint32_t LEV() const { return bits_.LEV; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
|
||||
@@ -132,23 +132,23 @@ int InstrEmit_branch(PPCHIRBuilder& f, const char* src, uint64_t cia,
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
// Jump to pointer.
|
||||
bool likely_return = !lk && nia_is_lr;
|
||||
if (likely_return) {
|
||||
call_flags |= CALL_POSSIBLE_RETURN;
|
||||
}
|
||||
if (cond) {
|
||||
if (!expect_true) {
|
||||
cond = f.IsFalse(cond);
|
||||
// Jump to pointer.
|
||||
bool likely_return = !lk && nia_is_lr;
|
||||
if (likely_return) {
|
||||
call_flags |= CALL_POSSIBLE_RETURN;
|
||||
}
|
||||
if (cond) {
|
||||
if (!expect_true) {
|
||||
cond = f.IsFalse(cond);
|
||||
}
|
||||
f.CallIndirectTrue(cond, nia, call_flags);
|
||||
} else {
|
||||
f.CallIndirect(nia, call_flags);
|
||||
}
|
||||
f.CallIndirectTrue(cond, nia, call_flags);
|
||||
} else {
|
||||
f.CallIndirect(nia, call_flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
} // namespace ppc
|
||||
|
||||
int InstrEmit_bx(PPCHIRBuilder& f, const InstrData& i) {
|
||||
@@ -789,9 +789,8 @@ int InstrEmit_mtspr(PPCHIRBuilder& f, const InstrData& i) {
|
||||
// code requires it. Sequences of mtmsr/lwar/stcw/mtmsr come up a lot, and
|
||||
// without the lock here threads can livelock.
|
||||
|
||||
|
||||
//0x400 = debug singlestep i think
|
||||
//ive seen 0x8000 used in kernel code
|
||||
// 0x400 = debug singlestep i think
|
||||
// ive seen 0x8000 used in kernel code
|
||||
int InstrEmit_mfmsr(PPCHIRBuilder& f, const InstrData& i) {
|
||||
// bit 48 = EE; interrupt enabled
|
||||
// bit 62 = RI; recoverable interrupt
|
||||
@@ -806,7 +805,7 @@ int InstrEmit_mtmsr(PPCHIRBuilder& f, const InstrData& i) {
|
||||
}
|
||||
|
||||
int InstrEmit_mtmsrd(PPCHIRBuilder& f, const InstrData& i) {
|
||||
//todo: this is moving msr under a mask, so only writing EE and RI
|
||||
// todo: this is moving msr under a mask, so only writing EE and RI
|
||||
|
||||
Value* from = f.LoadGPR(i.X.RT);
|
||||
Value* mtmsrd_mask = f.LoadConstantUint64((1ULL << 15));
|
||||
|
||||
@@ -106,16 +106,17 @@ bool PPCFrontend::Initialize() {
|
||||
}
|
||||
|
||||
bool PPCFrontend::DeclareFunction(GuestFunction* function) {
|
||||
|
||||
//chrispy: make sure we aren't declaring a function that is actually padding data, this will mess up PPCScanner and is hard to debug
|
||||
//wow, this halo reach actually has branches into 0 opcodes, look into further
|
||||
//xenia_assert(*reinterpret_cast<const uint32_t*>(
|
||||
// this->memory()->TranslateVirtual(function->address())) != 0);
|
||||
// Could scan or something here.
|
||||
// Could also check to see if it's a well-known function type and classify
|
||||
// for later.
|
||||
// Could also kick off a precompiler, since we know it's likely the function
|
||||
// will be demanded soon.
|
||||
// chrispy: make sure we aren't declaring a function that is actually padding
|
||||
// data, this will mess up PPCScanner and is hard to debug wow, this halo
|
||||
// reach actually has branches into 0 opcodes, look into further
|
||||
// xenia_assert(*reinterpret_cast<const uint32_t*>(
|
||||
// this->memory()->TranslateVirtual(function->address())) !=
|
||||
// 0);
|
||||
// Could scan or something here.
|
||||
// Could also check to see if it's a well-known function type and classify
|
||||
// for later.
|
||||
// Could also kick off a precompiler, since we know it's likely the function
|
||||
// will be demanded soon.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,10 @@ class PPCHIRBuilder : public hir::HIRBuilder {
|
||||
|
||||
void StoreReserved(Value* val);
|
||||
Value* LoadReserved();
|
||||
//calls original impl in hirbuilder, but also records the is_return_site bit into flags in the guestmodule
|
||||
// calls original impl in hirbuilder, but also records the is_return_site bit
|
||||
// into flags in the guestmodule
|
||||
void SetReturnAddress(Value* value);
|
||||
|
||||
private:
|
||||
void MaybeBreakOnInstruction(uint32_t address);
|
||||
void AnnotateLabel(uint32_t address, Label* label);
|
||||
|
||||
Reference in New Issue
Block a user