mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-09 23:40:29 +02:00
Use jit_code_last_code as symbolic name of last enum
* include/lightning.h, lib/jit_size.c, size.c: Use a symbolic value for the last IR code.
This commit is contained in:
parent
839341a498
commit
dbb1bb2409
4 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-10-13 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
|
* include/lightning.h, lib/jit_size.c, size.c: Use a
|
||||||
|
symbolic value for the last IR code.
|
||||||
|
|
||||||
2014-10-12 Paulo Andrade <pcpa@gnu.org>
|
2014-10-12 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
* include/lightning.h, include/lightning/jit_private.h,
|
* include/lightning.h, include/lightning/jit_private.h,
|
||||||
|
|
|
@ -826,6 +826,7 @@ typedef enum {
|
||||||
#define jit_movi_d_w(u, v) jit_new_node_wd(jit_code_movi_d_w, u, v)
|
#define jit_movi_d_w(u, v) jit_new_node_wd(jit_code_movi_d_w, u, v)
|
||||||
|
|
||||||
jit_code_x86_retval_f, jit_code_x86_retval_d,
|
jit_code_x86_retval_f, jit_code_x86_retval_d,
|
||||||
|
#define jit_code_last_code jit_code_x86_retval_d
|
||||||
} jit_code_t;
|
} jit_code_t;
|
||||||
|
|
||||||
typedef void* (*jit_alloc_func_ptr) (size_t);
|
typedef void* (*jit_alloc_func_ptr) (size_t);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
/*
|
/*
|
||||||
* Initialization
|
* Initialization
|
||||||
*/
|
*/
|
||||||
static jit_int16_t _szs[jit_code_x86_retval_d + 1] = {
|
static jit_int16_t _szs[jit_code_last_code + 1] = {
|
||||||
#if GET_JIT_SIZE
|
#if GET_JIT_SIZE
|
||||||
# define JIT_INSTR_MAX 256
|
# define JIT_INSTR_MAX 256
|
||||||
#else
|
#else
|
||||||
|
|
6
size.c
6
size.c
|
@ -21,7 +21,7 @@
|
||||||
#include <lightning/jit_private.h>
|
#include <lightning/jit_private.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
jit_int16_t _szs[jit_code_x86_retval_d + 1];
|
jit_int16_t _szs[jit_code_last_code + 1];
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
|
@ -39,7 +39,7 @@ main(int argc, char *argv[])
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
max = 0;
|
max = 0;
|
||||||
for (offset = 0; offset <= jit_code_x86_retval_d; offset++)
|
for (offset = 0; offset <= jit_code_last_code; offset++)
|
||||||
if (max < _szs[offset])
|
if (max < _szs[offset])
|
||||||
max = _szs[offset];
|
max = _szs[offset];
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ main(int argc, char *argv[])
|
||||||
fprintf(fp, "#if defined(__powerpc__)\n");
|
fprintf(fp, "#if defined(__powerpc__)\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(fp, "#define JIT_INSTR_MAX %d\n", max);
|
fprintf(fp, "#define JIT_INSTR_MAX %d\n", max);
|
||||||
for (offset = 0; offset <= jit_code_x86_retval_d; offset++)
|
for (offset = 0; offset <= jit_code_last_code; offset++)
|
||||||
fprintf(fp, " %d,\n", _szs[offset]);
|
fprintf(fp, " %d,\n", _szs[offset]);
|
||||||
#if defined(__arm__)
|
#if defined(__arm__)
|
||||||
fprintf(fp, "#endif /* __ARM_PCS_VFP */\n");
|
fprintf(fp, "#endif /* __ARM_PCS_VFP */\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue