diff --git a/src/backend_x64/a32_emit_x64.cpp b/src/backend_x64/a32_emit_x64.cpp index 9746f245..5f0e429f 100644 --- a/src/backend_x64/a32_emit_x64.cpp +++ b/src/backend_x64/a32_emit_x64.cpp @@ -28,8 +28,7 @@ // TODO: Have ARM flags in host flags and not have them use up GPR registers unless necessary. // TODO: Actually implement that proper instruction selector you've always wanted to sweetheart. -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -1212,5 +1211,4 @@ void A32EmitX64::EmitPatchMovRcx(CodePtr target_code_ptr) { code->EnsurePatchLocationSize(patch_location, 10); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a32_emit_x64.h b/src/backend_x64/a32_emit_x64.h index 4967ef3c..8d190498 100644 --- a/src/backend_x64/a32_emit_x64.h +++ b/src/backend_x64/a32_emit_x64.h @@ -16,8 +16,7 @@ #include "frontend/A32/location_descriptor.h" #include "frontend/ir/terminal.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class RegAlloc; @@ -84,5 +83,4 @@ protected: void EmitPatchMovRcx(CodePtr target_code_ptr = nullptr) override; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a32_interface.cpp b/src/backend_x64/a32_interface.cpp index e5739aad..ad332bc1 100644 --- a/src/backend_x64/a32_interface.cpp +++ b/src/backend_x64/a32_interface.cpp @@ -29,8 +29,7 @@ #include "frontend/ir/location_descriptor.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { using namespace BackendX64; @@ -325,5 +324,4 @@ std::string Jit::Disassemble(const IR::LocationDescriptor& descriptor) { return impl->Disassemble(descriptor); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/backend_x64/a32_jitstate.cpp b/src/backend_x64/a32_jitstate.cpp index ec6c56c2..5a9ee868 100644 --- a/src/backend_x64/a32_jitstate.cpp +++ b/src/backend_x64/a32_jitstate.cpp @@ -11,8 +11,7 @@ #include "common/common_types.h" #include "frontend/A32/location_descriptor.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { /** * CPSR Bits @@ -203,5 +202,4 @@ u64 A32JitState::GetUniqueHash() const { return CPSR_et | FPSCR_mode | (static_cast(Reg[15]) << 32); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a32_jitstate.h b/src/backend_x64/a32_jitstate.h index 8bd2c5f0..5294f8e4 100644 --- a/src/backend_x64/a32_jitstate.h +++ b/src/backend_x64/a32_jitstate.h @@ -12,8 +12,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class BlockOfCode; @@ -84,5 +83,4 @@ struct A32JitState { using CodePtr = const void*; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a64_emit_x64.cpp b/src/backend_x64/a64_emit_x64.cpp index 2ba37b32..09980eeb 100644 --- a/src/backend_x64/a64_emit_x64.cpp +++ b/src/backend_x64/a64_emit_x64.cpp @@ -27,8 +27,7 @@ // TODO: Have ARM flags in host flags and not have them use up GPR registers unless necessary. // TODO: Actually implement that proper instruction selector you've always wanted to sweetheart. -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -534,5 +533,4 @@ void A64EmitX64::EmitPatchMovRcx(CodePtr target_code_ptr) { code->EnsurePatchLocationSize(patch_location, 10); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a64_emit_x64.h b/src/backend_x64/a64_emit_x64.h index 46458c28..765d8d42 100644 --- a/src/backend_x64/a64_emit_x64.h +++ b/src/backend_x64/a64_emit_x64.h @@ -13,8 +13,7 @@ #include "frontend/A64/location_descriptor.h" #include "frontend/ir/terminal.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class RegAlloc; @@ -70,5 +69,4 @@ protected: void EmitPatchMovRcx(CodePtr target_code_ptr = nullptr) override; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a64_interface.cpp b/src/backend_x64/a64_interface.cpp index b5a88bb3..149366c4 100644 --- a/src/backend_x64/a64_interface.cpp +++ b/src/backend_x64/a64_interface.cpp @@ -21,8 +21,7 @@ #include "frontend/ir/basic_block.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { using namespace BackendX64; @@ -311,5 +310,4 @@ bool Jit::IsExecuting() const { return impl->IsExecuting(); } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/backend_x64/a64_jitstate.cpp b/src/backend_x64/a64_jitstate.cpp index bf87840f..a9b40c33 100644 --- a/src/backend_x64/a64_jitstate.cpp +++ b/src/backend_x64/a64_jitstate.cpp @@ -7,8 +7,7 @@ #include "backend_x64/a64_jitstate.h" #include "frontend/A64/location_descriptor.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { u64 A64JitState::GetUniqueHash() const { u64 fpcr_u64 = static_cast(fpcr & A64::LocationDescriptor::FPCR_MASK) << 37; @@ -16,5 +15,4 @@ u64 A64JitState::GetUniqueHash() const { return pc_u64 | fpcr_u64; } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/a64_jitstate.h b/src/backend_x64/a64_jitstate.h index 9b549655..430de5be 100644 --- a/src/backend_x64/a64_jitstate.h +++ b/src/backend_x64/a64_jitstate.h @@ -12,8 +12,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class BlockOfCode; @@ -82,5 +81,4 @@ struct A64JitState { using CodePtr = const void*; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/abi.cpp b/src/backend_x64/abi.cpp index 99c9c968..332cabf6 100644 --- a/src/backend_x64/abi.cpp +++ b/src/backend_x64/abi.cpp @@ -20,8 +20,7 @@ #include "common/common_types.h" #include "common/iterator_util.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { constexpr size_t GPR_SIZE = 8; constexpr size_t XMM_SIZE = 16; @@ -127,5 +126,4 @@ void ABI_PopCallerSaveRegistersAndAdjustStack(Xbyak::CodeGenerator* code, size_t ABI_PopRegistersAndAdjustStack(code, frame_size, ABI_ALL_CALLER_SAVE); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/abi.h b/src/backend_x64/abi.h index 09c079f5..073a6219 100644 --- a/src/backend_x64/abi.h +++ b/src/backend_x64/abi.h @@ -9,8 +9,7 @@ #include "backend_x64/hostloc.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { #ifdef _WIN32 @@ -115,5 +114,4 @@ void ABI_PopCalleeSaveRegistersAndAdjustStack(Xbyak::CodeGenerator* code, size_t void ABI_PushCallerSaveRegistersAndAdjustStack(Xbyak::CodeGenerator* code, size_t frame_size = 0); void ABI_PopCallerSaveRegistersAndAdjustStack(Xbyak::CodeGenerator* code, size_t frame_size = 0); -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/block_of_code.cpp b/src/backend_x64/block_of_code.cpp index 68db0e10..46aec346 100644 --- a/src/backend_x64/block_of_code.cpp +++ b/src/backend_x64/block_of_code.cpp @@ -14,8 +14,7 @@ #include "backend_x64/block_of_code.h" #include "common/assert.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { #ifdef _WIN32 const Xbyak::Reg64 BlockOfCode::ABI_RETURN = Xbyak::util::rax; @@ -243,5 +242,4 @@ bool BlockOfCode::DoesCpuSupport(Xbyak::util::Cpu::Type type) const { #endif } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/block_of_code.h b/src/backend_x64/block_of_code.h index b814e30a..57ad2835 100644 --- a/src/backend_x64/block_of_code.h +++ b/src/backend_x64/block_of_code.h @@ -18,8 +18,7 @@ #include "common/common_types.h" #include "dynarmic/A32/callbacks.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using CodePtr = const void*; @@ -147,5 +146,4 @@ private: Xbyak::util::Cpu cpu_info; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/block_range_information.cpp b/src/backend_x64/block_range_information.cpp index a5d1e51e..df1f854f 100644 --- a/src/backend_x64/block_range_information.cpp +++ b/src/backend_x64/block_range_information.cpp @@ -12,8 +12,7 @@ #include "backend_x64/block_range_information.h" #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { template void BlockRangeInformation::AddRange(boost::icl::discrete_interval range, IR::LocationDescriptor location) { @@ -43,5 +42,4 @@ std::unordered_set BlockRangeInformation; template class BlockRangeInformation; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/block_range_information.h b/src/backend_x64/block_range_information.h index 4976c477..5e27423f 100644 --- a/src/backend_x64/block_range_information.h +++ b/src/backend_x64/block_range_information.h @@ -13,8 +13,7 @@ #include "frontend/ir/location_descriptor.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { template class BlockRangeInformation { @@ -27,5 +26,4 @@ private: boost::icl::interval_map> block_ranges; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/callback.cpp b/src/backend_x64/callback.cpp index ceab3bb2..d1836b81 100644 --- a/src/backend_x64/callback.cpp +++ b/src/backend_x64/callback.cpp @@ -7,8 +7,7 @@ #include "backend_x64/block_of_code.h" #include "backend_x64/callback.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { void SimpleCallback::EmitCall(BlockOfCode* code, std::function l) { l(); @@ -54,5 +53,4 @@ void ArgCallback::EmitCall(BlockOfCode* code, std::functionCallFunction(fn); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/callback.h b/src/backend_x64/callback.h index 1014586b..98a448a0 100644 --- a/src/backend_x64/callback.h +++ b/src/backend_x64/callback.h @@ -12,8 +12,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class BlockOfCode; @@ -60,5 +59,4 @@ private: u64 arg; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/constant_pool.cpp b/src/backend_x64/constant_pool.cpp index acf41523..32df8cb2 100644 --- a/src/backend_x64/constant_pool.cpp +++ b/src/backend_x64/constant_pool.cpp @@ -10,8 +10,7 @@ #include "backend_x64/constant_pool.h" #include "common/assert.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { ConstantPool::ConstantPool(BlockOfCode* code, size_t size) : code(code), pool_size(size) { code->int3(); @@ -32,5 +31,4 @@ Xbyak::Address ConstantPool::GetConstant(u64 constant) { return code->xword[code->rip + iter->second]; } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/constant_pool.h b/src/backend_x64/constant_pool.h index 7ed708ac..27bd012b 100644 --- a/src/backend_x64/constant_pool.h +++ b/src/backend_x64/constant_pool.h @@ -12,8 +12,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class BlockOfCode; @@ -38,5 +37,4 @@ private: u8* current_pool_ptr; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index 9f75ce75..f0b04efd 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -18,8 +18,7 @@ // TODO: Have ARM flags in host flags and not have them use up GPR registers unless necessary. // TODO: Actually implement that proper instruction selector you've always wanted to sweetheart. -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -318,5 +317,4 @@ void EmitX64::InvalidateBasicBlocks(const std::unordered_set patch_information; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64_data_processing.cpp b/src/backend_x64/emit_x64_data_processing.cpp index a372535d..8a14f718 100644 --- a/src/backend_x64/emit_x64_data_processing.cpp +++ b/src/backend_x64/emit_x64_data_processing.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -1255,5 +1254,4 @@ void EmitX64::EmitCountLeadingZeros64(EmitContext& ctx, IR::Inst* inst) { } } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64_floating_point.cpp b/src/backend_x64/emit_x64_floating_point.cpp index 51b1d06d..4cb44b32 100644 --- a/src/backend_x64/emit_x64_floating_point.cpp +++ b/src/backend_x64/emit_x64_floating_point.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -600,5 +599,4 @@ void EmitX64::EmitFPU32ToDouble(EmitContext& ctx, IR::Inst* inst) { ctx.reg_alloc.DefineValue(inst, to); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64_packed.cpp b/src/backend_x64/emit_x64_packed.cpp index 8a8cb60e..9aa4f427 100644 --- a/src/backend_x64/emit_x64_packed.cpp +++ b/src/backend_x64/emit_x64_packed.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -702,5 +701,4 @@ void EmitX64::EmitPackedSelect(EmitContext& ctx, IR::Inst* inst) { } } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64_saturation.cpp b/src/backend_x64/emit_x64_saturation.cpp index 72ac906d..865ae643 100644 --- a/src/backend_x64/emit_x64_saturation.cpp +++ b/src/backend_x64/emit_x64_saturation.cpp @@ -13,8 +13,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -149,5 +148,4 @@ void EmitX64::EmitSignedSaturation(EmitContext& ctx, IR::Inst* inst) { ctx.reg_alloc.DefineValue(inst, result); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/emit_x64_vector.cpp b/src/backend_x64/emit_x64_vector.cpp index f086b545..08f89f83 100644 --- a/src/backend_x64/emit_x64_vector.cpp +++ b/src/backend_x64/emit_x64_vector.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { using namespace Xbyak::util; @@ -457,5 +456,4 @@ void EmitX64::EmitVectorZeroUpper(EmitContext& ctx, IR::Inst* inst) { ctx.reg_alloc.DefineValue(inst, a); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/exception_handler_generic.cpp b/src/backend_x64/exception_handler_generic.cpp index cd34da97..155ff506 100644 --- a/src/backend_x64/exception_handler_generic.cpp +++ b/src/backend_x64/exception_handler_generic.cpp @@ -6,8 +6,7 @@ #include "backend_x64/block_of_code.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { struct BlockOfCode::ExceptionHandler::Impl final { }; @@ -19,5 +18,4 @@ void BlockOfCode::ExceptionHandler::Register(BlockOfCode*) { // Do nothing } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/hostloc.cpp b/src/backend_x64/hostloc.cpp index f2082ce4..9361342a 100644 --- a/src/backend_x64/hostloc.cpp +++ b/src/backend_x64/hostloc.cpp @@ -8,8 +8,7 @@ #include "backend_x64/hostloc.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { Xbyak::Reg64 HostLocToReg64(HostLoc loc) { ASSERT(HostLocIsGPR(loc)); @@ -21,5 +20,4 @@ Xbyak::Xmm HostLocToXmm(HostLoc loc) { return Xbyak::Xmm(static_cast(loc) - static_cast(HostLoc::XMM0)); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/hostloc.h b/src/backend_x64/hostloc.h index 172e069a..2d29c87a 100644 --- a/src/backend_x64/hostloc.h +++ b/src/backend_x64/hostloc.h @@ -10,8 +10,7 @@ #include "common/assert.h" #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { enum class HostLoc { // Ordering of the registers is intentional. See also: HostLocToX64. @@ -113,5 +112,4 @@ Xbyak::Address SpillToOpArg(HostLoc loc) { return JitStateType::GetSpillLocationFromIndex(i); } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/jitstate_info.h b/src/backend_x64/jitstate_info.h index 7295a3d9..19b714ea 100644 --- a/src/backend_x64/jitstate_info.h +++ b/src/backend_x64/jitstate_info.h @@ -10,8 +10,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { struct JitStateInfo { template @@ -44,5 +43,4 @@ struct JitStateInfo { const size_t offsetof_FPSCR_UFC; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/oparg.h b/src/backend_x64/oparg.h index cc98f049..f24e2566 100644 --- a/src/backend_x64/oparg.h +++ b/src/backend_x64/oparg.h @@ -10,8 +10,7 @@ #include "common/assert.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { struct OpArg { OpArg() : type(Type::Operand), inner_operand() {} @@ -76,5 +75,4 @@ private: }; }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/reg_alloc.cpp b/src/backend_x64/reg_alloc.cpp index 86c9dbf8..4b0f7861 100644 --- a/src/backend_x64/reg_alloc.cpp +++ b/src/backend_x64/reg_alloc.cpp @@ -14,8 +14,7 @@ #include "backend_x64/reg_alloc.h" #include "common/assert.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { static u64 ImmediateToU64(const IR::Value& imm) { switch (imm.GetType()) { @@ -641,5 +640,4 @@ void RegAlloc::EmitExchange(HostLoc a, HostLoc b) { } } -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/backend_x64/reg_alloc.h b/src/backend_x64/reg_alloc.h index 4032a361..ff5a5004 100644 --- a/src/backend_x64/reg_alloc.h +++ b/src/backend_x64/reg_alloc.h @@ -21,8 +21,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace BackendX64 { +namespace Dynarmic::BackendX64 { class RegAlloc; @@ -150,5 +149,4 @@ private: void EmitExchange(HostLoc a, HostLoc b); }; -} // namespace BackendX64 -} // namespace Dynarmic +} // namespace Dynarmic::BackendX64 diff --git a/src/common/address_range.h b/src/common/address_range.h index f1abdb97..edf7bcf3 100644 --- a/src/common/address_range.h +++ b/src/common/address_range.h @@ -8,8 +8,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { struct AddressRange { u32 start_address; @@ -21,5 +20,4 @@ struct AddressRange { } }; -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/bit_util.h b/src/common/bit_util.h index 3168578d..ae4f83cc 100644 --- a/src/common/bit_util.h +++ b/src/common/bit_util.h @@ -13,8 +13,7 @@ #include "common/assert.h" -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { /// The size of a type in terms of bits template @@ -135,5 +134,4 @@ inline T RotateRight(T value, size_t amount) { return static_cast((x >> amount) | (x << (BitSize() - amount))); } -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index c4c5cb38..f2cc4e40 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -13,8 +13,7 @@ #include "common/assert.h" -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { template class IntrusiveList; template class IntrusiveListIterator; @@ -374,5 +373,4 @@ void swap(IntrusiveList& lhs, IntrusiveList& rhs) noexcept { lhs.swap(rhs); } -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/iterator_util.h b/src/common/iterator_util.h index ebce315a..f95fc165 100644 --- a/src/common/iterator_util.h +++ b/src/common/iterator_util.h @@ -8,9 +8,7 @@ #include -namespace Dynarmic { -namespace Common { - +namespace Dynarmic::Common { namespace detail { template @@ -35,5 +33,4 @@ detail::ReverseAdapter Reverse(T&& iterable) { return detail::ReverseAdapter{iterable}; } -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/memory_pool.cpp b/src/common/memory_pool.cpp index 71c102a2..da2ce5b8 100644 --- a/src/common/memory_pool.cpp +++ b/src/common/memory_pool.cpp @@ -8,8 +8,7 @@ #include "common/memory_pool.h" -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { Pool::Pool(size_t object_size, size_t initial_pool_size) : object_size(object_size), slab_size(initial_pool_size) { AllocateNewSlab(); @@ -42,6 +41,4 @@ void Pool::AllocateNewSlab() { remaining = slab_size; } - -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/memory_pool.h b/src/common/memory_pool.h index 90ca59d7..8a3e8996 100644 --- a/src/common/memory_pool.h +++ b/src/common/memory_pool.h @@ -9,8 +9,7 @@ #include #include -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { class Pool { public: @@ -44,5 +43,4 @@ private: std::vector slabs; }; -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/mp.h b/src/common/mp.h index 10ca0e82..f96d8947 100644 --- a/src/common/mp.h +++ b/src/common/mp.h @@ -9,8 +9,7 @@ #include #include -namespace Dynarmic { -namespace mp { +namespace Dynarmic::mp { /// Used to provide information about an arbitrary function. template @@ -80,5 +79,4 @@ using return_type_t = typename FunctionInfo::return_type; template using class_type_t = typename FunctionInfo::class_type; -} // namespace mp -} // namespace Dynarmic +} // namespace Dynarmic::mp diff --git a/src/common/string_util.h b/src/common/string_util.h index ceabe3c8..67c21912 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -6,13 +6,11 @@ #pragma once -namespace Dynarmic { -namespace Common { +namespace Dynarmic::Common { template constexpr char SignToChar(T value) { return value >= 0 ? '+' : '-'; } -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/common/variant_util.h b/src/common/variant_util.h index 1d7921de..e37af0dd 100644 --- a/src/common/variant_util.h +++ b/src/common/variant_util.h @@ -8,9 +8,7 @@ #include -namespace Dynarmic { -namespace Common { - +namespace Dynarmic::Common { namespace detail { template @@ -29,5 +27,4 @@ inline ReturnT VisitVariant(Variant&& variant, Lambda&& lambda) { return boost::apply_visitor(detail::VariantVisitor(std::move(lambda)), variant); } -} // namespace Common -} // namespace Dynarmic +} // namespace Dynarmic::Common diff --git a/src/frontend/A32/FPSCR.h b/src/frontend/A32/FPSCR.h index 9e6b2aa8..51eb40f7 100644 --- a/src/frontend/A32/FPSCR.h +++ b/src/frontend/A32/FPSCR.h @@ -11,8 +11,7 @@ #include "common/bit_util.h" #include "common/common_types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { /** * Representation of the Floating-Point Status and Control Register. @@ -195,5 +194,4 @@ inline bool operator!=(FPSCR lhs, FPSCR rhs) { return !operator==(lhs, rhs); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/PSR.h b/src/frontend/A32/PSR.h index cb0860f0..d70745e7 100644 --- a/src/frontend/A32/PSR.h +++ b/src/frontend/A32/PSR.h @@ -9,8 +9,7 @@ #include "common/bit_util.h" #include "common/common_types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { /** * Program Status Register @@ -221,5 +220,4 @@ inline bool operator!=(PSR lhs, PSR rhs) { return !operator==(lhs, rhs); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/decoder/arm.h b/src/frontend/A32/decoder/arm.h index 31ad8824..0219d33c 100644 --- a/src/frontend/A32/decoder/arm.h +++ b/src/frontend/A32/decoder/arm.h @@ -19,8 +19,7 @@ #include "frontend/decoder/decoder_detail.h" #include "frontend/decoder/matcher.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { template using ArmMatcher = Decoder::Matcher; @@ -330,5 +329,4 @@ boost::optional&> DecodeArm(u32 instruction) { return iter != table.end() ? boost::optional&>(*iter) : boost::none; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/decoder/thumb16.h b/src/frontend/A32/decoder/thumb16.h index bd413d80..0f7650b6 100644 --- a/src/frontend/A32/decoder/thumb16.h +++ b/src/frontend/A32/decoder/thumb16.h @@ -14,8 +14,7 @@ #include "frontend/decoder/decoder_detail.h" #include "frontend/decoder/matcher.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { template using Thumb16Matcher = Decoder::Matcher; @@ -123,5 +122,4 @@ boost::optional&> DecodeThumb16(u16 instruction) { return iter != table.end() ? boost::optional&>(*iter) : boost::none; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/decoder/thumb32.h b/src/frontend/A32/decoder/thumb32.h index b4913de2..23c07f4c 100644 --- a/src/frontend/A32/decoder/thumb32.h +++ b/src/frontend/A32/decoder/thumb32.h @@ -14,8 +14,7 @@ #include "frontend/decoder/decoder_detail.h" #include "frontend/decoder/matcher.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { template using Thumb32Matcher = Decoder::Matcher; @@ -43,5 +42,4 @@ boost::optional&> DecodeThumb32(u32 instruction) { return iter != table.end() ? boost::optional&>(*iter) : boost::none; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/decoder/vfp2.h b/src/frontend/A32/decoder/vfp2.h index 285f7f3b..4bc4766a 100644 --- a/src/frontend/A32/decoder/vfp2.h +++ b/src/frontend/A32/decoder/vfp2.h @@ -14,8 +14,7 @@ #include "frontend/decoder/decoder_detail.h" #include "frontend/decoder/matcher.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { template using VFP2Matcher = Decoder::Matcher; @@ -88,5 +87,4 @@ boost::optional&> DecodeVFP2(u32 instruction) { return iter != table.end() ? boost::optional&>(*iter) : boost::none; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/disassembler/disassembler.h b/src/frontend/A32/disassembler/disassembler.h index dc7e7149..2f789d7b 100644 --- a/src/frontend/A32/disassembler/disassembler.h +++ b/src/frontend/A32/disassembler/disassembler.h @@ -10,11 +10,9 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { std::string DisassembleArm(u32 instruction); std::string DisassembleThumb16(u16 instruction); -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/disassembler/disassembler_arm.cpp b/src/frontend/A32/disassembler/disassembler_arm.cpp index 9d2951c9..dbd34f9d 100644 --- a/src/frontend/A32/disassembler/disassembler_arm.cpp +++ b/src/frontend/A32/disassembler/disassembler_arm.cpp @@ -17,8 +17,7 @@ #include "frontend/A32/disassembler/disassembler.h" #include "frontend/A32/types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { class DisassemblerVisitor { public: @@ -1079,5 +1078,4 @@ std::string DisassembleArm(u32 instruction) { } } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/disassembler/disassembler_thumb.cpp b/src/frontend/A32/disassembler/disassembler_thumb.cpp index 83c4678a..10b3c986 100644 --- a/src/frontend/A32/disassembler/disassembler_thumb.cpp +++ b/src/frontend/A32/disassembler/disassembler_thumb.cpp @@ -16,8 +16,7 @@ #include "frontend/A32/disassembler/disassembler.h" #include "frontend/A32/types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { class DisassemblerVisitor { public: @@ -332,5 +331,4 @@ std::string DisassembleThumb16(u16 instruction) { return !decoder ? fmt::format("UNKNOWN: {:x}", instruction) : decoder->call(visitor, instruction); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/ir_emitter.cpp b/src/frontend/A32/ir_emitter.cpp index 8eebc48a..38428403 100644 --- a/src/frontend/A32/ir_emitter.cpp +++ b/src/frontend/A32/ir_emitter.cpp @@ -8,8 +8,7 @@ #include "frontend/A32/ir_emitter.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { using Opcode = IR::Opcode; @@ -320,5 +319,4 @@ void IREmitter::CoprocStoreWords(size_t coproc_no, bool two, bool long_transfer, Inst(Opcode::A32CoprocStoreWords, IR::Value(coproc_info), address); } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/ir_emitter.h b/src/frontend/A32/ir_emitter.h index 5f735603..821f35dc 100644 --- a/src/frontend/A32/ir_emitter.h +++ b/src/frontend/A32/ir_emitter.h @@ -16,8 +16,7 @@ #include "frontend/ir/ir_emitter.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { /** * Convenience class to construct a basic block of the intermediate representation. @@ -87,5 +86,4 @@ public: void CoprocStoreWords(size_t coproc_no, bool two, bool long_transfer, CoprocReg CRd, const IR::U32& address, bool has_option, u8 option); }; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/location_descriptor.cpp b/src/frontend/A32/location_descriptor.cpp index ae459474..3d829924 100644 --- a/src/frontend/A32/location_descriptor.cpp +++ b/src/frontend/A32/location_descriptor.cpp @@ -8,8 +8,7 @@ #include #include "frontend/A32/location_descriptor.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) { o << fmt::format("{{{},{},{},{}}}", @@ -20,5 +19,4 @@ std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) { return o; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/location_descriptor.h b/src/frontend/A32/location_descriptor.h index 19b6054d..78e9c3d7 100644 --- a/src/frontend/A32/location_descriptor.h +++ b/src/frontend/A32/location_descriptor.h @@ -14,8 +14,7 @@ #include "frontend/A32/PSR.h" #include "frontend/ir/location_descriptor.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { /** * LocationDescriptor describes the location of a basic block. @@ -108,8 +107,7 @@ private: */ std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor); -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 namespace std { template <> diff --git a/src/frontend/A32/translate/translate.cpp b/src/frontend/A32/translate/translate.cpp index de47b6f1..b4bcdc10 100644 --- a/src/frontend/A32/translate/translate.cpp +++ b/src/frontend/A32/translate/translate.cpp @@ -8,8 +8,7 @@ #include "frontend/A32/translate/translate.h" #include "frontend/ir/basic_block.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { IR::Block TranslateArm(LocationDescriptor descriptor, MemoryReadCodeFuncType memory_read_code); IR::Block TranslateThumb(LocationDescriptor descriptor, MemoryReadCodeFuncType memory_read_code); @@ -18,5 +17,4 @@ IR::Block Translate(LocationDescriptor descriptor, MemoryReadCodeFuncType memory return (descriptor.TFlag() ? TranslateThumb : TranslateArm)(descriptor, memory_read_code); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate.h b/src/frontend/A32/translate/translate.h index 255d491a..b251570c 100644 --- a/src/frontend/A32/translate/translate.h +++ b/src/frontend/A32/translate/translate.h @@ -7,13 +7,11 @@ #include "common/common_types.h" -namespace Dynarmic { - -namespace IR { +namespace Dynarmic::IR { class Block; -} // namespace IR +} // namespace Dynarmic::IR -namespace A32 { +namespace Dynarmic::A32 { class LocationDescriptor; @@ -27,5 +25,4 @@ using MemoryReadCodeFuncType = u32 (*)(u32 vaddr); */ IR::Block Translate(LocationDescriptor descriptor, MemoryReadCodeFuncType memory_read_code); -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm.cpp b/src/frontend/A32/translate/translate_arm.cpp index 14cb593c..af1da5ad 100644 --- a/src/frontend/A32/translate/translate_arm.cpp +++ b/src/frontend/A32/translate/translate_arm.cpp @@ -15,8 +15,7 @@ #include "frontend/A32/types.h" #include "frontend/ir/basic_block.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { static bool CondCanContinue(ConditionalState cond_state, const A32::IREmitter& ir) { ASSERT_MSG(cond_state != ConditionalState::Break, "Should never happen."); @@ -157,5 +156,4 @@ IR::ResultAndCarry ArmTranslatorVisitor::EmitRegShift(IR::U32 value, Sh return {}; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/branch.cpp b/src/frontend/A32/translate/translate_arm/branch.cpp index 0d75dcd5..c593e953 100644 --- a/src/frontend/A32/translate/translate_arm/branch.cpp +++ b/src/frontend/A32/translate/translate_arm/branch.cpp @@ -8,8 +8,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_B(Cond cond, Imm24 imm24) { u32 imm32 = Common::SignExtend<26, u32>(imm24 << 2) + 8; @@ -77,5 +76,4 @@ bool ArmTranslatorVisitor::arm_BXJ(Cond cond, Reg m) { return arm_BX(cond, m); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/coprocessor.cpp b/src/frontend/A32/translate/translate_arm/coprocessor.cpp index 10ce4340..a73c137d 100644 --- a/src/frontend/A32/translate/translate_arm/coprocessor.cpp +++ b/src/frontend/A32/translate/translate_arm/coprocessor.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_CDP(Cond cond, size_t opc1, CoprocReg CRn, CoprocReg CRd, size_t coproc_no, size_t opc2, CoprocReg CRm) { if ((coproc_no & 0b1110) == 0b1010) @@ -146,5 +145,4 @@ bool ArmTranslatorVisitor::arm_STC(Cond cond, bool p, bool u, bool d, bool w, Re return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/data_processing.cpp b/src/frontend/A32/translate/translate_arm/data_processing.cpp index bf14f2cb..58711cb3 100644 --- a/src/frontend/A32/translate/translate_arm/data_processing.cpp +++ b/src/frontend/A32/translate/translate_arm/data_processing.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_ADC_imm(Cond cond, bool S, Reg n, Reg d, int rotate, Imm8 imm8) { // ADC{S} , , # @@ -889,5 +888,4 @@ bool ArmTranslatorVisitor::arm_TST_rsr(Cond cond, Reg n, Reg s, ShiftType shift, return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/exception_generating.cpp b/src/frontend/A32/translate/translate_arm/exception_generating.cpp index 31d69dac..69c412eb 100644 --- a/src/frontend/A32/translate/translate_arm/exception_generating.cpp +++ b/src/frontend/A32/translate/translate_arm/exception_generating.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_BKPT(Cond /*cond*/, Imm12 /*imm12*/, Imm4 /*imm4*/) { return InterpretThisInstruction(); @@ -30,5 +29,4 @@ bool ArmTranslatorVisitor::arm_UDF() { return InterpretThisInstruction(); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/extension.cpp b/src/frontend/A32/translate/translate_arm/extension.cpp index 5447049e..a7c6edf6 100644 --- a/src/frontend/A32/translate/translate_arm/extension.cpp +++ b/src/frontend/A32/translate/translate_arm/extension.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { static IR::U32 Rotate(A32::IREmitter& ir, Reg m, SignExtendRotation rotate) { const u8 rotate_by = static_cast(static_cast(rotate) * 8); @@ -181,5 +180,4 @@ bool ArmTranslatorVisitor::arm_UXTH(Cond cond, Reg d, SignExtendRotation rotate, return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/load_store.cpp b/src/frontend/A32/translate/translate_arm/load_store.cpp index 4604a1d1..d5402c43 100644 --- a/src/frontend/A32/translate/translate_arm/load_store.cpp +++ b/src/frontend/A32/translate/translate_arm/load_store.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_LDRBT() { ASSERT_MSG(false, "System instructions unimplemented"); @@ -755,5 +754,4 @@ bool ArmTranslatorVisitor::arm_STM_usr() { return InterpretThisInstruction(); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/misc.cpp b/src/frontend/A32/translate/translate_arm/misc.cpp index 5f3c8ab7..9624b1e4 100644 --- a/src/frontend/A32/translate/translate_arm/misc.cpp +++ b/src/frontend/A32/translate/translate_arm/misc.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_CLZ(Cond cond, Reg d, Reg m) { if (d == Reg::PC || m == Reg::PC) @@ -32,5 +31,4 @@ bool ArmTranslatorVisitor::arm_SEL(Cond cond, Reg n, Reg d, Reg m) { return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/multiply.cpp b/src/frontend/A32/translate/translate_arm/multiply.cpp index 650ea92e..80f62553 100644 --- a/src/frontend/A32/translate/translate_arm/multiply.cpp +++ b/src/frontend/A32/translate/translate_arm/multiply.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { // Multiply (Normal) instructions bool ArmTranslatorVisitor::arm_MLA(Cond cond, bool S, Reg d, Reg a, Reg m, Reg n) { @@ -428,5 +427,4 @@ bool ArmTranslatorVisitor::arm_SMUSD(Cond cond, Reg d, Reg m, bool M, Reg n) { return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/packing.cpp b/src/frontend/A32/translate/translate_arm/packing.cpp index 7062044a..a0e10288 100644 --- a/src/frontend/A32/translate/translate_arm/packing.cpp +++ b/src/frontend/A32/translate/translate_arm/packing.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_PKHBT(Cond cond, Reg n, Reg d, Imm5 imm5, Reg m) { if (n == Reg::PC || d == Reg::PC || m == Reg::PC) @@ -37,5 +36,4 @@ bool ArmTranslatorVisitor::arm_PKHTB(Cond cond, Reg n, Reg d, Imm5 imm5, Reg m) return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/parallel.cpp b/src/frontend/A32/translate/translate_arm/parallel.cpp index bbba20dc..4ae36610 100644 --- a/src/frontend/A32/translate/translate_arm/parallel.cpp +++ b/src/frontend/A32/translate/translate_arm/parallel.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { // Parallel Add/Subtract (Modulo arithmetic) instructions bool ArmTranslatorVisitor::arm_SADD8(Cond cond, Reg n, Reg d, Reg m) { @@ -365,5 +364,4 @@ bool ArmTranslatorVisitor::arm_UHSUB16(Cond cond, Reg n, Reg d, Reg m) { return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/reversal.cpp b/src/frontend/A32/translate/translate_arm/reversal.cpp index 75fe15c7..f561bdd9 100644 --- a/src/frontend/A32/translate/translate_arm/reversal.cpp +++ b/src/frontend/A32/translate/translate_arm/reversal.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_REV(Cond cond, Reg d, Reg m) { // REV , @@ -47,5 +46,4 @@ bool ArmTranslatorVisitor::arm_REVSH(Cond cond, Reg d, Reg m) { return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/saturated.cpp b/src/frontend/A32/translate/translate_arm/saturated.cpp index 455d3175..dac7307d 100644 --- a/src/frontend/A32/translate/translate_arm/saturated.cpp +++ b/src/frontend/A32/translate/translate_arm/saturated.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { static IR::U32 Pack2x16To1x32(A32::IREmitter& ir, IR::U32 lo, IR::U32 hi) { return ir.Or(ir.And(lo, ir.Imm32(0xFFFF)), ir.LogicalShiftLeft(hi, ir.Imm8(16), ir.Imm1(0)).result); @@ -240,5 +239,4 @@ bool ArmTranslatorVisitor::arm_UQSAX(Cond cond, Reg n, Reg d, Reg m) { return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/status_register_access.cpp b/src/frontend/A32/translate/translate_arm/status_register_access.cpp index b001bf14..da6f4456 100644 --- a/src/frontend/A32/translate/translate_arm/status_register_access.cpp +++ b/src/frontend/A32/translate/translate_arm/status_register_access.cpp @@ -8,8 +8,7 @@ #include "common/bit_util.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_CPS() { return InterpretThisInstruction(); @@ -76,5 +75,4 @@ bool ArmTranslatorVisitor::arm_SRS() { return InterpretThisInstruction(); } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/synchronization.cpp b/src/frontend/A32/translate/translate_arm/synchronization.cpp index 556211dc..5b5ca96f 100644 --- a/src/frontend/A32/translate/translate_arm/synchronization.cpp +++ b/src/frontend/A32/translate/translate_arm/synchronization.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { bool ArmTranslatorVisitor::arm_CLREX() { // CLREX @@ -158,5 +157,4 @@ bool ArmTranslatorVisitor::arm_SWPB(Cond cond, Reg n, Reg t, Reg t2) { } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/translate_arm.h b/src/frontend/A32/translate/translate_arm/translate_arm.h index 4d1db30b..6d63c55c 100644 --- a/src/frontend/A32/translate/translate_arm/translate_arm.h +++ b/src/frontend/A32/translate/translate_arm/translate_arm.h @@ -9,8 +9,7 @@ #include "frontend/A32/ir_emitter.h" #include "frontend/A32/location_descriptor.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { enum class ConditionalState { /// We haven't met any conditional instructions yet. @@ -384,5 +383,4 @@ struct ArmTranslatorVisitor final { bool vfp2_VLDM_a2(Cond cond, bool p, bool u, bool D, bool w, Reg n, size_t Vd, Imm8 imm8); }; -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_arm/vfp2.cpp b/src/frontend/A32/translate/translate_arm/vfp2.cpp index cd6ef39c..a3cf9198 100644 --- a/src/frontend/A32/translate/translate_arm/vfp2.cpp +++ b/src/frontend/A32/translate/translate_arm/vfp2.cpp @@ -6,8 +6,7 @@ #include "translate_arm.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { static ExtReg ToExtReg(bool sz, size_t base, bool bit) { if (sz) { @@ -827,5 +826,4 @@ bool ArmTranslatorVisitor::vfp2_VLDM_a2(Cond cond, bool p, bool u, bool D, bool return true; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/translate/translate_thumb.cpp b/src/frontend/A32/translate/translate_thumb.cpp index b9342eb3..d71cc472 100644 --- a/src/frontend/A32/translate/translate_thumb.cpp +++ b/src/frontend/A32/translate/translate_thumb.cpp @@ -15,9 +15,7 @@ #include "frontend/A32/translate/translate.h" #include "frontend/A32/types.h" -namespace Dynarmic { -namespace A32 { - +namespace Dynarmic::A32 { namespace { struct ThumbTranslatorVisitor final { @@ -915,5 +913,4 @@ IR::Block TranslateThumb(LocationDescriptor descriptor, MemoryReadCodeFuncType m return block; } -} // namespace A32 -} // namepsace Dynarmic +} // namepsace Dynarmic::A32 diff --git a/src/frontend/A32/types.cpp b/src/frontend/A32/types.cpp index da418cee..5b43eeea 100644 --- a/src/frontend/A32/types.cpp +++ b/src/frontend/A32/types.cpp @@ -10,8 +10,7 @@ #include "common/bit_util.h" #include "frontend/A32/types.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { const char* CondToString(Cond cond, bool explicit_al) { constexpr std::array cond_strs = { @@ -78,5 +77,4 @@ std::ostream& operator<<(std::ostream& o, RegList reg_list) { return o; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A32/types.h b/src/frontend/A32/types.h index 36393e87..6dcb02c5 100644 --- a/src/frontend/A32/types.h +++ b/src/frontend/A32/types.h @@ -16,8 +16,7 @@ #include "common/common_types.h" #include "frontend/ir/cond.h" -namespace Dynarmic { -namespace A32 { +namespace Dynarmic::A32 { using Cond = IR::Cond; @@ -118,5 +117,4 @@ inline ExtReg operator+(ExtReg reg, size_t number) { return new_reg; } -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::A32 diff --git a/src/frontend/A64/FPCR.h b/src/frontend/A64/FPCR.h index d2a17c9a..5c1c524f 100644 --- a/src/frontend/A64/FPCR.h +++ b/src/frontend/A64/FPCR.h @@ -11,8 +11,7 @@ #include "common/bit_util.h" #include "common/common_types.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { /** * Representation of the Floating-Point Control Register. @@ -108,5 +107,4 @@ inline bool operator!=(FPCR lhs, FPCR rhs) { return !operator==(lhs, rhs); } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/decoder/a64.h b/src/frontend/A64/decoder/a64.h index c8a57637..8f10b541 100644 --- a/src/frontend/A64/decoder/a64.h +++ b/src/frontend/A64/decoder/a64.h @@ -17,8 +17,7 @@ #include "frontend/decoder/decoder_detail.h" #include "frontend/decoder/matcher.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { template using Matcher = Decoder::Matcher; @@ -49,5 +48,4 @@ boost::optional&> Decode(u32 instruction) { return iter != table.end() ? boost::optional&>(*iter) : boost::none; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/imm.h b/src/frontend/A64/imm.h index 5de4fd5d..69fd2e32 100644 --- a/src/frontend/A64/imm.h +++ b/src/frontend/A64/imm.h @@ -11,8 +11,7 @@ #include "common/common_types.h" #include "common/math_util.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { /** * Imm represents an immediate value in an AArch64 instruction. @@ -96,5 +95,4 @@ auto concatenate(Imm first, Imm ...rest) { } } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/ir_emitter.cpp b/src/frontend/A64/ir_emitter.cpp index e2bf70e8..458dbf94 100644 --- a/src/frontend/A64/ir_emitter.cpp +++ b/src/frontend/A64/ir_emitter.cpp @@ -8,8 +8,7 @@ #include "frontend/A64/ir_emitter.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { using Opcode = IR::Opcode; @@ -134,5 +133,4 @@ void IREmitter::SetPC(const IR::U64& value) { Inst(Opcode::A64SetPC, value); } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/ir_emitter.h b/src/frontend/A64/ir_emitter.h index 4bf6c9b7..8805708f 100644 --- a/src/frontend/A64/ir_emitter.h +++ b/src/frontend/A64/ir_emitter.h @@ -16,8 +16,7 @@ #include "frontend/ir/ir_emitter.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { /** * Convenience class to construct a basic block of the intermediate representation. @@ -64,5 +63,4 @@ public: void SetPC(const IR::U64& value); }; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/location_descriptor.cpp b/src/frontend/A64/location_descriptor.cpp index cbde1a5d..077537b5 100644 --- a/src/frontend/A64/location_descriptor.cpp +++ b/src/frontend/A64/location_descriptor.cpp @@ -9,13 +9,11 @@ #include "frontend/A64/location_descriptor.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { std::ostream& operator<<(std::ostream& o, const LocationDescriptor& loc) { o << fmt::format("{{{}, {}}}", loc.PC(), loc.FPCR().Value()); return o; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/location_descriptor.h b/src/frontend/A64/location_descriptor.h index 1b351b1f..bb8b1e87 100644 --- a/src/frontend/A64/location_descriptor.h +++ b/src/frontend/A64/location_descriptor.h @@ -15,8 +15,7 @@ #include "frontend/A64/FPCR.h" #include "frontend/ir/location_descriptor.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { /** * LocationDescriptor describes the location of a basic block. @@ -76,8 +75,7 @@ private: */ std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor); -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 namespace std { template <> diff --git a/src/frontend/A64/translate/impl/branch.cpp b/src/frontend/A64/translate/impl/branch.cpp index 0b549be2..a4f448e7 100644 --- a/src/frontend/A64/translate/impl/branch.cpp +++ b/src/frontend/A64/translate/impl/branch.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::B_cond(Imm<19> imm19, Cond cond) { s64 offset = concatenate(imm19, Imm<2>{0}).SignExtend(); @@ -127,5 +126,4 @@ bool TranslatorVisitor::TBNZ(Imm<1> b5, Imm<5> b40, Imm<14> imm14, Reg Rt) { return false; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_addsub.cpp b/src/frontend/A64/translate/impl/data_processing_addsub.cpp index 34059040..87771017 100644 --- a/src/frontend/A64/translate/impl/data_processing_addsub.cpp +++ b/src/frontend/A64/translate/impl/data_processing_addsub.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::ADD_imm(bool sf, Imm<2> shift, Imm<12> imm12, Reg Rn, Reg Rd) { size_t datasize = sf ? 64 : 32; @@ -321,5 +320,4 @@ bool TranslatorVisitor::SBCS(bool sf, Reg Rm, Reg Rn, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_bitfield.cpp b/src/frontend/A64/translate/impl/data_processing_bitfield.cpp index fd329fd2..10085dc7 100644 --- a/src/frontend/A64/translate/impl/data_processing_bitfield.cpp +++ b/src/frontend/A64/translate/impl/data_processing_bitfield.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { static IR::U32U64 ReplicateBit(IREmitter& ir, const IR::U32U64& value, u8 bit_position_to_replicate) { u8 datasize = value.GetType() == IR::Type::U64 ? 64 : 32; @@ -77,5 +76,4 @@ bool TranslatorVisitor::UBFM(bool sf, bool N, Imm<6> immr, Imm<6> imms, Reg Rn, return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp b/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp index 5b319b5f..5d1c531b 100644 --- a/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp +++ b/src/frontend/A64/translate/impl/data_processing_conditional_select.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::CSEL(bool sf, Reg Rm, Cond cond, Reg Rn, Reg Rd) { size_t datasize = sf ? 64 : 32; @@ -58,5 +57,4 @@ bool TranslatorVisitor::CSNEG(bool sf, Reg Rm, Cond cond, Reg Rn, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_logical.cpp b/src/frontend/A64/translate/impl/data_processing_logical.cpp index 8e6bb813..9bf44e37 100644 --- a/src/frontend/A64/translate/impl/data_processing_logical.cpp +++ b/src/frontend/A64/translate/impl/data_processing_logical.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::AND_imm(bool sf, bool N, Imm<6> immr, Imm<6> imms, Reg Rn, Reg Rd) { size_t datasize = sf ? 64 : 32; @@ -212,5 +211,4 @@ bool TranslatorVisitor::BICS(bool sf, Imm<2> shift, Reg Rm, Imm<6> imm6, Reg Rn, return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_multiply.cpp b/src/frontend/A64/translate/impl/data_processing_multiply.cpp index af0f42bb..16c4b9c1 100644 --- a/src/frontend/A64/translate/impl/data_processing_multiply.cpp +++ b/src/frontend/A64/translate/impl/data_processing_multiply.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::MADD(bool sf, Reg Rm, Reg Ra, Reg Rn, Reg Rd) { const size_t datasize = sf ? 64 : 32; @@ -103,5 +102,4 @@ bool TranslatorVisitor::SDIV(bool sf, Reg Rm, Reg Rn, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_pcrel.cpp b/src/frontend/A64/translate/impl/data_processing_pcrel.cpp index b8b6ea37..cf2f7245 100644 --- a/src/frontend/A64/translate/impl/data_processing_pcrel.cpp +++ b/src/frontend/A64/translate/impl/data_processing_pcrel.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::ADR(Imm<2> immlo, Imm<19> immhi, Reg Rd) { u64 imm = concatenate(immhi, immlo).SignExtend(); @@ -23,5 +22,4 @@ bool TranslatorVisitor::ADRP(Imm<2> immlo, Imm<19> immhi, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_register.cpp b/src/frontend/A64/translate/impl/data_processing_register.cpp index b7a20a9c..7d376781 100644 --- a/src/frontend/A64/translate/impl/data_processing_register.cpp +++ b/src/frontend/A64/translate/impl/data_processing_register.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::CLZ_int(bool sf, Reg Rn, Reg Rd) { const size_t datasize = sf ? 64 : 32; @@ -113,5 +112,4 @@ bool TranslatorVisitor::REV16_int(bool sf, Reg Rn, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/data_processing_shift.cpp b/src/frontend/A64/translate/impl/data_processing_shift.cpp index 1425d2ea..41530a6c 100644 --- a/src/frontend/A64/translate/impl/data_processing_shift.cpp +++ b/src/frontend/A64/translate/impl/data_processing_shift.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { static IR::U8 SanitizeShiftAmount(TranslatorVisitor& tv, IREmitter& ir, size_t datasize, const IR::U32U64& amount) { @@ -62,5 +61,4 @@ bool TranslatorVisitor::RORV(bool sf, Reg Rm, Reg Rn, Reg Rd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/exception_generating.cpp b/src/frontend/A64/translate/impl/exception_generating.cpp index 18f7ee91..3b6ccf9a 100644 --- a/src/frontend/A64/translate/impl/exception_generating.cpp +++ b/src/frontend/A64/translate/impl/exception_generating.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::SVC(Imm<16> imm16) { // ir.PushRSB(ir.current_location.AdvancePC(4)); // TODO @@ -17,5 +16,4 @@ bool TranslatorVisitor::SVC(Imm<16> imm16) { return false; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/impl.cpp b/src/frontend/A64/translate/impl/impl.cpp index 1fd54a49..efb06cdb 100644 --- a/src/frontend/A64/translate/impl/impl.cpp +++ b/src/frontend/A64/translate/impl/impl.cpp @@ -8,8 +8,7 @@ #include "frontend/ir/terminal.h" #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::InterpretThisInstruction() { ir.SetTerm(IR::Term::Interpret(ir.current_location)); @@ -304,5 +303,4 @@ IR::U32U64 TranslatorVisitor::ExtendReg(size_t bitsize, Reg reg, Imm<3> option, return ir.LogicalShiftLeft(extended, ir.Imm8(shift)); } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/impl.h b/src/frontend/A64/translate/impl/impl.h index 60b16666..38dee0bd 100644 --- a/src/frontend/A64/translate/impl/impl.h +++ b/src/frontend/A64/translate/impl/impl.h @@ -13,8 +13,7 @@ #include "frontend/A64/location_descriptor.h" #include "frontend/A64/types.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { enum class AccType { NORMAL, VEC, STREAM, VECSTREAM, ATOMIC, ORDERED, UNPRIV, IFETCH, PTW, DC, IC, AT, @@ -1029,5 +1028,4 @@ struct TranslatorVisitor final { bool FNMSUB_float(Imm<2> type, Vec Vm, Vec Va, Vec Vn, Vec Vd); }; -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/load_store_load_literal.cpp b/src/frontend/A64/translate/impl/load_store_load_literal.cpp index 36f61e5c..2d5c0e25 100644 --- a/src/frontend/A64/translate/impl/load_store_load_literal.cpp +++ b/src/frontend/A64/translate/impl/load_store_load_literal.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::LDR_lit_gen(bool opc_0, Imm<19> imm19, Reg Rt) { size_t size = opc_0 == 0 ? 4 : 8; @@ -39,5 +38,4 @@ bool TranslatorVisitor::PRFM_lit(Imm<19> /*imm19*/, Imm<5> /*prfop*/) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/load_store_register_immediate.cpp b/src/frontend/A64/translate/impl/load_store_register_immediate.cpp index afbeaabe..2d28550a 100644 --- a/src/frontend/A64/translate/impl/load_store_register_immediate.cpp +++ b/src/frontend/A64/translate/impl/load_store_register_immediate.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::load_store_register_immediate(bool wback, bool postindex, size_t scale, u64 offset, Imm<2> size, Imm<2> opc, Reg Rn, Reg Rt) { MemOp memop; @@ -194,5 +193,4 @@ bool TranslatorVisitor::LDR_imm_fpsimd_2(Imm<2> size, Imm<1> opc_1, Imm<12> imm1 return LoadStoreSIMD(*this, ir, wback, postindex, scale, offset, MemOp::LOAD, Rn, Vt); } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/load_store_register_pair.cpp b/src/frontend/A64/translate/impl/load_store_register_pair.cpp index 666ebc46..7a8bdca6 100644 --- a/src/frontend/A64/translate/impl/load_store_register_pair.cpp +++ b/src/frontend/A64/translate/impl/load_store_register_pair.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::STP_LDP_gen(Imm<2> opc, bool not_postindex, bool wback, Imm<1> L, Imm<7> imm7, Reg Rt2, Reg Rn, Reg Rt) { const bool postindex = !not_postindex; @@ -75,5 +74,4 @@ bool TranslatorVisitor::STP_LDP_gen(Imm<2> opc, bool not_postindex, bool wback, return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/load_store_register_unprivileged.cpp b/src/frontend/A64/translate/impl/load_store_register_unprivileged.cpp index 414d0983..545b32fd 100644 --- a/src/frontend/A64/translate/impl/load_store_register_unprivileged.cpp +++ b/src/frontend/A64/translate/impl/load_store_register_unprivileged.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { static bool StoreRegister(TranslatorVisitor& tv, IREmitter& ir, const size_t datasize, const Imm<9> imm9, const Reg Rn, const Reg Rt) { @@ -147,5 +146,4 @@ bool TranslatorVisitor::LDTRSW(Imm<9> imm9, Reg Rn, Reg Rt) { X(64, Rt, SignExtend(data, 64)); return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/move_wide.cpp b/src/frontend/A64/translate/impl/move_wide.cpp index ec14c496..37d3a9a4 100644 --- a/src/frontend/A64/translate/impl/move_wide.cpp +++ b/src/frontend/A64/translate/impl/move_wide.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::MOVN(bool sf, Imm<2> hw, Imm<16> imm16, Reg Rd) { size_t datasize = sf ? 64 : 32; @@ -53,5 +52,4 @@ bool TranslatorVisitor::MOVK(bool sf, Imm<2> hw, Imm<16> imm16, Reg Rd) { } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/simd_copy.cpp b/src/frontend/A64/translate/impl/simd_copy.cpp index c6bae4c9..dbe9ebab 100644 --- a/src/frontend/A64/translate/impl/simd_copy.cpp +++ b/src/frontend/A64/translate/impl/simd_copy.cpp @@ -7,8 +7,7 @@ #include "common/bit_util.h" #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::DUP_gen(bool Q, Imm<5> imm5, Reg Rn, Vec Vd) { const size_t size = Common::LowestSetBit(imm5.ZeroExtend()); @@ -37,5 +36,4 @@ bool TranslatorVisitor::DUP_gen(bool Q, Imm<5> imm5, Reg Rn, Vec Vd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/simd_three_same.cpp b/src/frontend/A64/translate/impl/simd_three_same.cpp index 15d93fe6..61322b79 100644 --- a/src/frontend/A64/translate/impl/simd_three_same.cpp +++ b/src/frontend/A64/translate/impl/simd_three_same.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::ADD_vector(bool Q, Imm<2> size, Vec Vm, Vec Vn, Vec Vd) { if (size == 0b11 && !Q) return ReservedValue(); @@ -147,5 +146,4 @@ bool TranslatorVisitor::EOR_asimd(bool Q, Vec Vm, Vec Vn, Vec Vd) { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/impl/system.cpp b/src/frontend/A64/translate/impl/system.cpp index 0d420302..004085e2 100644 --- a/src/frontend/A64/translate/impl/system.cpp +++ b/src/frontend/A64/translate/impl/system.cpp @@ -6,8 +6,7 @@ #include "frontend/A64/translate/impl/impl.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { bool TranslatorVisitor::HINT([[maybe_unused]] Imm<4> CRm, [[maybe_unused]] Imm<3> op2) { return true; @@ -37,5 +36,4 @@ bool TranslatorVisitor::SEVL() { return true; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/translate/translate.cpp b/src/frontend/A64/translate/translate.cpp index 1114a1b2..183db8d0 100644 --- a/src/frontend/A64/translate/translate.cpp +++ b/src/frontend/A64/translate/translate.cpp @@ -10,8 +10,7 @@ #include "frontend/A64/translate/translate.h" #include "frontend/ir/basic_block.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { IR::Block Translate(LocationDescriptor descriptor, MemoryReadCodeFuncType memory_read_code) { IR::Block block{descriptor}; @@ -57,5 +56,4 @@ bool TranslateSingleInstruction(IR::Block& block, LocationDescriptor descriptor, return should_continue; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/types.cpp b/src/frontend/A64/types.cpp index 72b9ca10..028672c5 100644 --- a/src/frontend/A64/types.cpp +++ b/src/frontend/A64/types.cpp @@ -12,8 +12,7 @@ #include "common/bit_util.h" #include "frontend/A64/types.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { const char* CondToString(Cond cond) { constexpr std::array cond_strs = { @@ -42,5 +41,4 @@ std::ostream& operator<<(std::ostream& o, Vec vec) { return o; } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/A64/types.h b/src/frontend/A64/types.h index a2c71e1b..cb1895a4 100644 --- a/src/frontend/A64/types.h +++ b/src/frontend/A64/types.h @@ -14,8 +14,7 @@ #include "common/common_types.h" #include "frontend/ir/cond.h" -namespace Dynarmic { -namespace A64 { +namespace Dynarmic::A64 { using Cond = IR::Cond; @@ -71,5 +70,4 @@ inline Vec operator+(Vec vec, size_t number) { return static_cast(new_vec); } -} // namespace A64 -} // namespace Dynarmic +} // namespace Dynarmic::A64 diff --git a/src/frontend/decoder/decoder_detail.h b/src/frontend/decoder/decoder_detail.h index 9bfce2ef..8b7594a2 100644 --- a/src/frontend/decoder/decoder_detail.h +++ b/src/frontend/decoder/decoder_detail.h @@ -14,8 +14,7 @@ #include "common/bit_util.h" #include "common/mp.h" -namespace Dynarmic { -namespace Decoder { +namespace Dynarmic::Decoder { namespace detail { /** @@ -163,5 +162,4 @@ public: }; } // namespace detail -} // namespace Decoder -} // namespace Dynarmic +} // namespace Dynarmic::Decoder diff --git a/src/frontend/decoder/matcher.h b/src/frontend/decoder/matcher.h index 80802258..4584e7d4 100644 --- a/src/frontend/decoder/matcher.h +++ b/src/frontend/decoder/matcher.h @@ -10,8 +10,7 @@ #include "common/assert.h" -namespace Dynarmic { -namespace Decoder { +namespace Dynarmic::Decoder { /** * Generic instruction handling construct. @@ -75,5 +74,4 @@ private: handler_function fn; }; -} // namespace Decoder -} // namespace Dynarmic +} // namespace Dynarmic::Decoder diff --git a/src/frontend/ir/basic_block.cpp b/src/frontend/ir/basic_block.cpp index 9d89021a..b8bfa7e4 100644 --- a/src/frontend/ir/basic_block.cpp +++ b/src/frontend/ir/basic_block.cpp @@ -18,8 +18,7 @@ #include "frontend/ir/basic_block.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { void Block::AppendNewInst(Opcode opcode, std::initializer_list args) { IR::Inst* inst = new(instruction_alloc_pool->Alloc()) IR::Inst(opcode); @@ -223,5 +222,4 @@ std::string DumpBlock(const IR::Block& block) { return ret; } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/basic_block.h b/src/frontend/ir/basic_block.h index 852efd11..8dd15768 100644 --- a/src/frontend/ir/basic_block.h +++ b/src/frontend/ir/basic_block.h @@ -21,8 +21,7 @@ #include "frontend/ir/terminal.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { enum class Opcode; @@ -147,5 +146,4 @@ private: /// Returns a string representation of the contents of block. Intended for debugging. std::string DumpBlock(const IR::Block& block); -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/ir_emitter.cpp b/src/frontend/ir/ir_emitter.cpp index f52b7ccd..3feabbda 100644 --- a/src/frontend/ir/ir_emitter.cpp +++ b/src/frontend/ir/ir_emitter.cpp @@ -8,8 +8,7 @@ #include "frontend/ir/ir_emitter.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { U1 IREmitter::Imm1(bool imm1) { return U1(Value(imm1)); @@ -929,5 +928,4 @@ void IREmitter::SetTerm(const Terminal& terminal) { block.SetTerminal(terminal); } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/ir_emitter.h b/src/frontend/ir/ir_emitter.h index ae11212b..36e47c6f 100644 --- a/src/frontend/ir/ir_emitter.h +++ b/src/frontend/ir/ir_emitter.h @@ -19,8 +19,7 @@ // is a microinstruction of an idealised ARM CPU. The choice of microinstructions is made // not based on any existing microarchitecture but on ease of implementation. -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { enum class Opcode; @@ -253,5 +252,4 @@ protected: } }; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/location_descriptor.cpp b/src/frontend/ir/location_descriptor.cpp index 3c071bc7..6cb35dde 100644 --- a/src/frontend/ir/location_descriptor.cpp +++ b/src/frontend/ir/location_descriptor.cpp @@ -9,13 +9,11 @@ #include "frontend/ir/location_descriptor.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor) { o << fmt::format("{{{:016x}}}", descriptor.Value()); return o; } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/location_descriptor.h b/src/frontend/ir/location_descriptor.h index 2ec601f2..5fd61f7f 100644 --- a/src/frontend/ir/location_descriptor.h +++ b/src/frontend/ir/location_descriptor.h @@ -11,8 +11,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { class LocationDescriptor { public: @@ -34,8 +33,7 @@ private: std::ostream& operator<<(std::ostream& o, const LocationDescriptor& descriptor); -} // namespace A32 -} // namespace Dynarmic +} // namespace Dynarmic::IR namespace std { template <> diff --git a/src/frontend/ir/microinstruction.cpp b/src/frontend/ir/microinstruction.cpp index 3ca643b6..c32e188e 100644 --- a/src/frontend/ir/microinstruction.cpp +++ b/src/frontend/ir/microinstruction.cpp @@ -9,8 +9,7 @@ #include "common/assert.h" #include "frontend/ir/microinstruction.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { bool Inst::IsArithmeticShift() const { return op == Opcode::ArithmeticShiftRight32 || @@ -444,5 +443,4 @@ void Inst::UndoUse(const Value& value) { } } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/microinstruction.h b/src/frontend/ir/microinstruction.h index 1a9bbc1b..bd3a3e25 100644 --- a/src/frontend/ir/microinstruction.h +++ b/src/frontend/ir/microinstruction.h @@ -13,8 +13,7 @@ #include "frontend/ir/opcodes.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { /** * A representation of a microinstruction. A single ARM/Thumb instruction may be @@ -127,5 +126,4 @@ private: Inst* nzcv_inst = nullptr; }; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/opcodes.cpp b/src/frontend/ir/opcodes.cpp index af7d5d25..951f2992 100644 --- a/src/frontend/ir/opcodes.cpp +++ b/src/frontend/ir/opcodes.cpp @@ -10,8 +10,7 @@ #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { // Opcode information @@ -64,5 +63,4 @@ bool AreTypesCompatible(Type t1, Type t2) { return t1 == t2 || t1 == Type::Opaque || t2 == Type::Opaque; } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/opcodes.h b/src/frontend/ir/opcodes.h index eb083925..dfa6292f 100644 --- a/src/frontend/ir/opcodes.h +++ b/src/frontend/ir/opcodes.h @@ -8,8 +8,7 @@ #include "common/common_types.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { /** * The Opcodes of our intermediate representation. @@ -75,5 +74,4 @@ const char* GetNameOf(Type type); /// @returns true if t1 and t2 are compatible types bool AreTypesCompatible(Type t1, Type t2); -} // namespace Arm -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/terminal.h b/src/frontend/ir/terminal.h index d62d307f..0bbf9cc7 100644 --- a/src/frontend/ir/terminal.h +++ b/src/frontend/ir/terminal.h @@ -12,8 +12,7 @@ #include "frontend/ir/cond.h" #include "frontend/ir/location_descriptor.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { namespace Term { struct Invalid {}; @@ -117,5 +116,4 @@ struct CheckHalt { using Term::Terminal; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/value.cpp b/src/frontend/ir/value.cpp index c9cc8080..e52615c9 100644 --- a/src/frontend/ir/value.cpp +++ b/src/frontend/ir/value.cpp @@ -8,8 +8,7 @@ #include "frontend/ir/microinstruction.h" #include "frontend/ir/value.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { Value::Value(Inst* value) : type(Type::Opaque) { inner.inst = value; @@ -154,5 +153,4 @@ Cond Value::GetCond() const { return inner.imm_cond; } -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/frontend/ir/value.h b/src/frontend/ir/value.h index f83a7fb3..f43a41fe 100644 --- a/src/frontend/ir/value.h +++ b/src/frontend/ir/value.h @@ -15,8 +15,7 @@ #include "frontend/ir/cond.h" #include "frontend/ir/opcodes.h" -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { class Inst; @@ -103,5 +102,4 @@ using UAny = TypedValue; using UAnyU128 = TypedValue; using NZCV = TypedValue; -} // namespace IR -} // namespace Dynarmic +} // namespace Dynarmic::IR diff --git a/src/ir_opt/a32_constant_memory_reads_pass.cpp b/src/ir_opt/a32_constant_memory_reads_pass.cpp index 41bd4364..19b0a52a 100644 --- a/src/ir_opt/a32_constant_memory_reads_pass.cpp +++ b/src/ir_opt/a32_constant_memory_reads_pass.cpp @@ -10,8 +10,7 @@ #include "frontend/ir/opcodes.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void A32ConstantMemoryReads(IR::Block& block, const A32::UserCallbacks::Memory& memory_callbacks) { for (auto& inst : block) { @@ -73,5 +72,4 @@ void A32ConstantMemoryReads(IR::Block& block, const A32::UserCallbacks::Memory& } } -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization diff --git a/src/ir_opt/a32_get_set_elimination_pass.cpp b/src/ir_opt/a32_get_set_elimination_pass.cpp index 8ddc1134..b06bccf5 100644 --- a/src/ir_opt/a32_get_set_elimination_pass.cpp +++ b/src/ir_opt/a32_get_set_elimination_pass.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/value.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void A32GetSetElimination(IR::Block& block) { using Iterator = IR::Block::iterator; @@ -165,5 +164,4 @@ void A32GetSetElimination(IR::Block& block) { } } -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization diff --git a/src/ir_opt/a64_merge_interpret_blocks.cpp b/src/ir_opt/a64_merge_interpret_blocks.cpp index 7fd060e4..6f241fb3 100644 --- a/src/ir_opt/a64_merge_interpret_blocks.cpp +++ b/src/ir_opt/a64_merge_interpret_blocks.cpp @@ -16,8 +16,7 @@ #include "frontend/ir/basic_block.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void A64MergeInterpretBlocksPass(IR::Block& block, A64::UserCallbacks* cb) { const auto is_interpret_instruction = [cb](A64::LocationDescriptor location) { @@ -54,5 +53,4 @@ void A64MergeInterpretBlocksPass(IR::Block& block, A64::UserCallbacks* cb) { block.CycleCount() += num_instructions - 1; } -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization diff --git a/src/ir_opt/constant_propagation_pass.cpp b/src/ir_opt/constant_propagation_pass.cpp index 0ab8d63b..eb59c692 100644 --- a/src/ir_opt/constant_propagation_pass.cpp +++ b/src/ir_opt/constant_propagation_pass.cpp @@ -10,8 +10,7 @@ #include "frontend/ir/opcodes.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void ConstantPropagation(IR::Block& block) { for (auto& inst : block) { @@ -58,5 +57,4 @@ void ConstantPropagation(IR::Block& block) { } } -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization diff --git a/src/ir_opt/dead_code_elimination_pass.cpp b/src/ir_opt/dead_code_elimination_pass.cpp index c64eb7bb..cca54293 100644 --- a/src/ir_opt/dead_code_elimination_pass.cpp +++ b/src/ir_opt/dead_code_elimination_pass.cpp @@ -8,8 +8,7 @@ #include "frontend/ir/basic_block.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void DeadCodeElimination(IR::Block& block) { // We iterate over the instructions in reverse order. @@ -21,5 +20,4 @@ void DeadCodeElimination(IR::Block& block) { } } -} // namespace Optimization } // namespace Dynarmic diff --git a/src/ir_opt/passes.h b/src/ir_opt/passes.h index 0416d00a..14a45656 100644 --- a/src/ir_opt/passes.h +++ b/src/ir_opt/passes.h @@ -9,14 +9,11 @@ #include #include -namespace Dynarmic { -namespace IR { +namespace Dynarmic::IR { class Block; } -} -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void A32GetSetElimination(IR::Block& block); void A32ConstantMemoryReads(IR::Block& block, const A32::UserCallbacks::Memory& memory_callbacks); @@ -25,5 +22,4 @@ void ConstantPropagation(IR::Block& block); void DeadCodeElimination(IR::Block& block); void VerificationPass(const IR::Block& block); -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization diff --git a/src/ir_opt/verification_pass.cpp b/src/ir_opt/verification_pass.cpp index 5573f36e..cae0fec4 100644 --- a/src/ir_opt/verification_pass.cpp +++ b/src/ir_opt/verification_pass.cpp @@ -12,8 +12,7 @@ #include "frontend/ir/microinstruction.h" #include "ir_opt/passes.h" -namespace Dynarmic { -namespace Optimization { +namespace Dynarmic::Optimization { void VerificationPass(const IR::Block& block) { for (const auto& inst : block) { @@ -41,5 +40,4 @@ void VerificationPass(const IR::Block& block) { } } -} // namespace Optimization -} // namespace Dynarmic +} // namespace Dynarmic::Optimization