From abf1b6e67811eecacc634e3f2e1a89d05c7d1884 Mon Sep 17 00:00:00 2001 From: pcpa Date: Wed, 9 Apr 2014 14:46:30 -0300 Subject: [PATCH] Do not export private definitions and types. * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h, include/lightning/jit_hppa.h, include/lightning/jit_ia64.h, include/lightning/jit_mips.h, include/lightning/jit_ppc.h, include/lightning/jit_private.h, include/lightning/jit_s390x.h, include/lightning/jit_sparc.h, include/lightning/jit_x86.h: Do not add jit_regset_t, JIT_RA0, and JIT_FA0 to the installed header file. These types and definitions are supposed to be only used internally. --- ChangeLog | 13 ++++++++++++- include/lightning/jit_aarch64.h | 4 ---- include/lightning/jit_arm.h | 4 ---- include/lightning/jit_hppa.h | 2 -- include/lightning/jit_ia64.h | 7 ------- include/lightning/jit_mips.h | 4 ---- include/lightning/jit_ppc.h | 4 ---- include/lightning/jit_private.h | 25 +++++++++++++++++++++++++ include/lightning/jit_s390x.h | 2 -- include/lightning/jit_sparc.h | 2 -- include/lightning/jit_x86.h | 8 -------- 11 files changed, 37 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 936106b46..7170e8515 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,17 @@ +2014-04-09 Paulo Andrade + + * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h, + include/lightning/jit_hppa.h, include/lightning/jit_ia64.h, + include/lightning/jit_mips.h, include/lightning/jit_ppc.h, + include/lightning/jit_private.h, include/lightning/jit_s390x.h, + include/lightning/jit_sparc.h, include/lightning/jit_x86.h: + Do not add jit_regset_t, JIT_RA0, and JIT_FA0 to the installed + header file. These types and definitions are supposed to be + only used internally. + 2014-04-05 Paulo Andrade - lib/jit_arm-cpu.c: Only adjust stack pointer in prolog if + * lib/jit_arm-cpu.c: Only adjust stack pointer in prolog if need stack space, that is, do not emit a nop instruction subtracting zero from the stack pointer. diff --git a/include/lightning/jit_aarch64.h b/include/lightning/jit_aarch64.h index 8e6a7eb26..1e85f04c1 100644 --- a/include/lightning/jit_aarch64.h +++ b/include/lightning/jit_aarch64.h @@ -65,7 +65,6 @@ typedef enum { _SP, /* stack pointer */ _R30, /* link register */ _R29, /* frame pointer */ -#define JIT_RA0 _R0 _R7, _R6, _R5, _R4, _R3, _R2, _R1, _R0, #define JIT_F0 _V8 @@ -83,13 +82,10 @@ typedef enum { /* callee save */ _V8, _V9, _V10, _V11, _V12, _V13, _V14, _V15, -#define JIT_FA0 _V0 _V7, _V6, _V5, _V4, /* arguments */ _V3, _V2, _V1, _V0, _NOREG, #define JIT_NOREG _NOREG } jit_reg_t; -typedef jit_uint64_t jit_regset_t; - #endif /* _jit_aarch64_h */ diff --git a/include/lightning/jit_arm.h b/include/lightning/jit_arm.h index c8d2b14ce..188f54e6b 100644 --- a/include/lightning/jit_arm.h +++ b/include/lightning/jit_arm.h @@ -58,7 +58,6 @@ typedef enum { _R13, /* sp - stack pointer */ _R14, /* lr - link register */ _R15, /* pc - program counter */ -#define JIT_RA0 _R0 _R3, /* r3 - argument/result */ _R2, /* r2 - argument/result */ _R1, /* r1 - argument/result */ @@ -87,7 +86,6 @@ typedef enum { _S29, _S30, _D15 = _S30, _S31, -#define JIT_FA0 _D0 _S15, _S14, _D7 = _S14, _S13, @@ -123,8 +121,6 @@ typedef struct { jit_uint32_t ldrt_strt : 1; } jit_cpu_t; -typedef jit_uint64_t jit_regset_t; - /* * Initialization */ diff --git a/include/lightning/jit_hppa.h b/include/lightning/jit_hppa.h index a24b2df23..0ec01c05a 100644 --- a/include/lightning/jit_hppa.h +++ b/include/lightning/jit_hppa.h @@ -133,6 +133,4 @@ typedef enum { _NOREG, } jit_reg_t; -typedef jit_uint64_t jit_regset_t; - #endif /* _jit_hppa */ diff --git a/include/lightning/jit_ia64.h b/include/lightning/jit_ia64.h index 12c61adbd..0ff4b2a58 100644 --- a/include/lightning/jit_ia64.h +++ b/include/lightning/jit_ia64.h @@ -117,11 +117,4 @@ typedef enum { _NOREG, } jit_reg_t; -typedef struct { - jit_uint64_t rl; - jit_uint64_t rh; - jit_uint64_t fl; - jit_uint64_t fh; -} jit_regset_t; - #endif /* _jit_ia64_h */ diff --git a/include/lightning/jit_mips.h b/include/lightning/jit_mips.h index 54e57db5a..c56d511ec 100644 --- a/include/lightning/jit_mips.h +++ b/include/lightning/jit_mips.h @@ -88,7 +88,6 @@ typedef enum { _ZERO, _K0, _K1, _RA, _GP, _SP, _FP, -#define JIT_RA0 _A0 #if NEW_ABI _A7, _A6, _A5, _A4, #endif @@ -109,7 +108,6 @@ typedef enum { _F16, _F18, #endif _F20, _F22, _F24, _F26, _F28, _F30, -#define JIT_FA0 _F12 #if NEW_ABI _F19, _F18, _F17, _F16, _F15, _F14, _F13, _F12, #else @@ -119,6 +117,4 @@ typedef enum { _NOREG, } jit_reg_t; -typedef jit_uint64_t jit_regset_t; - #endif /* _jit_mips_h */ diff --git a/include/lightning/jit_ppc.h b/include/lightning/jit_ppc.h index 802189149..53545f460 100644 --- a/include/lightning/jit_ppc.h +++ b/include/lightning/jit_ppc.h @@ -80,7 +80,6 @@ typedef enum { _R1, #define JIT_FP _R31 _R31, -#define JIT_RA0 _R3 _R10, _R9, _R8, _R7, _R6, _R5, _R4, _R3, _F0, _F14, _F15, _F16, _F17, _F18, _F19, _F20, _F21, @@ -96,13 +95,10 @@ typedef enum { * saved/restored (if used) */ _F22, _F23, _F24, _F25, _F26, _F27, _F28, _F29, _F30, _F31, -#define JIT_FA0 _F1 _F13, _F12, _F11, _F10, _F9, _F8, _F7, _F6, _F5, _F4, _F3, _F2, _F1, _NOREG, #define JIT_NOREG _NOREG } jit_reg_t; -typedef jit_uint64_t jit_regset_t; - #endif /* _jit_ppc_h */ diff --git a/include/lightning/jit_private.h b/include/lightning/jit_private.h index ed543bc07..c20845696 100644 --- a/include/lightning/jit_private.h +++ b/include/lightning/jit_private.h @@ -52,14 +52,23 @@ # define JIT_RET _RAX # if __WORDSIZE == 32 # define JIT_FRET _ST0 +typedef jit_uint32_t jit_regset_t; # else +# define JIT_RA0 _RDI +# define JIT_FA0 _XMM0 # define JIT_FRET _XMM0 +typedef jit_uint64_t jit_regset_t; # endif #elif defined(__mips__) +# define JIT_RA0 _A0 +# define JIT_FA0 _F12 # define JIT_SP _SP # define JIT_RET _V0 # define JIT_FRET _F0 +typedef jit_uint64_t jit_regset_t; #elif defined(__arm__) +# define JIT_RA0 _R0 +# define JIT_FA0 _D0 # define JIT_SP _R13 # define JIT_RET _R0 # if defined(__ARM_PCS_VFP) @@ -67,30 +76,46 @@ # else # define JIT_FRET _R0 # endif +typedef jit_uint64_t jit_regset_t; #elif defined(__ppc__) || defined(__powerpc__) +# define JIT_RA0 _R3 +# define JIT_FA0 _F1 # define JIT_SP _R1 # define JIT_RET _R3 # define JIT_FRET _F1 +typedef jit_uint64_t jit_regset_t; #elif defined(__sparc__) # define JIT_SP _SP # define JIT_RET _I0 # define JIT_FRET _F0 +typedef jit_uint64_t jit_regset_t; #elif defined(__ia64__) # define JIT_SP _R12 # define JIT_RET _R8 # define JIT_FRET _F8 +typedef struct { + jit_uint64_t rl; + jit_uint64_t rh; + jit_uint64_t fl; + jit_uint64_t fh; +} jit_regset_t; #elif defined(__hppa__) # define JIT_SP _R30 # define JIT_RET _R28 # define JIT_FRET _F4 +typedef jit_uint64_t jit_regset_t; #elif defined(__aarch64__) +# define JIT_RA0 _R0 +# define JIT_FA0 _V0 # define JIT_SP _SP # define JIT_RET _R0 # define JIT_FRET _V0 +typedef jit_uint64_t jit_regset_t; #elif defined(__s390x__) # define JIT_SP _R15 # define JIT_RET _R2 # define JIT_FRET _F0 +typedef jit_uint32_t jit_regset_t; #endif #define jit_size(vector) (sizeof(vector) / sizeof((vector)[0])) diff --git a/include/lightning/jit_s390x.h b/include/lightning/jit_s390x.h index f84290c0d..fc18f42f9 100644 --- a/include/lightning/jit_s390x.h +++ b/include/lightning/jit_s390x.h @@ -67,6 +67,4 @@ typedef enum { #define JIT_NOREG _NOREG } jit_reg_t; -typedef jit_uint32_t jit_regset_t; - #endif /* _jit_s390x_h */ diff --git a/include/lightning/jit_sparc.h b/include/lightning/jit_sparc.h index 63c7d7405..9300e165e 100644 --- a/include/lightning/jit_sparc.h +++ b/include/lightning/jit_sparc.h @@ -65,6 +65,4 @@ typedef enum { _NOREG, } jit_reg_t; -typedef jit_uint64_t jit_regset_t; - #endif /* _jit_sparc_h */ diff --git a/include/lightning/jit_x86.h b/include/lightning/jit_x86.h index 5c85adb9b..bf33125c2 100644 --- a/include/lightning/jit_x86.h +++ b/include/lightning/jit_x86.h @@ -78,7 +78,6 @@ typedef enum { # define JIT_V2 _R14 # define JIT_V3 _R15 _RBX, _R13, _R14, _R15, -# define JIT_RA0 _RDI _R9, _R8, _RCX, _RDX, _RSI, _RDI, _RSP, _RBP, # define JIT_F0 _XMM8 @@ -90,7 +89,6 @@ typedef enum { # define JIT_F6 _XMM14 # define JIT_F7 _XMM15 _XMM8, _XMM9, _XMM10, _XMM11, _XMM12, _XMM13, _XMM14, _XMM15, -# define JIT_FA0 _XMM0 _XMM7, _XMM6, _XMM5, _XMM4, _XMM3, _XMM2, _XMM1, _XMM0, # define jit_sse_reg_p(reg) ((reg) >= _XMM8 && (reg) <= _XMM0) #endif @@ -138,12 +136,6 @@ typedef struct { jit_uint32_t lahf : 1; } jit_cpu_t; -#if __WORDSIZE == 32 -typedef jit_uint32_t jit_regset_t; -#else -typedef jit_uint64_t jit_regset_t; -#endif - /* * Initialization */