mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 11:10:21 +02:00
Make jit_cpu private
This commit is contained in:
parent
19da79c8c1
commit
fe34e3cdf1
2 changed files with 39 additions and 86 deletions
|
@ -17,44 +17,46 @@
|
||||||
* Paulo Cesar Pereira de Andrade
|
* Paulo Cesar Pereira de Andrade
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
typedef struct {
|
||||||
* Types
|
/* x87 present */
|
||||||
*/
|
uint32_t fpu : 1;
|
||||||
#if __X32 || __CYGWIN__
|
/* cmpxchg8b instruction */
|
||||||
typedef jit_pointer_t jit_va_list_t;
|
uint32_t cmpxchg8b : 1;
|
||||||
#else
|
/* cmov and fcmov branchless conditional mov */
|
||||||
typedef struct jit_va_list {
|
uint32_t cmov : 1;
|
||||||
int32_t gpoff;
|
/* mmx registers/instructions available */
|
||||||
int32_t fpoff;
|
uint32_t mmx : 1;
|
||||||
jit_pointer_t over;
|
/* sse registers/instructions available */
|
||||||
jit_pointer_t save;
|
uint32_t sse : 1;
|
||||||
/* Declared explicitly as int64 for the x32 abi */
|
/* sse2 registers/instructions available */
|
||||||
int64_t rdi;
|
uint32_t sse2 : 1;
|
||||||
int64_t rsi;
|
/* sse3 instructions available */
|
||||||
int64_t rdx;
|
uint32_t sse3 : 1;
|
||||||
int64_t rcx;
|
/* pcmulqdq instruction */
|
||||||
int64_t r8;
|
uint32_t pclmulqdq : 1;
|
||||||
int64_t r9;
|
/* ssse3 suplemental sse3 instructions available */
|
||||||
jit_float64_t xmm0;
|
uint32_t ssse3 : 1;
|
||||||
jit_float64_t _up0;
|
/* fused multiply/add using ymm state */
|
||||||
jit_float64_t xmm1;
|
uint32_t fma : 1;
|
||||||
jit_float64_t _up1;
|
/* cmpxchg16b instruction */
|
||||||
jit_float64_t xmm2;
|
uint32_t cmpxchg16b : 1;
|
||||||
jit_float64_t _up2;
|
/* sse4.1 instructions available */
|
||||||
jit_float64_t xmm3;
|
uint32_t sse4_1 : 1;
|
||||||
jit_float64_t _up3;
|
/* sse4.2 instructions available */
|
||||||
jit_float64_t xmm4;
|
uint32_t sse4_2 : 1;
|
||||||
jit_float64_t _up4;
|
/* movbe instruction available */
|
||||||
jit_float64_t xmm5;
|
uint32_t movbe : 1;
|
||||||
jit_float64_t _up5;
|
/* popcnt instruction available */
|
||||||
jit_float64_t xmm6;
|
uint32_t popcnt : 1;
|
||||||
jit_float64_t _up6;
|
/* aes instructions available */
|
||||||
jit_float64_t xmm7;
|
uint32_t aes : 1;
|
||||||
jit_float64_t _up7;
|
/* avx instructions available */
|
||||||
} jit_va_list_t;
|
uint32_t avx : 1;
|
||||||
#endif
|
/* lahf/sahf available in 64 bits mode */
|
||||||
|
uint32_t lahf : 1;
|
||||||
|
} jit_cpu_t;
|
||||||
|
|
||||||
jit_cpu_t jit_cpu;
|
static jit_cpu_t jit_cpu;
|
||||||
|
|
||||||
#include "x86-cpu.c"
|
#include "x86-cpu.c"
|
||||||
#include "x86-sse.c"
|
#include "x86-sse.c"
|
||||||
|
|
|
@ -20,14 +20,9 @@
|
||||||
#ifndef _jit_x86_h
|
#ifndef _jit_x86_h
|
||||||
#define _jit_x86_h
|
#define _jit_x86_h
|
||||||
|
|
||||||
#define JIT_HASH_CONSTS 1
|
|
||||||
#define JIT_NUM_OPERANDS 2
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Types
|
* Types
|
||||||
*/
|
*/
|
||||||
#define jit_sse2_p() jit_cpu.sse2
|
|
||||||
#define jit_x87_reg_p(reg) ((reg) >= _ST0 && (reg) <= _ST6)
|
|
||||||
#if __WORDSIZE == 32
|
#if __WORDSIZE == 32
|
||||||
# if defined(__x86_64__)
|
# if defined(__x86_64__)
|
||||||
# define __X64 1
|
# define __X64 1
|
||||||
|
@ -210,48 +205,4 @@ jit_fpr_is_callee_save (jit_fpr_t reg)
|
||||||
# define JIT_FTMP _XMM15
|
# define JIT_FTMP _XMM15
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
/* x87 present */
|
|
||||||
uint32_t fpu : 1;
|
|
||||||
/* cmpxchg8b instruction */
|
|
||||||
uint32_t cmpxchg8b : 1;
|
|
||||||
/* cmov and fcmov branchless conditional mov */
|
|
||||||
uint32_t cmov : 1;
|
|
||||||
/* mmx registers/instructions available */
|
|
||||||
uint32_t mmx : 1;
|
|
||||||
/* sse registers/instructions available */
|
|
||||||
uint32_t sse : 1;
|
|
||||||
/* sse2 registers/instructions available */
|
|
||||||
uint32_t sse2 : 1;
|
|
||||||
/* sse3 instructions available */
|
|
||||||
uint32_t sse3 : 1;
|
|
||||||
/* pcmulqdq instruction */
|
|
||||||
uint32_t pclmulqdq : 1;
|
|
||||||
/* ssse3 suplemental sse3 instructions available */
|
|
||||||
uint32_t ssse3 : 1;
|
|
||||||
/* fused multiply/add using ymm state */
|
|
||||||
uint32_t fma : 1;
|
|
||||||
/* cmpxchg16b instruction */
|
|
||||||
uint32_t cmpxchg16b : 1;
|
|
||||||
/* sse4.1 instructions available */
|
|
||||||
uint32_t sse4_1 : 1;
|
|
||||||
/* sse4.2 instructions available */
|
|
||||||
uint32_t sse4_2 : 1;
|
|
||||||
/* movbe instruction available */
|
|
||||||
uint32_t movbe : 1;
|
|
||||||
/* popcnt instruction available */
|
|
||||||
uint32_t popcnt : 1;
|
|
||||||
/* aes instructions available */
|
|
||||||
uint32_t aes : 1;
|
|
||||||
/* avx instructions available */
|
|
||||||
uint32_t avx : 1;
|
|
||||||
/* lahf/sahf available in 64 bits mode */
|
|
||||||
uint32_t lahf : 1;
|
|
||||||
} jit_cpu_t;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialization
|
|
||||||
*/
|
|
||||||
JIT_API jit_cpu_t jit_cpu;
|
|
||||||
|
|
||||||
#endif /* _jit_x86_h */
|
#endif /* _jit_x86_h */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue