1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00
Commit graph

2 commits

Author SHA1 Message Date
Andy Wingo
44b07aef4b Allow jit_begin_data to declare max data size
* lightening.h:
* lightening/lightening.c (jit_begin_data): Add max data size
  parameter.  If nonzero, can allow the JIT to avoid prematurely
  emitting a constant pool.
  (jit_end_data): Allow pending literals.
* tests/jmp_table.c (run_test): Use new API.
2020-07-30 13:41:02 +02:00
Andy Wingo
91c1591e41 Add support for emitting inline data and table switches
* lightening.h:
* lightening/lightening.c (jit_begin_data, jit_end_data)
  (jit_emit_u8, jit_emit_u16, jit_emit_u32, jit_emit_u64): Add new raw
  data-emitting primitives, bracketed by begin/end so that we can flush
  constant pools first, if needed.
* lightening/lightening.c (struct jit_state): Add new emitting_data
  flag.
  (jit_begin, jit_reset, jit_end): Handle the new flag.
  (emit_abs_reloc): Move here, from x86.c.
* lightening/x86.c (emit_abs_reloc): Remove.
  (jit_try_shorten): Don't shorten if loc == start; could be raw data.
* tests/jmp_table.c: New test.
2020-07-30 13:02:46 +02:00