From: David Schleef Date: Thu, 14 Apr 2011 20:00:57 +0000 (-0700) Subject: headers: Add BEGIN_DECLS and ORC_ENABLE_UNSTABLE_API X-Git-Tag: orc-0.4.12~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=468503ffe67adacec5669f426c19377c66680e00;p=platform%2Fupstream%2Forc.git headers: Add BEGIN_DECLS and ORC_ENABLE_UNSTABLE_API --- diff --git a/orc/orcarm.h b/orc/orcarm.h index 9d53040..75651c1 100644 --- a/orc/orcarm.h +++ b/orc/orcarm.h @@ -4,6 +4,9 @@ #include +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 + diff --git a/orc/orccpuinsn.h b/orc/orccpuinsn.h index b8e8745..1ea3f97 100644 --- a/orc/orccpuinsn.h +++ b/orc/orccpuinsn.h @@ -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 diff --git a/orc/orcmmx.h b/orc/orcmmx.h index c299e2f..0689765 100644 --- a/orc/orcmmx.h +++ b/orc/orcmmx.h @@ -4,6 +4,8 @@ #include +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 diff --git a/orc/orcneon.h b/orc/orcneon.h index 81fde4d..5e0e4d0 100644 --- a/orc/orcneon.h +++ b/orc/orcneon.h @@ -5,6 +5,10 @@ #include #include +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 diff --git a/orc/orconce.h b/orc/orconce.h index a4689a9..bd8b9e5 100644 --- a/orc/orconce.h +++ b/orc/orconce.h @@ -2,6 +2,10 @@ #ifndef _ORC_ONCE_H_ #define _ORC_ONCE_H_ +#include + +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 diff --git a/orc/orcpowerpc.h b/orc/orcpowerpc.h index 5a85a47..918a26b 100644 --- a/orc/orcpowerpc.h +++ b/orc/orcpowerpc.h @@ -4,6 +4,10 @@ #include +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 diff --git a/orc/orcprogram.h b/orc/orcprogram.h index 42c7c98..8aebccb 100644 --- a/orc/orcprogram.h +++ b/orc/orcprogram.h @@ -4,6 +4,8 @@ #include +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 diff --git a/orc/orcsse.h b/orc/orcsse.h index fe21b9c..351dbd2 100644 --- a/orc/orcsse.h +++ b/orc/orcsse.h @@ -5,6 +5,8 @@ #include #include +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 diff --git a/orc/orcx86.h b/orc/orcx86.h index 277ca1b..6ec19ab 100644 --- a/orc/orcx86.h +++ b/orc/orcx86.h @@ -5,6 +5,10 @@ #include #include +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 diff --git a/orc/orcx86insn.h b/orc/orcx86insn.h index aaa33dc..dd77c80 100644 --- a/orc/orcx86insn.h +++ b/orc/orcx86insn.h @@ -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 +