FPSCR: Make value constructor explicit (#13)

Maintains consistency between the PSR helper.
This commit is contained in:
Mat M 2016-09-03 07:48:31 -04:00 committed by Merry
parent 3e03524658
commit 8c4df46580
5 changed files with 5 additions and 5 deletions

View file

@ -47,7 +47,7 @@ struct Jit::Impl {
size_t Execute(size_t cycle_count) { size_t Execute(size_t cycle_count) {
u32 pc = jit_state.Reg[15]; u32 pc = jit_state.Reg[15];
Arm::LocationDescriptor descriptor{pc, Arm::PSR{jit_state.Cpsr}, jit_state.guest_FPSCR_mode}; Arm::LocationDescriptor descriptor{pc, Arm::PSR{jit_state.Cpsr}, Arm::FPSCR{jit_state.guest_FPSCR_mode}};
CodePtr code_ptr = GetBasicBlock(descriptor).code_ptr; CodePtr code_ptr = GetBasicBlock(descriptor).code_ptr;
return block_of_code.RunCode(&jit_state, code_ptr, cycle_count); return block_of_code.RunCode(&jit_state, code_ptr, cycle_count);

View file

@ -28,7 +28,7 @@ public:
FPSCR() = default; FPSCR() = default;
FPSCR(const FPSCR&) = default; FPSCR(const FPSCR&) = default;
FPSCR(FPSCR&&) = default; FPSCR(FPSCR&&) = default;
/* implicit */ FPSCR(u32 data) : value{data} {} explicit FPSCR(u32 data) : value{data} {}
FPSCR& operator=(const FPSCR&) = default; FPSCR& operator=(const FPSCR&) = default;
FPSCR& operator=(FPSCR&&) = default; FPSCR& operator=(FPSCR&&) = default;

View file

@ -118,7 +118,7 @@ struct LocationDescriptor {
} }
LocationDescriptor SetFPSCR(u32 new_fpscr) const { LocationDescriptor SetFPSCR(u32 new_fpscr) const {
return LocationDescriptor(arm_pc, cpsr, new_fpscr & FPSCR_MODE_MASK); return LocationDescriptor(arm_pc, cpsr, Arm::FPSCR{new_fpscr & FPSCR_MODE_MASK});
} }
u64 UniqueHash() const { u64 UniqueHash() const {

View file

@ -291,7 +291,7 @@ void FuzzJitArm(const size_t instruction_count, const size_t instructions_to_exe
size_t num_insts = 0; size_t num_insts = 0;
while (num_insts < instructions_to_execute_count) { while (num_insts < instructions_to_execute_count) {
Dynarmic::Arm::LocationDescriptor descriptor = {u32(num_insts * 4), Dynarmic::Arm::PSR{}, 0}; Dynarmic::Arm::LocationDescriptor descriptor = {u32(num_insts * 4), Dynarmic::Arm::PSR{}, Dynarmic::Arm::FPSCR{}};
Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate(descriptor, &MemoryRead32); Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate(descriptor, &MemoryRead32);
Dynarmic::Optimization::GetSetElimination(ir_block); Dynarmic::Optimization::GetSetElimination(ir_block);
Dynarmic::Optimization::DeadCodeElimination(ir_block); Dynarmic::Optimization::DeadCodeElimination(ir_block);

View file

@ -247,7 +247,7 @@ void FuzzJitThumb(const size_t instruction_count, const size_t instructions_to_e
Dynarmic::Arm::PSR cpsr; Dynarmic::Arm::PSR cpsr;
cpsr.T(true); cpsr.T(true);
Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate({0, cpsr, 0}, MemoryRead32); Dynarmic::IR::Block ir_block = Dynarmic::Arm::Translate({0, cpsr, Dynarmic::Arm::FPSCR{}}, MemoryRead32);
Dynarmic::Optimization::GetSetElimination(ir_block); Dynarmic::Optimization::GetSetElimination(ir_block);
Dynarmic::Optimization::DeadCodeElimination(ir_block); Dynarmic::Optimization::DeadCodeElimination(ir_block);
Dynarmic::Optimization::VerificationPass(ir_block); Dynarmic::Optimization::VerificationPass(ir_block);