Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
tandasat committed May 12, 2016
2 parents d4ef430 + f29ee89 commit e36384e
Show file tree
Hide file tree
Showing 67 changed files with 1,179 additions and 492 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ before_install:
script:
- ./make.sh
- make check
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp libcapstone.so bindings/python/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp libcapstone.dylib bindings/python/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp libcapstone.so.* bindings/python/libcapstone.so; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp libcapstone.*.dylib bindings/python/libcapstone.dylib; fi
- cd bindings/python && make check
compiler:
- clang
Expand Down
2 changes: 2 additions & 0 deletions COMPILE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ To compile using CMake, see COMPILE_CMAKE.TXT.

To compile using XCode on MacOSX, see xcode/README.md.

To compile for Windows CE (a.k.a, Windows Embedded Compact), see windowsce/COMPILE.md.

*-*-*-*-*-*

Capstone requires no prerequisite packages, so it is easy to compile & install.
Expand Down
1 change: 1 addition & 0 deletions CREDITS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ Daniel Collin & Nicolas Planel: M68K architecture.
Pranith Kumar: Explicit registers accessed for Arm64.
Xipiter LLC: Capstone logo redesigned.
Satoshi Tanda: Support Windows kernel driver.
Koutheir Attouchi: Support for Windows CE.
4 changes: 1 addition & 3 deletions LEB128.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
#ifndef CS_LLVM_SUPPORT_LEB128_H
#define CS_LLVM_SUPPORT_LEB128_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif
#include "include/capstone/capstone.h"

/// Utility function to decode a ULEB128 value.
static inline uint64_t decodeULEB128(const uint8_t *p, unsigned *n)
Expand Down
4 changes: 0 additions & 4 deletions MCInst.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#ifndef CS_MCINST_H
#define CS_MCINST_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif

#include "include/capstone/capstone.h"

typedef struct MCInst MCInst;
Expand Down
4 changes: 0 additions & 4 deletions MCInstrDesc.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#ifndef CS_LLVM_MC_MCINSTRDESC_H
#define CS_LLVM_MC_MCINSTRDESC_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif

#include "capstone/platform.h"

//===----------------------------------------------------------------------===//
Expand Down
4 changes: 0 additions & 4 deletions MCRegisterInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
#ifndef CS_LLVM_MC_MCREGISTERINFO_H
#define CS_LLVM_MC_MCREGISTERINFO_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif

#include "capstone/platform.h"

/// An unsigned integer type large enough to represent all physical registers,
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,11 @@ endif

ifeq ($(CAPSTONE_SHARED),yes)
ifeq ($(IS_MINGW),1)
LIBRARY = $(BLDIR)/$(LIBNAME).$(EXT)
LIBRARY = $(BLDIR)/$(LIBNAME).$(VERSION_EXT)
else ifeq ($(IS_CYGWIN),1)
LIBRARY = $(BLDIR)/$(LIBNAME).$(EXT)
LIBRARY = $(BLDIR)/$(LIBNAME).$(VERSION_EXT)
else # *nix
LIBRARY = $(BLDIR)/lib$(LIBNAME).$(EXT)
LIBRARY = $(BLDIR)/lib$(LIBNAME).$(VERSION_EXT)
CFLAGS += -fvisibility=hidden
endif
endif
Expand Down Expand Up @@ -412,7 +412,7 @@ ifeq ($(CAPSTONE_SHARED),yes)
$(INSTALL_LIB) $(LIBRARY) $(DESTDIR)/$(LIBDIR)
ifneq ($(VERSION_EXT),)
cd $(DESTDIR)/$(LIBDIR) && \
mv lib$(LIBNAME).$(EXT) lib$(LIBNAME).$(VERSION_EXT) && \
rm -f lib$(LIBNAME).$(EXT) && \
ln -s lib$(LIBNAME).$(VERSION_EXT) lib$(LIBNAME).$(EXT)
endif
endif
Expand Down
10 changes: 4 additions & 6 deletions MathExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
#ifndef CS_LLVM_SUPPORT_MATHEXTRAS_H
#define CS_LLVM_SUPPORT_MATHEXTRAS_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif

#ifdef _MSC_VER
# include <intrin.h>
#if defined(_WIN32_WCE) && (_WIN32_WCE < 0x800)
#include "windowsce/intrin.h"
#elif defined(_MSC_VER)
#include <intrin.h>
#endif

#ifndef __cplusplus
Expand Down
3 changes: 0 additions & 3 deletions SStream.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* Capstone Disassembly Engine */
/* By Nguyen Anh Quynh <[email protected]>, 2013-2015 */

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif
#include <stdarg.h>
#if defined(CAPSTONE_HAS_OSXKERNEL)
#include <libkern/libkern.h>
Expand Down
2 changes: 2 additions & 0 deletions SStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ifndef CS_SSTREAM_H_
#define CS_SSTREAM_H_

#include "include/capstone/platform.h"

typedef struct SStream {
char buffer[512];
int index;
Expand Down
3 changes: 0 additions & 3 deletions arch/AArch64/AArch64BaseInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
#define CS_LLVM_AARCH64_BASEINFO_H

#include <ctype.h>
#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif
#include <string.h>

#ifndef __cplusplus
Expand Down
4 changes: 0 additions & 4 deletions arch/AArch64/AArch64Disassembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
#ifndef CS_AARCH64_DISASSEMBLER_H
#define CS_AARCH64_DISASSEMBLER_H

#if !defined(_MSC_VER) || !defined(_KERNEL_MODE)
#include <stdint.h>
#endif

#include "capstone/capstone.h"
#include "../../MCRegisterInfo.h"
#include "../../MCInst.h"
Expand Down
5 changes: 4 additions & 1 deletion arch/AArch64/AArch64InstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,9 +1642,12 @@ static void printSystemPStateField(MCInst *MI, unsigned OpNo, SStream *O)
MI->flat_insn->detail->arm64.op_count++;
}
} else {
#ifndef CAPSTONE_DIET
unsigned char access;
#endif
printInt32Bang(O, Val);
#ifndef CAPSTONE_DIET
unsigned char access = get_op_access(MI->csh, MCInst_getOpcode(MI), MI->ac_idx);
access = get_op_access(MI->csh, MCInst_getOpcode(MI), MI->ac_idx);
MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].access = access;
MI->ac_idx++;
#endif
Expand Down
Loading

0 comments on commit e36384e

Please sign in to comment.