From f328f30fd9ad1a7ee70211bff631332f468419c3 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Mon, 20 Jan 2014 09:47:21 +0800 Subject: [PATCH] rename mapping.c, mapping.h, module.c to have arch prefix. suggested by Alex Ionescu --- Makefile | 19 ++++++++++--------- arch/AArch64/AArch64InstPrinter.c | 2 +- arch/AArch64/{mapping.c => AArch64Mapping.c} | 2 +- arch/AArch64/{mapping.h => AArch64Mapping.h} | 0 arch/AArch64/{module.c => AArch64Module.c} | 2 +- arch/ARM/ARMInstPrinter.c | 2 +- arch/ARM/{mapping.c => ARMMapping.c} | 2 +- arch/ARM/{mapping.h => ARMMapping.h} | 0 arch/ARM/{module.c => ARMModule.c} | 2 +- arch/Mips/MipsInstPrinter.c | 2 +- arch/Mips/{mapping.c => MipsMapping.c} | 2 +- arch/Mips/{mapping.h => MipsMapping.h} | 0 arch/Mips/{module.c => MipsModule.c} | 2 +- arch/PowerPC/PPCInstPrinter.c | 4 ++-- arch/PowerPC/{mapping.c => PPCMapping.c} | 2 +- arch/PowerPC/{mapping.h => PPCMapping.h} | 0 arch/PowerPC/{module.c => PPCModule.c} | 2 +- arch/X86/X86ATTInstPrinter.c | 2 +- arch/X86/X86Disassembler.c | 2 +- arch/X86/X86IntelInstPrinter.c | 2 +- arch/X86/{mapping.c => X86Mapping.c} | 2 +- arch/X86/{mapping.h => X86Mapping.h} | 0 arch/X86/{module.c => X86Module.c} | 2 +- 23 files changed, 28 insertions(+), 27 deletions(-) rename arch/AArch64/{mapping.c => AArch64Mapping.c} (99%) rename arch/AArch64/{mapping.h => AArch64Mapping.h} (100%) rename arch/AArch64/{module.c => AArch64Module.c} (97%) rename arch/ARM/{mapping.c => ARMMapping.c} (99%) rename arch/ARM/{mapping.h => ARMMapping.h} (100%) rename arch/ARM/{module.c => ARMModule.c} (97%) rename arch/Mips/{mapping.c => MipsMapping.c} (99%) rename arch/Mips/{mapping.h => MipsMapping.h} (100%) rename arch/Mips/{module.c => MipsModule.c} (97%) rename arch/PowerPC/{mapping.c => PPCMapping.c} (99%) rename arch/PowerPC/{mapping.h => PPCMapping.h} (100%) rename arch/PowerPC/{module.c => PPCModule.c} (97%) rename arch/X86/{mapping.c => X86Mapping.c} (99%) rename arch/X86/{mapping.h => X86Mapping.h} (100%) rename arch/X86/{module.c => X86Module.c} (98%) diff --git a/Makefile b/Makefile index 920143eca..923c247b6 100644 --- a/Makefile +++ b/Makefile @@ -53,36 +53,37 @@ ifneq (,$(findstring x86,$(CAPSTONE_ARCHS))) LIBOBJ += arch/X86/X86Disassembler.o LIBOBJ += arch/X86/X86IntelInstPrinter.o LIBOBJ += arch/X86/X86ATTInstPrinter.o - LIBOBJ += arch/X86/mapping.o arch/X86/module.o + LIBOBJ += arch/X86/X86Mapping.o + LIBOBJ += arch/X86/X86Module.o endif ifneq (,$(findstring arm,$(CAPSTONE_ARCHS))) CFLAGS += -DCAPSTONE_HAS_ARM LIBOBJ += arch/ARM/ARMDisassembler.o LIBOBJ += arch/ARM/ARMInstPrinter.o - LIBOBJ += arch/ARM/mapping.o - LIBOBJ += arch/ARM/module.o + LIBOBJ += arch/ARM/ARMMapping.o + LIBOBJ += arch/ARM/ARMModule.o endif ifneq (,$(findstring mips,$(CAPSTONE_ARCHS))) CFLAGS += -DCAPSTONE_HAS_MIPS LIBOBJ += arch/Mips/MipsDisassembler.o LIBOBJ += arch/Mips/MipsInstPrinter.o - LIBOBJ += arch/Mips/mapping.o - LIBOBJ += arch/Mips/module.o + LIBOBJ += arch/Mips/MipsMapping.o + LIBOBJ += arch/Mips/MipsModule.o endif ifneq (,$(findstring powerpc,$(CAPSTONE_ARCHS))) CFLAGS += -DCAPSTONE_HAS_POWERPC LIBOBJ += arch/PowerPC/PPCDisassembler.o LIBOBJ += arch/PowerPC/PPCInstPrinter.o - LIBOBJ += arch/PowerPC/mapping.o - LIBOBJ += arch/PowerPC/module.o + LIBOBJ += arch/PowerPC/PPCMapping.o + LIBOBJ += arch/PowerPC/PPCModule.o endif ifneq (,$(findstring aarch64,$(CAPSTONE_ARCHS))) CFLAGS += -DCAPSTONE_HAS_ARM64 LIBOBJ += arch/AArch64/AArch64BaseInfo.o LIBOBJ += arch/AArch64/AArch64Disassembler.o LIBOBJ += arch/AArch64/AArch64InstPrinter.o - LIBOBJ += arch/AArch64/mapping.o - LIBOBJ += arch/AArch64/module.o + LIBOBJ += arch/AArch64/AArch64Mapping.o + LIBOBJ += arch/AArch64/AArch64Module.o endif LIBOBJ += MCInst.o diff --git a/arch/AArch64/AArch64InstPrinter.c b/arch/AArch64/AArch64InstPrinter.c index 6a2a3edfa..21dc18785 100644 --- a/arch/AArch64/AArch64InstPrinter.c +++ b/arch/AArch64/AArch64InstPrinter.c @@ -26,7 +26,7 @@ #include "../../MCRegisterInfo.h" #include "../../MathExtras.h" -#include "mapping.h" +#include "AArch64Mapping.h" static char *getRegisterName(unsigned RegNo); static void printOperand(MCInst *MI, unsigned OpNo, SStream *O); diff --git a/arch/AArch64/mapping.c b/arch/AArch64/AArch64Mapping.c similarity index 99% rename from arch/AArch64/mapping.c rename to arch/AArch64/AArch64Mapping.c index 0250705f7..ff608a5a7 100644 --- a/arch/AArch64/mapping.c +++ b/arch/AArch64/AArch64Mapping.c @@ -7,7 +7,7 @@ #include "../../include/arm64.h" #include "../../utils.h" -#include "mapping.h" +#include "AArch64Mapping.h" #define GET_INSTRINFO_ENUM #include "AArch64GenInstrInfo.inc" diff --git a/arch/AArch64/mapping.h b/arch/AArch64/AArch64Mapping.h similarity index 100% rename from arch/AArch64/mapping.h rename to arch/AArch64/AArch64Mapping.h diff --git a/arch/AArch64/module.c b/arch/AArch64/AArch64Module.c similarity index 97% rename from arch/AArch64/module.c rename to arch/AArch64/AArch64Module.c index e0b8413d9..785724a65 100644 --- a/arch/AArch64/module.c +++ b/arch/AArch64/AArch64Module.c @@ -5,7 +5,7 @@ #include "../../MCRegisterInfo.h" #include "AArch64Disassembler.h" #include "AArch64InstPrinter.h" -#include "mapping.h" +#include "AArch64Mapping.h" void enable_arm64() {} diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index 7851cfe20..bef0e14fa 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -28,7 +28,7 @@ #include "../../SStream.h" #include "../../MCRegisterInfo.h" #include "../../utils.h" -#include "mapping.h" +#include "ARMMapping.h" #define GET_SUBTARGETINFO_ENUM #include "ARMGenSubtargetInfo.inc" diff --git a/arch/ARM/mapping.c b/arch/ARM/ARMMapping.c similarity index 99% rename from arch/ARM/mapping.c rename to arch/ARM/ARMMapping.c index 49bcf0b95..61d0420de 100644 --- a/arch/ARM/mapping.c +++ b/arch/ARM/ARMMapping.c @@ -7,7 +7,7 @@ #include "../../include/arm.h" #include "../../cs_priv.h" -#include "mapping.h" +#include "ARMMapping.h" #define GET_INSTRINFO_ENUM #include "ARMGenInstrInfo.inc" diff --git a/arch/ARM/mapping.h b/arch/ARM/ARMMapping.h similarity index 100% rename from arch/ARM/mapping.h rename to arch/ARM/ARMMapping.h diff --git a/arch/ARM/module.c b/arch/ARM/ARMModule.c similarity index 97% rename from arch/ARM/module.c rename to arch/ARM/ARMModule.c index f4307dbc1..783720432 100644 --- a/arch/ARM/module.c +++ b/arch/ARM/ARMModule.c @@ -5,7 +5,7 @@ #include "../../MCRegisterInfo.h" #include "ARMDisassembler.h" #include "ARMInstPrinter.h" -#include "mapping.h" +#include "ARMMapping.h" static cs_err init(cs_struct *ud) { diff --git a/arch/Mips/MipsInstPrinter.c b/arch/Mips/MipsInstPrinter.c index 288727e6d..a991bc1b0 100644 --- a/arch/Mips/MipsInstPrinter.c +++ b/arch/Mips/MipsInstPrinter.c @@ -24,7 +24,7 @@ #include "../../utils.h" #include "../../SStream.h" #include "../../MCRegisterInfo.h" -#include "mapping.h" +#include "MipsMapping.h" #include "MipsInstPrinter.h" diff --git a/arch/Mips/mapping.c b/arch/Mips/MipsMapping.c similarity index 99% rename from arch/Mips/mapping.c rename to arch/Mips/MipsMapping.c index 4d9ce7a68..ebbf139b8 100644 --- a/arch/Mips/mapping.c +++ b/arch/Mips/MipsMapping.c @@ -7,7 +7,7 @@ #include "../../include/mips.h" #include "../../utils.h" -#include "mapping.h" +#include "MipsMapping.h" #define GET_INSTRINFO_ENUM #include "MipsGenInstrInfo.inc" diff --git a/arch/Mips/mapping.h b/arch/Mips/MipsMapping.h similarity index 100% rename from arch/Mips/mapping.h rename to arch/Mips/MipsMapping.h diff --git a/arch/Mips/module.c b/arch/Mips/MipsModule.c similarity index 97% rename from arch/Mips/module.c rename to arch/Mips/MipsModule.c index 1b161089f..8aa40029b 100644 --- a/arch/Mips/module.c +++ b/arch/Mips/MipsModule.c @@ -5,7 +5,7 @@ #include "../../MCRegisterInfo.h" #include "MipsDisassembler.h" #include "MipsInstPrinter.h" -#include "mapping.h" +#include "MipsMapping.h" void enable_mips() {}; diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c index db5982b54..ea6bdc22c 100644 --- a/arch/PowerPC/PPCInstPrinter.c +++ b/arch/PowerPC/PPCInstPrinter.c @@ -25,9 +25,9 @@ #include "../../SStream.h" #include "../../MCRegisterInfo.h" #include "../../MathExtras.h" -#include "mapping.h" +#include "PPCMapping.h" -//#include "mapping.h" +//#include "PPCMapping.h" static const char *getRegisterName(unsigned RegNo); static void printOperand(MCInst *MI, unsigned OpNo, SStream *O); diff --git a/arch/PowerPC/mapping.c b/arch/PowerPC/PPCMapping.c similarity index 99% rename from arch/PowerPC/mapping.c rename to arch/PowerPC/PPCMapping.c index f35166c68..378e1bcd8 100644 --- a/arch/PowerPC/mapping.c +++ b/arch/PowerPC/PPCMapping.c @@ -7,7 +7,7 @@ #include "../../include/ppc.h" #include "../../utils.h" -#include "mapping.h" +#include "PPCMapping.h" #define GET_INSTRINFO_ENUM #include "PPCGenInstrInfo.inc" diff --git a/arch/PowerPC/mapping.h b/arch/PowerPC/PPCMapping.h similarity index 100% rename from arch/PowerPC/mapping.h rename to arch/PowerPC/PPCMapping.h diff --git a/arch/PowerPC/module.c b/arch/PowerPC/PPCModule.c similarity index 97% rename from arch/PowerPC/module.c rename to arch/PowerPC/PPCModule.c index 2af9d0d30..1b0f850ee 100644 --- a/arch/PowerPC/module.c +++ b/arch/PowerPC/PPCModule.c @@ -5,7 +5,7 @@ #include "../../MCRegisterInfo.h" #include "PPCDisassembler.h" #include "PPCInstPrinter.h" -#include "mapping.h" +#include "PPCMapping.h" void enable_powerpc() {}; diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c index 5f585abdb..60f65ce56 100644 --- a/arch/X86/X86ATTInstPrinter.c +++ b/arch/X86/X86ATTInstPrinter.c @@ -25,7 +25,7 @@ #include "../../MCInst.h" #include "../../SStream.h" #include "../../MCRegisterInfo.h" -#include "mapping.h" +#include "X86Mapping.h" #define markup(x) "" diff --git a/arch/X86/X86Disassembler.c b/arch/X86/X86Disassembler.c index 679a01469..c9d22ca3a 100644 --- a/arch/X86/X86Disassembler.c +++ b/arch/X86/X86Disassembler.c @@ -26,7 +26,7 @@ #include "X86DisassemblerDecoderCommon.h" #include "X86DisassemblerDecoder.h" #include "../../MCInst.h" -#include "mapping.h" +#include "X86Mapping.h" #define GET_REGINFO_ENUM #include "X86GenRegisterInfo.inc" diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 194fc2597..c5ecf8bbc 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -26,7 +26,7 @@ #include "../../SStream.h" #include "../../MCRegisterInfo.h" -#include "mapping.h" +#include "X86Mapping.h" static void printMemReference(MCInst *MI, unsigned Op, SStream *O); diff --git a/arch/X86/mapping.c b/arch/X86/X86Mapping.c similarity index 99% rename from arch/X86/mapping.c rename to arch/X86/X86Mapping.c index e5737b33e..7b29f44f6 100644 --- a/arch/X86/mapping.c +++ b/arch/X86/X86Mapping.c @@ -3,7 +3,7 @@ #include -#include "mapping.h" +#include "X86Mapping.h" #include "X86DisassemblerDecoder.h" #include "../../utils.h" diff --git a/arch/X86/mapping.h b/arch/X86/X86Mapping.h similarity index 100% rename from arch/X86/mapping.h rename to arch/X86/X86Mapping.h diff --git a/arch/X86/module.c b/arch/X86/X86Module.c similarity index 98% rename from arch/X86/module.c rename to arch/X86/X86Module.c index 05c0746f4..411a7228a 100644 --- a/arch/X86/module.c +++ b/arch/X86/X86Module.c @@ -5,7 +5,7 @@ #include "../../MCRegisterInfo.h" #include "X86Disassembler.h" #include "X86InstPrinter.h" -#include "mapping.h" +#include "X86Mapping.h" void enable_x86() {};