headers: Add BEGIN_DECLS and ORC_ENABLE_UNSTABLE_API
authorDavid Schleef <ds@schleef.org>
Thu, 14 Apr 2011 20:00:57 +0000 (13:00 -0700)
committerDavid Schleef <ds@schleef.org>
Thu, 14 Apr 2011 20:00:57 +0000 (13:00 -0700)
orc/orcarm.h
orc/orccpuinsn.h
orc/orcmmx.h
orc/orcneon.h
orc/orconce.h
orc/orcpowerpc.h
orc/orcprogram.h
orc/orcsse.h
orc/orcx86.h
orc/orcx86insn.h

index 9d53040..75651c1 100644 (file)
@@ -4,6 +4,9 @@
 
 #include <orc/orcprogram.h>
 
+ORC_BEGIN_DECLS
+
+#ifdef ORC_ENABLE_UNSTABLE_API
 
 typedef enum {
   ORC_ARM_A1 = ORC_GP_REG_BASE+0,
@@ -320,3 +323,7 @@ void orc_arm_flush_cache (OrcCode *code);
 
 #endif
 
+ORC_END_DECLS
+
+#endif
+
index b8e8745..1ea3f97 100644 (file)
@@ -1,6 +1,8 @@
 
-#ifndef _ORC_ORC_SYSINSN_H_
-#define _ORC_ORC_SYSINSN_H_
+#ifndef _ORC_ORC_CPUINSN_H_
+#define _ORC_ORC_CPUINSN_H_
+
+#ifdef ORC_ENABLE_UNSTABLE_API
 
 typedef struct _OrcSysInsn OrcSysInsn;
 typedef struct _OrcSysOpcode OrcSysOpcode;
@@ -31,6 +33,7 @@ struct _OrcSysOpcode {
 
 #define ORC_SYS_OPCODE_FLAG_FIXED (1<<0)
 
+#endif
 
 #endif
 
index c299e2f..0689765 100644 (file)
@@ -4,6 +4,8 @@
 
 #include <orc/orcx86.h>
 
+ORC_BEGIN_DECLS
+
 typedef enum {
   ORC_TARGET_MMX_MMX = (1<<0),
   ORC_TARGET_MMX_MMXEXT = (1<<1),
@@ -17,6 +19,8 @@ typedef enum {
   ORC_TARGET_MMX_64BIT = (1<<9)
 } OrcTargetMMXFlags;
 
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 typedef enum {
   X86_MM0 = ORC_VEC_REG_BASE,
   X86_MM1,
@@ -206,6 +210,9 @@ void orc_mmx_load_constant (OrcCompiler *compiler, int reg, int size,
 /* SSE4.2 instructions */
 #define orc_mmx_emit_pcmpgtq(p,a,b)    orc_mmx_emit_660f (p, "pcmpgtq", 0x3837, a, b)
 
+#endif
+
+ORC_END_DECLS
 
 #endif
 
index 81fde4d..5e0e4d0 100644 (file)
@@ -5,6 +5,10 @@
 #include <orc/orc.h>
 #include <orc/orcarm.h>
 
+ORC_BEGIN_DECLS
+
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 const char *orc_neon_reg_name (int reg);
 const char *orc_neon_reg_name_quad (int reg);
 
@@ -31,6 +35,9 @@ void orc_neon_emit_loadpl (OrcCompiler *p, int reg, int param);
 void orc_neon_preload (OrcCompiler *compiler, OrcVariable *var, int write,
     int offset);
 
+#endif
+
+ORC_END_DECLS
 
 #endif
 
index a4689a9..bd8b9e5 100644 (file)
@@ -2,6 +2,10 @@
 #ifndef _ORC_ONCE_H_
 #define _ORC_ONCE_H_
 
+#include <orc/orcutils.h>
+
+ORC_BEGIN_DECLS
+
 typedef struct _OrcMutex OrcMutex;
 
 typedef struct _OrcOnce OrcOnce;
@@ -14,6 +18,7 @@ struct _OrcOnce {
 void orc_once_mutex_lock (void);
 void orc_once_mutex_unlock (void);
 
+ORC_END_DECLS
 
 #endif
 
index 5a85a47..918a26b 100644 (file)
@@ -4,6 +4,10 @@
 
 #include <orc/orcprogram.h>
 
+ORC_BEGIN_DECLS
+
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 enum {
   POWERPC_R0 = ORC_GP_REG_BASE,
   POWERPC_R1,
@@ -168,6 +172,9 @@ int powerpc_get_constant_full (OrcCompiler *p, int value0, int value1, int value
 
 #define powerpc_emit_vperm(p,a,b,c,d)      powerpc_emit_VA (p, "vperm", 0x1000002b, a, b, c, d)
 
+#endif
+
+ORC_END_DECLS
 
 #endif
 
index 42c7c98..8aebccb 100644 (file)
@@ -4,6 +4,8 @@
 
 #include <orc/orcutils.h>
 
+ORC_BEGIN_DECLS
+
 typedef struct _OrcOpcodeExecutor OrcOpcodeExecutor;
 typedef struct _OrcExecutor OrcExecutor;
 typedef struct _OrcExecutorAlt OrcExecutorAlt;
@@ -776,5 +778,7 @@ void orc_code_chunk_free (OrcCodeChunk *chunk);
 
 #endif
 
+ORC_END_DECLS
+
 #endif
 
index fe21b9c..351dbd2 100644 (file)
@@ -5,6 +5,8 @@
 #include <orc/orcx86.h>
 #include <orc/orcx86insn.h>
 
+ORC_BEGIN_DECLS
+
 typedef enum {
   ORC_TARGET_SSE_SSE2 = (1<<0),
   ORC_TARGET_SSE_SSE3 = (1<<1),
@@ -18,6 +20,8 @@ typedef enum {
   ORC_TARGET_SSE_64BIT = (1<<9)
 }OrcTargetSSEFlags;
 
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 typedef enum {
   X86_XMM0 = ORC_VEC_REG_BASE,
   X86_XMM1,
@@ -66,8 +70,11 @@ void orc_sse_restore_mxcsr (OrcCompiler *compiler);
 void orc_sse_load_constant (OrcCompiler *compiler, int reg, int size,
     orc_uint64 value);
 
+#endif
+
 unsigned int orc_sse_get_cpu_flags (void);
 
+ORC_END_DECLS
 
 #endif
 
index 277ca1b..6ec19ab 100644 (file)
@@ -5,6 +5,10 @@
 #include <orc/orcprogram.h>
 #include <orc/orcx86insn.h>
 
+ORC_BEGIN_DECLS
+
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 enum {
   X86_EAX = ORC_GP_REG_BASE,
   X86_ECX,
@@ -174,6 +178,9 @@ void orc_x86_emit_cpuinsn_branch (OrcCompiler *p, int index, int label);
 void orc_x86_emit_cpuinsn_label (OrcCompiler *p, int index, int label);
 void orc_x86_emit_cpuinsn_none (OrcCompiler *p, int index);
 
+#endif
+
+ORC_END_DECLS
 
 
 #endif
index aaa33dc..dd77c80 100644 (file)
@@ -2,6 +2,10 @@
 #ifndef ORC_ORC_X86_INSN_H_
 #define ORC_ORC_X86_INSN_H_
 
+ORC_BEGIN_DECLS
+
+#ifdef ORC_ENABLE_UNSTABLE_API
+
 enum {
   ORC_X86_INSN_TYPE_SD,
   ORC_X86_INSN_TYPE_SHIFTIMM,
@@ -449,3 +453,7 @@ enum {
 
 #endif
 
+ORC_END_DECLS
+
+#endif
+