mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 19:20:23 +02:00
Provide some type safety for jit_gpr_t and jit_fpr_t
This commit is contained in:
parent
cacdeeee4b
commit
99b4fd2d79
22 changed files with 265 additions and 350 deletions
88
jit/jit.c
88
jit/jit.c
|
@ -36,70 +36,70 @@
|
|||
#endif
|
||||
|
||||
#define rc(value) jit_class_##value
|
||||
#define rn(reg) (jit_regno(_rvs[jit_regno(reg)].spec))
|
||||
#define rn(reg) (jit_regno(_rvs[jit_regno(reg.bits)].spec))
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
# define JIT_SP _RSP
|
||||
# define JIT_RET _RAX
|
||||
# define JIT_SP JIT_GPR(_RSP)
|
||||
# define JIT_RET JIT_GPR(_RAX)
|
||||
# if __X32
|
||||
# define JIT_FRET _ST0
|
||||
# define JIT_FRET JIT_FPR(_ST0)
|
||||
# else
|
||||
# if __CYGWIN__
|
||||
# define JIT_RA0 _RCX
|
||||
# define JIT_RA0 JIT_GPR(_RCX)
|
||||
# else
|
||||
# define JIT_RA0 _RDI
|
||||
# define JIT_RA0 JIT_GPR(_RDI)
|
||||
# endif
|
||||
# define JIT_FA0 _XMM0
|
||||
# define JIT_FRET _XMM0
|
||||
# define JIT_FA0 JIT_FPR(_XMM0)
|
||||
# define JIT_FRET JIT_FPR(_XMM0)
|
||||
# endif
|
||||
#elif defined(__mips__)
|
||||
# define JIT_RA0 _A0
|
||||
# define JIT_FA0 _F12
|
||||
# define JIT_SP _SP
|
||||
# define JIT_RET _V0
|
||||
# define JIT_FRET _F0
|
||||
# define JIT_RA0 JIT_GPR(_A0)
|
||||
# define JIT_FA0 JIT_FPR(_F12)
|
||||
# define JIT_SP JIT_GPR(_SP)
|
||||
# define JIT_RET JIT_GPR(_V0)
|
||||
# define JIT_FRET JIT_FPR(_F0)
|
||||
#elif defined(__arm__)
|
||||
# define JIT_RA0 _R0
|
||||
# define JIT_FA0 _D0
|
||||
# define JIT_SP _R13
|
||||
# define JIT_RET _R0
|
||||
# define JIT_RA0 JIT_GPR(_R0)
|
||||
# define JIT_FA0 JIT_FPR(_D0)
|
||||
# define JIT_SP JIT_GPR(_R13)
|
||||
# define JIT_RET JIT_GPR(_R0)
|
||||
# if defined(__ARM_PCS_VFP)
|
||||
# define JIT_FRET _D0
|
||||
# define JIT_FRET JIT_FPR(_D0)
|
||||
# else
|
||||
# define JIT_FRET _R0
|
||||
# define JIT_FRET JIT_FPR(_R0)
|
||||
# endif
|
||||
#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
|
||||
# define JIT_RA0 JIT_GPR(_R3)
|
||||
# define JIT_FA0 JIT_FPR(_F1)
|
||||
# define JIT_SP JIT_GPR(_R1)
|
||||
# define JIT_RET JIT_GPR(_R3)
|
||||
# define JIT_FRET JIT_FPR(_F1)
|
||||
#elif defined(__sparc__)
|
||||
# define JIT_SP _SP
|
||||
# define JIT_RET _I0
|
||||
# define JIT_FRET _F0
|
||||
# define JIT_SP JIT_GPR(_SP)
|
||||
# define JIT_RET JIT_GPR(_I0)
|
||||
# define JIT_FRET JIT_FPR(_F0)
|
||||
#elif defined(__ia64__)
|
||||
# define JIT_SP _R12
|
||||
# define JIT_RET _R8
|
||||
# define JIT_FRET _F8
|
||||
# define JIT_SP JIT_GPR(_R12)
|
||||
# define JIT_RET JIT_GPR(_R8)
|
||||
# define JIT_FRET JIT_FPR(_F8)
|
||||
#elif defined(__hppa__)
|
||||
# define JIT_SP _R30
|
||||
# define JIT_RET _R28
|
||||
# define JIT_FRET _F4
|
||||
# define JIT_SP JIT_GPR(_R30)
|
||||
# define JIT_RET JIT_GPR(_R28)
|
||||
# define JIT_FRET JIT_FPR(_F4)
|
||||
#elif defined(__aarch64__)
|
||||
# define JIT_RA0 _R0
|
||||
# define JIT_FA0 _V0
|
||||
# define JIT_SP _SP
|
||||
# define JIT_RET _R0
|
||||
# define JIT_FRET _V0
|
||||
# define JIT_RA0 JIT_GPR(_R0)
|
||||
# define JIT_FA0 JIT_FPR(_V0)
|
||||
# define JIT_SP JIT_GPR(_SP)
|
||||
# define JIT_RET JIT_GPR(_R0)
|
||||
# define JIT_FRET JIT_FPR(_V0)
|
||||
#elif defined(__s390__) || defined(__s390x__)
|
||||
# define JIT_SP _R15
|
||||
# define JIT_RET _R2
|
||||
# define JIT_FRET _F0
|
||||
# define JIT_SP JIT_GPR(_R15)
|
||||
# define JIT_RET JIT_GPR(_R2)
|
||||
# define JIT_FRET JIT_FPR(_F0)
|
||||
#elif defined(__alpha__)
|
||||
# define JIT_SP _SP
|
||||
# define JIT_RET _V0
|
||||
# define JIT_FRET _F0
|
||||
# define JIT_SP JIT_GPR(_SP)
|
||||
# define JIT_RET JIT_GPR(_V0)
|
||||
# define JIT_FRET JIT_FPR(_F0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue