mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-26 05:00:28 +02:00
Make JIT_RET, JIT_FRET and JIT_SP private.
* check/add.tst, check/allocai.tst, check/bp.tst, check/divi.tst, check/fib.tst, check/lightning.c, include/lightning/jit_arm.h, include/lightning/jit_mips.h, include/lightning/jit_ppc.h, include/lightning/jit_private.h, include/lightning/jit_x86.h: Make JIT_RET, JIT_FRET and JIT_SP private. These should not be used in any operations due to frequently having special constraints (usually JIT_FRET). JIT_FP must be made available because it must be used as the base register to access stack space allocated with jit_allocai.
This commit is contained in:
parent
39afbe1c40
commit
c5421a8c76
13 changed files with 51 additions and 46 deletions
|
@ -27,8 +27,6 @@
|
|||
#define jit_swf_p() (jit_cpu.vfp == 0)
|
||||
#define jit_hardfp_p() jit_cpu.abi
|
||||
|
||||
#define JIT_RET _R0
|
||||
#define JIT_SP _R13
|
||||
#define JIT_FP _R11
|
||||
typedef enum {
|
||||
#define jit_arg_reg_p(i) ((i) >= 0 && (i) < 4)
|
||||
|
@ -65,11 +63,6 @@ typedef enum {
|
|||
_R2, /* r2 - argument/result */
|
||||
_R1, /* r1 - argument/result */
|
||||
_R0, /* r0 - argument/result */
|
||||
#if defined(__ARM_PCS_VFP)
|
||||
# define JIT_FRET _D0
|
||||
#else
|
||||
# define JIT_FRET _R0
|
||||
#endif
|
||||
#define JIT_F0 (jit_hardfp_p() ? _D8 : _D0)
|
||||
#define JIT_F1 (jit_hardfp_p() ? _D9 : _D1)
|
||||
#define JIT_F2 (jit_hardfp_p() ? _D10 : _D2)
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
/*
|
||||
* Types
|
||||
*/
|
||||
#define JIT_RET _V0
|
||||
#define JIT_FRET _F0
|
||||
#define JIT_SP _SP
|
||||
#define JIT_FP _FP
|
||||
typedef enum {
|
||||
#define jit_arg_reg_p(i) ((i) >= 0 && (i) < 4)
|
||||
|
|
|
@ -59,11 +59,9 @@ typedef enum {
|
|||
_R14, _R15, _R16, _R17, _R18, _R19, _R20, _R21,
|
||||
_R22, _R23, _R24, _R25, _R26, _R27, _R28, _R29,
|
||||
_R30,
|
||||
#define JIT_SP _R1
|
||||
_R1,
|
||||
#define JIT_FP _R31
|
||||
_R31,
|
||||
#define JIT_RET _R3
|
||||
#define JIT_RA0 _R3
|
||||
#define JIT_RA1 _R4
|
||||
#define JIT_RA2 _R5
|
||||
|
@ -103,7 +101,6 @@ typedef enum {
|
|||
* saved/restored (if used) */
|
||||
_F22, _F23, _F24, _F25, _F26, _F27, _F28, _F29,
|
||||
_F30, _F31,
|
||||
#define JIT_FRET _F1
|
||||
#define JIT_FA0 _F1
|
||||
#define JIT_FA1 _F2
|
||||
#define JIT_FA2 _F3
|
||||
|
|
|
@ -42,6 +42,32 @@
|
|||
# define HIDDEN /**/
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
# define JIT_SP _RSP
|
||||
# define JIT_RET _RAX
|
||||
# if __WORDSIZE == 32
|
||||
# define JIT_FRET _ST0
|
||||
# else
|
||||
# define JIT_FRET _XMM0
|
||||
# endif
|
||||
#elif defined(__mips__)
|
||||
# define JIT_SP _SP
|
||||
# define JIT_RET _V0
|
||||
# define JIT_FRET _F0
|
||||
#elif defined(__arm__)
|
||||
# define JIT_SP _R13
|
||||
# define JIT_RET _R0
|
||||
# if defined(__ARM_PCS_VFP)
|
||||
# define JIT_FRET _D0
|
||||
# else
|
||||
# define JIT_FRET _R0
|
||||
# endif
|
||||
#elif defined(__ppc__)
|
||||
# define JIT_SP _R1
|
||||
# define JIT_RET _R3
|
||||
# define JIT_FRET _F1
|
||||
#endif
|
||||
|
||||
#define jit_size(vector) (sizeof(vector) / sizeof((vector)[0]))
|
||||
|
||||
#define jit_reg_free_p(regno) \
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#define jit_sse2_p() jit_cpu.sse2
|
||||
#define jit_x87_reg_p(reg) ((reg) >= _ST0 && (reg) <= _ST7)
|
||||
|
||||
#define JIT_RET _RAX
|
||||
#define JIT_SP _RSP
|
||||
#define JIT_FP _RBP
|
||||
typedef enum {
|
||||
#if __WORDSIZE == 32
|
||||
|
@ -40,7 +38,6 @@ typedef enum {
|
|||
# define jit_arg_f_reg_p(i) 0
|
||||
# define jit_f(i) (jit_cpu.sse2 ? _XMM0 + (i) : _ST0 + (i))
|
||||
# define jit_f_num() (jit_cpu.sse2 ? 8 : 6)
|
||||
# define JIT_FRET _ST0
|
||||
# define JIT_R0 _RAX
|
||||
# define JIT_R1 _RCX
|
||||
# define JIT_R2 _RDX
|
||||
|
@ -69,7 +66,6 @@ typedef enum {
|
|||
# define jit_arg_f_reg_p(i) ((i) >= 0 && (i) < 8)
|
||||
# define jit_f(index) (_XMM0 + (index))
|
||||
# define jit_f_num() 8
|
||||
# define JIT_FRET _XMM0
|
||||
# define JIT_R0 _RAX
|
||||
# define JIT_R1 _R10
|
||||
# define JIT_R2 _R11
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue