General: Make parameter names from declarations and implementations consistent

Most of the time when this occurs, it's a bug. Thankfully this isn't the
case. However, we can resolve these cases to make the codebase more
consistent.
This commit is contained in:
Lioncash 2019-05-24 01:59:04 -04:00 committed by MerryMage
parent b301fcd520
commit 182ceb2807
8 changed files with 24 additions and 24 deletions

View file

@ -34,10 +34,10 @@ public:
~A32EmitX64() override; ~A32EmitX64() override;
/** /**
* Emit host machine code for a basic block with intermediate representation `ir`. * Emit host machine code for a basic block with intermediate representation `block`.
* @note ir is modified. * @note block is modified.
*/ */
BlockDescriptor Emit(IR::Block& ir); BlockDescriptor Emit(IR::Block& block);
void ClearCache() override; void ClearCache() override;

View file

@ -37,10 +37,10 @@ public:
~A64EmitX64() override; ~A64EmitX64() override;
/** /**
* Emit host machine code for a basic block with intermediate representation `ir`. * Emit host machine code for a basic block with intermediate representation `block`.
* @note ir is modified. * @note block is modified.
*/ */
BlockDescriptor Emit(IR::Block& ir); BlockDescriptor Emit(IR::Block& block);
void ClearCache() override; void ClearCache() override;

View file

@ -76,8 +76,8 @@ struct A64JitState {
u32 fpcr = 0; u32 fpcr = 0;
u32 GetFpcr() const; u32 GetFpcr() const;
u32 GetFpsr() const; u32 GetFpsr() const;
void SetFpcr(u32 new_fpcr); void SetFpcr(u32 value);
void SetFpsr(u32 new_fpcr); void SetFpsr(u32 value);
u64 GetUniqueHash() const noexcept; u64 GetUniqueHash() const noexcept;
}; };

View file

@ -315,30 +315,30 @@ void EmitX64::EmitTerminal(IR::Terminal terminal, IR::LocationDescriptor initial
}); });
} }
void EmitX64::Patch(const IR::LocationDescriptor& desc, CodePtr bb) { void EmitX64::Patch(const IR::LocationDescriptor& target_desc, CodePtr target_code_ptr) {
const CodePtr save_code_ptr = code.getCurr(); const CodePtr save_code_ptr = code.getCurr();
const PatchInformation& patch_info = patch_information[desc]; const PatchInformation& patch_info = patch_information[target_desc];
for (CodePtr location : patch_info.jg) { for (CodePtr location : patch_info.jg) {
code.SetCodePtr(location); code.SetCodePtr(location);
EmitPatchJg(desc, bb); EmitPatchJg(target_desc, target_code_ptr);
} }
for (CodePtr location : patch_info.jmp) { for (CodePtr location : patch_info.jmp) {
code.SetCodePtr(location); code.SetCodePtr(location);
EmitPatchJmp(desc, bb); EmitPatchJmp(target_desc, target_code_ptr);
} }
for (CodePtr location : patch_info.mov_rcx) { for (CodePtr location : patch_info.mov_rcx) {
code.SetCodePtr(location); code.SetCodePtr(location);
EmitPatchMovRcx(bb); EmitPatchMovRcx(target_code_ptr);
} }
code.SetCodePtr(save_code_ptr); code.SetCodePtr(save_code_ptr);
} }
void EmitX64::Unpatch(const IR::LocationDescriptor& desc) { void EmitX64::Unpatch(const IR::LocationDescriptor& target_desc) {
Patch(desc, nullptr); Patch(target_desc, nullptr);
} }
void EmitX64::ClearCache() { void EmitX64::ClearCache() {

View file

@ -143,7 +143,7 @@ private:
void DefineValueImpl(IR::Inst* def_inst, HostLoc host_loc); void DefineValueImpl(IR::Inst* def_inst, HostLoc host_loc);
void DefineValueImpl(IR::Inst* def_inst, const IR::Value& use_inst); void DefineValueImpl(IR::Inst* def_inst, const IR::Value& use_inst);
HostLoc LoadImmediate(IR::Value imm, HostLoc reg); HostLoc LoadImmediate(IR::Value imm, HostLoc host_loc);
void Move(HostLoc to, HostLoc from); void Move(HostLoc to, HostLoc from);
void CopyToScratch(size_t bit_width, HostLoc to, HostLoc from); void CopyToScratch(size_t bit_width, HostLoc to, HostLoc from);
void Exchange(HostLoc a, HostLoc b); void Exchange(HostLoc a, HostLoc b);

View file

@ -10,12 +10,12 @@
namespace Dynarmic::A32 { namespace Dynarmic::A32 {
std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) { std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor) {
o << fmt::format("{{{:08x},{},{},{:08x}}}", o << fmt::format("{{{:08x},{},{},{:08x}}}",
loc.PC(), descriptor.PC(),
loc.TFlag() ? "T" : "!T", descriptor.TFlag() ? "T" : "!T",
loc.EFlag() ? "E" : "!E", descriptor.EFlag() ? "E" : "!E",
loc.FPSCR().Value()); descriptor.FPSCR().Value());
return o; return o;
} }

View file

@ -11,8 +11,8 @@
namespace Dynarmic::A64 { namespace Dynarmic::A64 {
std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) { std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor) {
o << fmt::format("{{{}, {}}}", loc.PC(), loc.FPCR().Value()); o << fmt::format("{{{}, {}}}", descriptor.PC(), descriptor.FPCR().Value());
return o; return o;
} }

View file

@ -43,7 +43,7 @@ struct TranslatorVisitor final {
u64 wmask, tmask; u64 wmask, tmask;
}; };
std::optional<BitMasks> DecodeBitMasks(bool N, Imm<6> immr, Imm<6> imms, bool immediate); std::optional<BitMasks> DecodeBitMasks(bool immN, Imm<6> imms, Imm<6> immr, bool immediate);
u64 AdvSIMDExpandImm(bool op, Imm<4> cmode, Imm<8> imm8); u64 AdvSIMDExpandImm(bool op, Imm<4> cmode, Imm<8> imm8);
IR::UAny I(size_t bitsize, u64 value); IR::UAny I(size_t bitsize, u64 value);