mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-28 05:50:30 +02:00
Remove inconsistent, public jit_arg_reg_p macro
* include/lightning/jit_aarch64.h, include/lightning/jit_alpha.h, include/lightning/jit_arm.h, include/lightning/jit_hppa.h, include/lightning/jit_mips.h, include/lightning/jit_ppc.h, include/lightning/jit_s390.h, include/lightning/jit_sparc.h, include/lightning/jit_x86.h, lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390.c, lib/jit_sparc.c, lib/jit_x86.c: Remove jit_arg_reg_p and jit_arg_f_reg_p from a public header, and define it only on port specific files where an integer offset is used to qualify an argument identifier. Exported code expects an opaque pointer (but of jit_node_t* type) to "qualify" an argument identifier. This patch, and the code review/simplification done during it also corrected some bugs: o Inconsistent jit_arg_d value of double argument after 3 integer arguments in arm for jit_functions; tested, C functions were being properly called. o Inconsistent use of getarg_{f,d} and putarg*_{f,d} on s390 (32-bit) that happened to not have a proper test case, as it would only happen for jit functions, and tested, called C functions had proper arguments. o Corrected a "last minute" correction that did not go to the committed version, and would not compile on hppa, due to bad _jit_putargi_d prototype definition.
This commit is contained in:
parent
3695a2e99c
commit
73e520767f
20 changed files with 404 additions and 709 deletions
|
@ -22,16 +22,21 @@
|
|||
|
||||
#define rc(value) jit_class_##value
|
||||
#define rn(reg) (jit_regno(_rvs[jit_regno(reg)].spec))
|
||||
|
||||
#if __X32
|
||||
# define jit_arg_reg_p(i) 0
|
||||
# define jit_arg_f_reg_p(i) 0
|
||||
# define stack_framesize 20
|
||||
# define stack_adjust 12
|
||||
# define CVT_OFFSET -12
|
||||
# define REAL_WORDSIZE 4
|
||||
#else
|
||||
# if __CYGWIN__
|
||||
# define jit_arg_reg_p(i) ((i) >= 0 && (i) < 4)
|
||||
# define jit_arg_f_reg_p(i) jit_arg_reg_p(i)
|
||||
# define stack_framesize 152
|
||||
# else
|
||||
# define jit_arg_reg_p(i) ((i) >= 0 && (i) < 6)
|
||||
# define jit_arg_f_reg_p(i) ((i) >= 0 && (i) < 8)
|
||||
# define stack_framesize 56
|
||||
# endif
|
||||
# define stack_adjust 8
|
||||
|
@ -39,7 +44,6 @@
|
|||
# define REAL_WORDSIZE 8
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
@ -490,20 +494,6 @@ _jit_arg(jit_state_t *_jit)
|
|||
return (jit_new_node_w(jit_code_arg, offset));
|
||||
}
|
||||
|
||||
jit_bool_t
|
||||
_jit_arg_reg_p(jit_state_t *_jit, jit_int32_t offset)
|
||||
{
|
||||
#if __X32
|
||||
return (0);
|
||||
#else
|
||||
# if __CYGWIN__
|
||||
return (offset >= 0 && offset < 4);
|
||||
# else
|
||||
return (offset >= 0 && offset < 6);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
jit_node_t *
|
||||
_jit_arg_f(jit_state_t *_jit)
|
||||
{
|
||||
|
@ -529,20 +519,6 @@ _jit_arg_f(jit_state_t *_jit)
|
|||
return (jit_new_node_w(jit_code_arg_f, offset));
|
||||
}
|
||||
|
||||
jit_bool_t
|
||||
_jit_arg_f_reg_p(jit_state_t *_jit, jit_int32_t offset)
|
||||
{
|
||||
#if __X32
|
||||
return (0);
|
||||
#else
|
||||
# if __CYGWIN__
|
||||
return (offset >= 0 && offset < 4);
|
||||
# else
|
||||
return (offset >= 0 && offset < 8);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
jit_node_t *
|
||||
_jit_arg_d(jit_state_t *_jit)
|
||||
{
|
||||
|
@ -568,12 +544,6 @@ _jit_arg_d(jit_state_t *_jit)
|
|||
return (jit_new_node_w(jit_code_arg_d, offset));
|
||||
}
|
||||
|
||||
jit_bool_t
|
||||
_jit_arg_d_reg_p(jit_state_t *_jit, jit_int32_t offset)
|
||||
{
|
||||
return (jit_arg_f_reg_p(offset));
|
||||
}
|
||||
|
||||
void
|
||||
_jit_getarg_c(jit_state_t *_jit, jit_int32_t u, jit_node_t *v)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue