Fix CAPSTONE_HAS_PPC flags (#1361)

The actual conditional PPC flag used is CAPSTONE_HAS_POWERPC. It
appears as if some of the test suite files was using the incorrect flag. Because
of this test_basic, test_detail and test_iter were all failing to output PPC
code in the default configuration.
remotes/origin/master
Scott Knight 6 years ago committed by Nguyen Anh Quynh
parent 864595c355
commit 65cad8cc7b
  1. 2
      COMPILE_MSVC.TXT
  2. 4
      tests/test_basic.c
  3. 4
      tests/test_detail.c
  4. 4
      tests/test_iter.c

@ -34,7 +34,7 @@ versions, and Windows Driver Kit 8.1 Update 1 or newer versions are required.
- CAPSTONE_HAS_ARM64: support ARM64. Delete this to remove ARM64 support.
- CAPSTONE_HAS_M68K: support M68K. Delete this to remove M68K support.
- CAPSTONE_HAS_MIPS: support Mips. Delete this to remove Mips support.
- CAPSTONE_HAS_PPC: support PPC. Delete this to remove PPC support.
- CAPSTONE_HAS_POWERPC: support PPC. Delete this to remove PPC support.
- CAPSTONE_HAS_SPARC: support Sparc. Delete this to remove Sparc support.
- CAPSTONE_HAS_SYSZ: support SystemZ. Delete this to remove SystemZ support.
- CAPSTONE_HAS_X86: support X86. Delete this to remove X86 support.

@ -58,7 +58,7 @@ static void test()
//#define ARM64_CODE "\xe1\x0b\x40\xb9" // ldr w1, [sp, #0x8]
#define ARM64_CODE "\x21\x7c\x02\x9b\x21\x7c\x00\x53\x00\x40\x21\x4b\xe1\x0b\x40\xb9"
#endif
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
#define PPC_CODE "\x80\x20\x00\x00\x80\x3f\x00\x00\x10\x43\x23\x0e\xd0\x44\x00\x80\x4c\x43\x22\x02\x2d\x03\x00\x80\x7c\x43\x20\x14\x7c\x43\x20\x93\x4f\x20\x00\x21\x4c\xc8\x00\x21"
#define PPC_CODE2 "\x10\x60\x2a\x10\x10\x64\x28\x88\x7c\x4a\x5d\x0f"
#endif
@ -224,7 +224,7 @@ static void test()
"ARM-64"
},
#endif
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
{
CS_ARCH_PPC,
CS_MODE_BIG_ENDIAN,

@ -66,7 +66,7 @@ static void test()
#endif
//#define THUMB_CODE "\x0a\xbf" // itet eq
//#define X86_CODE32 "\x77\x04" // ja +6
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
#define PPC_CODE "\x80\x20\x00\x00\x80\x3f\x00\x00\x10\x43\x23\x0e\xd0\x44\x00\x80\x4c\x43\x22\x02\x2d\x03\x00\x80\x7c\x43\x20\x14\x7c\x43\x20\x93\x4f\x20\x00\x21\x4c\xc8\x00\x21\x40\x82\x00\x14"
#define PPC_CODE2 "\x10\x60\x2a\x10\x10\x64\x28\x88\x7c\x4a\x5d\x0f"
#endif
@ -207,7 +207,7 @@ static void test()
"ARM-64"
},
#endif
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
{
CS_ARCH_PPC,
CS_MODE_BIG_ENDIAN,

@ -63,7 +63,7 @@ static void test()
#endif
//#define THUMB_CODE "\x0a\xbf" // itet eq
//#define X86_CODE32 "\x77\x04" // ja +6
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
#define PPC_CODE "\x80\x20\x00\x00\x80\x3f\x00\x00\x10\x43\x23\x0e\xd0\x44\x00\x80\x4c\x43\x22\x02\x2d\x03\x00\x80\x7c\x43\x20\x14\x7c\x43\x20\x93\x4f\x20\x00\x21\x4c\xc8\x00\x21\x40\x82\x00\x14"
#endif
#ifdef CAPSTONE_HAS_SPARC
@ -172,7 +172,7 @@ static void test()
"ARM-64"
},
#endif
#ifdef CAPSTONE_HAS_PPC
#ifdef CAPSTONE_HAS_POWERPC
{
CS_ARCH_PPC,
CS_MODE_BIG_ENDIAN,

Loading…
Cancel
Save