1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-08 02:40:17 +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:
pcpa 2014-10-14 17:05:02 -03:00
parent 839341a498
commit dbb1bb2409
4 changed files with 10 additions and 4 deletions

View file

@ -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>
* include/lightning.h, include/lightning/jit_private.h,

View file

@ -826,6 +826,7 @@ typedef enum {
#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,
#define jit_code_last_code jit_code_x86_retval_d
} jit_code_t;
typedef void* (*jit_alloc_func_ptr) (size_t);

View file

@ -26,7 +26,7 @@
/*
* 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
# define JIT_INSTR_MAX 256
#else

6
size.c
View file

@ -21,7 +21,7 @@
#include <lightning/jit_private.h>
#include <stdio.h>
jit_int16_t _szs[jit_code_x86_retval_d + 1];
jit_int16_t _szs[jit_code_last_code + 1];
int
main(int argc, char *argv[])
@ -39,7 +39,7 @@ main(int argc, char *argv[])
fclose(fp);
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])
max = _szs[offset];
@ -68,7 +68,7 @@ main(int argc, char *argv[])
fprintf(fp, "#if defined(__powerpc__)\n");
#endif
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]);
#if defined(__arm__)
fprintf(fp, "#endif /* __ARM_PCS_VFP */\n");