From 80027cc54f733bc484bea0f64852f48184c96e7d Mon Sep 17 00:00:00 2001 From: Patrick Martin Date: Sun, 20 Dec 2015 13:12:44 -0800 Subject: [PATCH] Fixed recompiler's file naming convention to match citra file naming convention. Fixed unnecessary double public block. --- .../{ARMFuncs.cpp => ARM_funcs.cpp} | 4 +- .../{ARMFuncs.h => ARM_funcs.h} | 0 src/binary_translation/CMakeLists.txt | 61 +++++++++---------- .../Instructions/Branch.cpp | 8 +-- src/binary_translation/Instructions/Branch.h | 4 +- .../Instructions/Instruction.cpp | 10 +-- .../Instructions/Instruction.h | 3 +- src/binary_translation/Instructions/Ldr.cpp | 8 +-- src/binary_translation/Instructions/Ldr.h | 4 +- src/binary_translation/Instructions/Str.cpp | 8 +-- src/binary_translation/Instructions/Str.h | 4 +- .../{Arithmetic.cpp => arithmetic.cpp} | 8 +-- .../{Arithmetic.h => arithmetic.h} | 4 +- .../{MovShift.cpp => mov_shift.cpp} | 12 ++-- .../Instructions/{MovShift.h => mov_shift.h} | 4 +- .../{BinarySearch.h => binary_search.h} | 0 .../{BlockColors.cpp => block_colors.cpp} | 4 +- .../{BlockColors.h => block_colors.h} | 0 .../{CodeGen.cpp => code_gen.cpp} | 4 +- .../{CodeGen.h => code_gen.h} | 0 .../{Disassembler.cpp => disassembler.cpp} | 4 +- .../{Disassembler.h => disassembler.h} | 0 ...ructionBlock.cpp => instruction_block.cpp} | 8 +-- ...InstructionBlock.h => instruction_block.h} | 2 +- .../{MachineState.cpp => machine_state.cpp} | 8 +-- .../{MachineState.h => machine_state.h} | 0 src/binary_translation/main.cpp | 2 +- .../{ModuleGen.cpp => module_gen.cpp} | 16 ++--- .../{ModuleGen.h => module_gen.h} | 0 src/binary_translation/{TBAA.cpp => tbaa.cpp} | 2 +- src/binary_translation/{TBAA.h => tbaa.h} | 2 +- src/core/CMakeLists.txt | 4 +- .../arm/dyncom/arm_dyncom_interpreter.cpp | 2 +- ...ader.cpp => binary_translation_loader.cpp} | 2 +- ...onLoader.h => binary_translation_loader.h} | 0 src/core/loader/loader.cpp | 2 +- 36 files changed, 101 insertions(+), 103 deletions(-) rename src/binary_translation/{ARMFuncs.cpp => ARM_funcs.cpp} (99%) rename src/binary_translation/{ARMFuncs.h => ARM_funcs.h} (100%) rename src/binary_translation/Instructions/{Arithmetic.cpp => arithmetic.cpp} (97%) rename src/binary_translation/Instructions/{Arithmetic.h => arithmetic.h} (94%) rename src/binary_translation/Instructions/{MovShift.cpp => mov_shift.cpp} (95%) rename src/binary_translation/Instructions/{MovShift.h => mov_shift.h} (92%) rename src/binary_translation/{BinarySearch.h => binary_search.h} (100%) rename src/binary_translation/{BlockColors.cpp => block_colors.cpp} (98%) rename src/binary_translation/{BlockColors.h => block_colors.h} (100%) rename src/binary_translation/{CodeGen.cpp => code_gen.cpp} (99%) rename src/binary_translation/{CodeGen.h => code_gen.h} (100%) rename src/binary_translation/{Disassembler.cpp => disassembler.cpp} (89%) rename src/binary_translation/{Disassembler.h => disassembler.h} (100%) rename src/binary_translation/{InstructionBlock.cpp => instruction_block.cpp} (91%) rename src/binary_translation/{InstructionBlock.h => instruction_block.h} (98%) rename src/binary_translation/{MachineState.cpp => machine_state.cpp} (98%) rename src/binary_translation/{MachineState.h => machine_state.h} (100%) rename src/binary_translation/{ModuleGen.cpp => module_gen.cpp} (98%) rename src/binary_translation/{ModuleGen.h => module_gen.h} (100%) rename src/binary_translation/{TBAA.cpp => tbaa.cpp} (98%) rename src/binary_translation/{TBAA.h => tbaa.h} (96%) rename src/core/binary_translation/{BinaryTranslationLoader.cpp => binary_translation_loader.cpp} (99%) rename src/core/binary_translation/{BinaryTranslationLoader.h => binary_translation_loader.h} (100%) diff --git a/src/binary_translation/ARMFuncs.cpp b/src/binary_translation/ARM_funcs.cpp similarity index 99% rename from src/binary_translation/ARMFuncs.cpp rename to src/binary_translation/ARM_funcs.cpp index 12f65b92d..7794170f6 100644 --- a/src/binary_translation/ARMFuncs.cpp +++ b/src/binary_translation/ARM_funcs.cpp @@ -1,5 +1,5 @@ -#include "ARMFuncs.h" -#include "InstructionBlock.h" +#include "ARM_funcs.h" +#include "instruction_block.h" #include ARMFuncs::ShiftTN ARMFuncs::DecodeImmShift(InstructionBlock* instruction, u32 type, u32 imm5) diff --git a/src/binary_translation/ARMFuncs.h b/src/binary_translation/ARM_funcs.h similarity index 100% rename from src/binary_translation/ARMFuncs.h rename to src/binary_translation/ARM_funcs.h diff --git a/src/binary_translation/CMakeLists.txt b/src/binary_translation/CMakeLists.txt index c6f82e8ff..92f030eff 100644 --- a/src/binary_translation/CMakeLists.txt +++ b/src/binary_translation/CMakeLists.txt @@ -1,40 +1,39 @@ set(SRCS main.cpp - CodeGen.cpp - ModuleGen.cpp - Disassembler.cpp - InstructionBlock.cpp - MachineState.cpp - TBAA.cpp - ARMFuncs.cpp - BlockColors.cpp + code_gen.cpp + module_gen.cpp + disassembler.cpp + instruction_block.cpp + machine_state.cpp + tbaa.cpp + ARM_funcs.cpp + block_colors.cpp - Instructions/Instruction.cpp - Instructions/MovShift.cpp - Instructions/Branch.cpp - Instructions/Arithmetic.cpp - Instructions/Ldr.cpp - Instructions/Str.cpp + instructions/instruction.cpp + instructions/mov_shift.cpp + instructions/branch.cpp + instructions/arithmetic.cpp + instructions/ldr.cpp + instructions/str.cpp ) set(HEADERS - CodeGen.h - ModuleGen.h - Disassembler.h - InstructionBlock.h - MachineState.h - TBAA.h - BinarySearch.h - ARMFuncs.h - BlockColors.h + code_gen.h + module_gen.h + disassembler.h + instruction_block.h + machine_state.h + tbaa.h + binary_search.h + ARM_funcs.h + block_colors.h - Instructions/Types.h - Instructions/Types.h - Instructions/Instruction.h - Instructions/MovShift.h - Instructions/Branch.h - Instructions/Arithmetic.h - Instructions/Ldr.h - Instructions/Str.h + instructions/types.h + instructions/instruction.h + instructions/mov_shift.h + instructions/branch.h + instructions/arithmetic.h + instructions/ldr.h + instructions/str.h ) create_directory_groups(${SRCS} ${HEADERS}) diff --git a/src/binary_translation/Instructions/Branch.cpp b/src/binary_translation/Instructions/Branch.cpp index 1680b822a..40a60acb0 100644 --- a/src/binary_translation/Instructions/Branch.cpp +++ b/src/binary_translation/Instructions/Branch.cpp @@ -1,7 +1,7 @@ -#include "Branch.h" -#include "Disassembler.h" -#include "InstructionBlock.h" -#include "ModuleGen.h" +#include "branch.h" +#include "disassembler.h" +#include "instruction_block.h" +#include "module_gen.h" static RegisterInstruction register_instruction; diff --git a/src/binary_translation/Instructions/Branch.h b/src/binary_translation/Instructions/Branch.h index 7f75d660c..f9b534a61 100644 --- a/src/binary_translation/Instructions/Branch.h +++ b/src/binary_translation/Instructions/Branch.h @@ -1,5 +1,5 @@ -#include "Instruction.h" -#include "Types.h" +#include "instruction.h" +#include "types.h" class Branch : public Instruction { diff --git a/src/binary_translation/Instructions/Instruction.cpp b/src/binary_translation/Instructions/Instruction.cpp index 95101928c..44abdf730 100644 --- a/src/binary_translation/Instructions/Instruction.cpp +++ b/src/binary_translation/Instructions/Instruction.cpp @@ -1,10 +1,10 @@ -#include "Instruction.h" +#include "instruction.h" #include "common/logging/log.h" #include -#include "InstructionBlock.h" -#include "ModuleGen.h" -#include "MachineState.h" -#include "BinarySearch.h" +#include "instruction_block.h" +#include "module_gen.h" +#include "machine_state.h" +#include "binary_search.h" Instruction::Instruction() { diff --git a/src/binary_translation/Instructions/Instruction.h b/src/binary_translation/Instructions/Instruction.h index 361a8a711..d99b15c26 100644 --- a/src/binary_translation/Instructions/Instruction.h +++ b/src/binary_translation/Instructions/Instruction.h @@ -1,7 +1,7 @@ #pragma once #include "common/common_types.h" #include -#include "Types.h" +#include "types.h" class InstructionBlock; @@ -77,7 +77,6 @@ class Instruction::FieldDefObject { public: typedef void(*WriteFunctionType)(u32 value, void *field_address); -public: // Constant FieldDefObject(u32 bit_count, u32 const_value); // Field diff --git a/src/binary_translation/Instructions/Ldr.cpp b/src/binary_translation/Instructions/Ldr.cpp index 8fda9c1a5..2588ce3e8 100644 --- a/src/binary_translation/Instructions/Ldr.cpp +++ b/src/binary_translation/Instructions/Ldr.cpp @@ -1,10 +1,10 @@ -#include "Ldr.h" -#include "Disassembler.h" -#include "InstructionBlock.h" +#include "ldr.h" +#include "disassembler.h" +#include "instruction_block.h" #include #include #include -#include "MachineState.h" +#include "machine_state.h" static RegisterInstruction register_instruction; diff --git a/src/binary_translation/Instructions/Ldr.h b/src/binary_translation/Instructions/Ldr.h index d4716d659..822f7393f 100644 --- a/src/binary_translation/Instructions/Ldr.h +++ b/src/binary_translation/Instructions/Ldr.h @@ -1,5 +1,5 @@ -#include "Instruction.h" -#include "Types.h" +#include "instruction.h" +#include "types.h" #include class Ldr : public Instruction diff --git a/src/binary_translation/Instructions/Str.cpp b/src/binary_translation/Instructions/Str.cpp index f771b52db..afcf70a1a 100644 --- a/src/binary_translation/Instructions/Str.cpp +++ b/src/binary_translation/Instructions/Str.cpp @@ -1,10 +1,10 @@ -#include "Str.h" -#include "Disassembler.h" -#include "InstructionBlock.h" +#include "str.h" +#include "disassembler.h" +#include "instruction_block.h" #include #include #include -#include "MachineState.h" +#include "machine_state.h" static RegisterInstruction register_instruction; diff --git a/src/binary_translation/Instructions/Str.h b/src/binary_translation/Instructions/Str.h index c66b821a6..94392a4f8 100644 --- a/src/binary_translation/Instructions/Str.h +++ b/src/binary_translation/Instructions/Str.h @@ -1,5 +1,5 @@ -#include "Instruction.h" -#include "Types.h" +#include "instruction.h" +#include "types.h" #include class Str : public Instruction diff --git a/src/binary_translation/Instructions/Arithmetic.cpp b/src/binary_translation/Instructions/arithmetic.cpp similarity index 97% rename from src/binary_translation/Instructions/Arithmetic.cpp rename to src/binary_translation/Instructions/arithmetic.cpp index 1abe31836..a8c7c8c7d 100644 --- a/src/binary_translation/Instructions/Arithmetic.cpp +++ b/src/binary_translation/Instructions/arithmetic.cpp @@ -1,7 +1,7 @@ -#include "Arithmetic.h" -#include "Disassembler.h" -#include -#include +#include "arithmetic.h" +#include "disassembler.h" +#include +#include static RegisterInstruction register_instruction; diff --git a/src/binary_translation/Instructions/Arithmetic.h b/src/binary_translation/Instructions/arithmetic.h similarity index 94% rename from src/binary_translation/Instructions/Arithmetic.h rename to src/binary_translation/Instructions/arithmetic.h index 99686d589..ea5998d54 100644 --- a/src/binary_translation/Instructions/Arithmetic.h +++ b/src/binary_translation/Instructions/arithmetic.h @@ -1,5 +1,5 @@ -#include "Instruction.h" -#include "Types.h" +#include "instruction.h" +#include "types.h" /* * Data processing instructions diff --git a/src/binary_translation/Instructions/MovShift.cpp b/src/binary_translation/Instructions/mov_shift.cpp similarity index 95% rename from src/binary_translation/Instructions/MovShift.cpp rename to src/binary_translation/Instructions/mov_shift.cpp index fc00acfcb..7fc33055d 100644 --- a/src/binary_translation/Instructions/MovShift.cpp +++ b/src/binary_translation/Instructions/mov_shift.cpp @@ -1,9 +1,9 @@ -#include "MovShift.h" -#include "Disassembler.h" -#include "InstructionBlock.h" -#include "ModuleGen.h" -#include "ARMFuncs.h" -#include +#include "mov_shift.h" +#include "disassembler.h" +#include "instruction_block.h" +#include "module_gen.h" +#include "ARM_funcs.h" +#include static RegisterInstruction register_instruction; diff --git a/src/binary_translation/Instructions/MovShift.h b/src/binary_translation/Instructions/mov_shift.h similarity index 92% rename from src/binary_translation/Instructions/MovShift.h rename to src/binary_translation/Instructions/mov_shift.h index cbe87ed72..3db8790da 100644 --- a/src/binary_translation/Instructions/MovShift.h +++ b/src/binary_translation/Instructions/mov_shift.h @@ -1,5 +1,5 @@ -#include "Instruction.h" -#include "Types.h" +#include "instruction.h" +#include "types.h" /* * Data processing instructions diff --git a/src/binary_translation/BinarySearch.h b/src/binary_translation/binary_search.h similarity index 100% rename from src/binary_translation/BinarySearch.h rename to src/binary_translation/binary_search.h diff --git a/src/binary_translation/BlockColors.cpp b/src/binary_translation/block_colors.cpp similarity index 98% rename from src/binary_translation/BlockColors.cpp rename to src/binary_translation/block_colors.cpp index 633c487ca..30d14056d 100644 --- a/src/binary_translation/BlockColors.cpp +++ b/src/binary_translation/block_colors.cpp @@ -1,6 +1,6 @@ -#include "BlockColors.h" +#include "block_colors.h" #include -#include "InstructionBlock.h" +#include "instruction_block.h" #include #include "common/logging/log.h" diff --git a/src/binary_translation/BlockColors.h b/src/binary_translation/block_colors.h similarity index 100% rename from src/binary_translation/BlockColors.h rename to src/binary_translation/block_colors.h diff --git a/src/binary_translation/CodeGen.cpp b/src/binary_translation/code_gen.cpp similarity index 99% rename from src/binary_translation/CodeGen.cpp rename to src/binary_translation/code_gen.cpp index a627624bd..a55456a83 100644 --- a/src/binary_translation/CodeGen.cpp +++ b/src/binary_translation/code_gen.cpp @@ -1,5 +1,5 @@ -#include "CodeGen.h" -#include "ModuleGen.h" +#include "code_gen.h" +#include "module_gen.h" #include "core/loader/loader.h" #include "common/logging/log.h" diff --git a/src/binary_translation/CodeGen.h b/src/binary_translation/code_gen.h similarity index 100% rename from src/binary_translation/CodeGen.h rename to src/binary_translation/code_gen.h diff --git a/src/binary_translation/Disassembler.cpp b/src/binary_translation/disassembler.cpp similarity index 89% rename from src/binary_translation/Disassembler.cpp rename to src/binary_translation/disassembler.cpp index 3a2e12182..978cf3853 100644 --- a/src/binary_translation/Disassembler.cpp +++ b/src/binary_translation/disassembler.cpp @@ -1,5 +1,5 @@ -#include "Disassembler.h" -#include "Instructions/Instruction.h" +#include "disassembler.h" +#include "instructions/instruction.h" #include std::vector g_read_functions; diff --git a/src/binary_translation/Disassembler.h b/src/binary_translation/disassembler.h similarity index 100% rename from src/binary_translation/Disassembler.h rename to src/binary_translation/disassembler.h diff --git a/src/binary_translation/InstructionBlock.cpp b/src/binary_translation/instruction_block.cpp similarity index 91% rename from src/binary_translation/InstructionBlock.cpp rename to src/binary_translation/instruction_block.cpp index 47f68064f..21073c4f3 100644 --- a/src/binary_translation/InstructionBlock.cpp +++ b/src/binary_translation/instruction_block.cpp @@ -1,9 +1,9 @@ -#include "InstructionBlock.h" -#include "ModuleGen.h" -#include "Instructions/Instruction.h" +#include "instruction_block.h" +#include "module_gen.h" +#include "instructions/instruction.h" #include #include -#include "MachineState.h" +#include "machine_state.h" InstructionBlock::InstructionBlock(ModuleGen* module, Instruction* instruction) : module(module), diff --git a/src/binary_translation/InstructionBlock.h b/src/binary_translation/instruction_block.h similarity index 98% rename from src/binary_translation/InstructionBlock.h rename to src/binary_translation/instruction_block.h index 8f87bb73a..1a22a2a35 100644 --- a/src/binary_translation/InstructionBlock.h +++ b/src/binary_translation/instruction_block.h @@ -2,7 +2,7 @@ #include #include #include -#include "ModuleGen.h" +#include "module_gen.h" namespace llvm { diff --git a/src/binary_translation/MachineState.cpp b/src/binary_translation/machine_state.cpp similarity index 98% rename from src/binary_translation/MachineState.cpp rename to src/binary_translation/machine_state.cpp index 9e17bcbda..b0fa4d9da 100644 --- a/src/binary_translation/MachineState.cpp +++ b/src/binary_translation/machine_state.cpp @@ -1,11 +1,11 @@ -#include "MachineState.h" -#include "ModuleGen.h" -#include "Instructions/Types.h" +#include "machine_state.h" +#include "module_gen.h" +#include "instructions/types.h" #include #include #include #include -#include "TBAA.h" +#include "tbaa.h" using namespace llvm; diff --git a/src/binary_translation/MachineState.h b/src/binary_translation/machine_state.h similarity index 100% rename from src/binary_translation/MachineState.h rename to src/binary_translation/machine_state.h diff --git a/src/binary_translation/main.cpp b/src/binary_translation/main.cpp index e03f42691..e26c2e82d 100644 --- a/src/binary_translation/main.cpp +++ b/src/binary_translation/main.cpp @@ -5,7 +5,7 @@ #include "core/mem_map.h" #include "core/hle/kernel/memory.h" #include "core/loader/loader.h" -#include "codegen.h" +#include "code_gen.h" #include namespace cl = llvm::cl; diff --git a/src/binary_translation/ModuleGen.cpp b/src/binary_translation/module_gen.cpp similarity index 98% rename from src/binary_translation/ModuleGen.cpp rename to src/binary_translation/module_gen.cpp index df0c5fb28..a595ad535 100644 --- a/src/binary_translation/ModuleGen.cpp +++ b/src/binary_translation/module_gen.cpp @@ -1,18 +1,18 @@ -#include "ModuleGen.h" -#include "Disassembler.h" +#include "module_gen.h" +#include "disassembler.h" #include "core/loader/loader.h" #include "core/mem_map.h" -#include "Instructions/Instruction.h" -#include "Instructions/Types.h" -#include "InstructionBlock.h" +#include "instructions/instruction.h" +#include "instructions/types.h" +#include "instruction_block.h" #include "common/logging/log.h" #include #include #include #include -#include "MachineState.h" -#include "TBAA.h" -#include "BlockColors.h" +#include "machine_state.h" +#include "tbaa.h" +#include "block_colors.h" using namespace llvm; diff --git a/src/binary_translation/ModuleGen.h b/src/binary_translation/module_gen.h similarity index 100% rename from src/binary_translation/ModuleGen.h rename to src/binary_translation/module_gen.h diff --git a/src/binary_translation/TBAA.cpp b/src/binary_translation/tbaa.cpp similarity index 98% rename from src/binary_translation/TBAA.cpp rename to src/binary_translation/tbaa.cpp index c481e5750..077f27994 100644 --- a/src/binary_translation/TBAA.cpp +++ b/src/binary_translation/tbaa.cpp @@ -1,4 +1,4 @@ -#include "TBAA.h" +#include "tbaa.h" #include #include #include diff --git a/src/binary_translation/TBAA.h b/src/binary_translation/tbaa.h similarity index 96% rename from src/binary_translation/TBAA.h rename to src/binary_translation/tbaa.h index 657b4fdde..7d90018d4 100644 --- a/src/binary_translation/TBAA.h +++ b/src/binary_translation/tbaa.h @@ -1,5 +1,5 @@ #pragma once -#include "Instructions/Types.h" +#include "instructions/types.h" #include namespace llvm diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index c684efad2..6a4e62008 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -256,12 +256,12 @@ set(HEADERS if(ENABLE_BINARY_TRANSLATION) set(SRCS ${SRCS} - binary_translation/BinaryTranslationLoader.cpp + binary_translation/binary_translation_loader.cpp ) set(HEADERS ${HEADERS} mem_map.h - binary_translation/BinaryTranslationLoader.h + binary_translation/binary_translation_loader.h ) endif() create_directory_groups(${SRCS} ${HEADERS}) diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 1bf03ee89..38683646a 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp @@ -24,7 +24,7 @@ #include "core/arm/skyeye_common/vfp/vfp.h" #if ENABLE_BINARY_TRANSLATION -#include "core/binary_translation/BinaryTranslationLoader.h" +#include "core/binary_translation/binary_translation_loader.h" #endif #include "core/gdbstub/gdbstub.h" diff --git a/src/core/binary_translation/BinaryTranslationLoader.cpp b/src/core/binary_translation/binary_translation_loader.cpp similarity index 99% rename from src/core/binary_translation/BinaryTranslationLoader.cpp rename to src/core/binary_translation/binary_translation_loader.cpp index 09c228d00..63e5abf0d 100644 --- a/src/core/binary_translation/BinaryTranslationLoader.cpp +++ b/src/core/binary_translation/binary_translation_loader.cpp @@ -1,4 +1,4 @@ -#include "BinaryTranslationLoader.h" +#include "binary_translation_loader.h" #include "core/arm/skyeye_common/armstate.h" #include "core/arm/skyeye_common/arm_regformat.h" #include "common/logging/log.h" diff --git a/src/core/binary_translation/BinaryTranslationLoader.h b/src/core/binary_translation/binary_translation_loader.h similarity index 100% rename from src/core/binary_translation/BinaryTranslationLoader.h rename to src/core/binary_translation/binary_translation_loader.h diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 7ebbb2b7e..a0ace2030 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -16,7 +16,7 @@ #include "core/loader/elf.h" #include "core/loader/ncch.h" #if ENABLE_BINARY_TRANSLATION -#include "core/binary_translation/BinaryTranslationLoader.h" +#include "core/binary_translation/binary_translation_loader.h" #endif ////////////////////////////////////////////////////////////////////////////////////////////////////