Skip to content

Commit

Permalink
add SystemZ arch
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Mar 23, 2014
1 parent 88b2833 commit 48a14ca
Show file tree
Hide file tree
Showing 26 changed files with 13,366 additions and 15 deletions.
7 changes: 4 additions & 3 deletions COMPILE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.

(0) Tailor Capstone to your need.

Out of 6 archtitectures supported by Capstone (Arm, Arm64, Mips, PPC, Sparc &
X86), if you just need several selected archs, you can choose which ones you
Out of 7 archtitectures supported by Capstone (Arm, Arm64, Mips, PPC, Sparc,
SystemZ & X86), if you just need several selected archs, you can choose which ones you
want to compile in by modifying "config.mk" before going to next steps.

By default, all 6 architectures are compiled.
By default, all 7 architectures are compiled.

Capstone also supports "diet" engine to minimize the binaries for embedding
purpose. See docs/README for further instructions.
Expand Down Expand Up @@ -57,6 +57,7 @@ Capstone requires no prerequisite packages, so it is easy to compile & install.
/usr/include/capstone/mips.h
/usr/include/capstone/ppc.h
/usr/include/capstone/sparc.h
/usr/include/capstone/systemz.h
/usr/include/capstone/diet.h
/usr/lib/libcapstone.so (for Linux/*nix), or /usr/lib/libcapstone.dylib (OSX)
/usr/lib/libcapstone.a
Expand Down
3 changes: 2 additions & 1 deletion MCInst.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ typedef struct cs_insn_flat {
cs_arm arm; // ARM architecture (including Thumb/Thumb2)
cs_mips mips; // MIPS architecture
cs_ppc ppc; // PowerPC architecture
cs_sparc sparc; // PowerPC architecture
cs_sparc sparc; // Sparc architecture
cs_sysz sysz; // SystemZ architecture
};
} cs_insn_flat;

Expand Down
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ ifneq (,$(findstring sparc,$(CAPSTONE_ARCHS)))
endif


DEP_SYSZ =
DEP_SYSZ += arch/SystemZ/SystemZGenAsmWriter.inc
DEP_SYSZ += arch/SystemZ/SystemZGenInstrInfo.inc
DEP_SYSZ += arch/SystemZ/SystemZGenSubtargetInfo.inc
DEP_SYSZ += arch/SystemZ/SystemZGenDisassemblerTables.inc
DEP_SYSZ += arch/SystemZ/SystemZGenRegisterInfo.inc

LIBOBJ_SYSZ =
ifneq (,$(findstring systemz,$(CAPSTONE_ARCHS)))
CFLAGS += -DCAPSTONE_HAS_SYSZ
LIBOBJ_SYSZ += arch/SystemZ/SystemZDisassembler.o
LIBOBJ_SYSZ += arch/SystemZ/SystemZInstPrinter.o
LIBOBJ_SYSZ += arch/SystemZ/SystemZMapping.o
LIBOBJ_SYSZ += arch/SystemZ/SystemZModule.o
LIBOBJ_SYSZ += arch/SystemZ/SystemZMCTargetDesc.o
endif


DEP_X86 =
DEP_X86 += arch/X86/X86GenAsmWriter.inc
DEP_X86 += arch/X86/X86GenAsmWriter1.inc
Expand All @@ -151,7 +169,7 @@ endif

LIBOBJ =
LIBOBJ += cs.o utils.o SStream.o MCInstrDesc.o MCRegisterInfo.o
LIBOBJ += $(LIBOBJ_ARM) $(LIBOBJ_ARM64) $(LIBOBJ_MIPS) $(LIBOBJ_PPC) $(LIBOBJ_SPARC) $(LIBOBJ_X86)
LIBOBJ += $(LIBOBJ_ARM) $(LIBOBJ_ARM64) $(LIBOBJ_MIPS) $(LIBOBJ_PPC) $(LIBOBJ_SPARC) $(LIBOBJ_SYSZ) $(LIBOBJ_X86)
LIBOBJ += MCInst.o


Expand Down Expand Up @@ -223,6 +241,7 @@ $(LIBOBJ_ARM64): $(DEP_ARM64)
$(LIBOBJ_MIPS): $(DEP_MIPS)
$(LIBOBJ_PPC): $(DEP_PPC)
$(LIBOBJ_SPARC): $(DEP_SPARC)
$(LIBOBJ_SYSZ): $(DEP_SYSZ)
$(LIBOBJ_X86): $(DEP_X86)

# auto-generate include/diet.h
Expand Down
Loading

0 comments on commit 48a14ca

Please sign in to comment.