Add code to calculate code buffer size based on devel time information. - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_disasm.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年09月24日 03:31:54 -0300
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2013年09月24日 03:31:54 -0300
commitb768fab8b135a722a76dc26b2037d40cdbae9b35 (patch)
treefd86327fa4ec167586803276a5b0b88bd67e9031 /lib/jit_disasm.c
parent95e3fbc8bc674a3d9ab745ae9d0a8ff630016fdf (diff)
downloadlightning-b768fab8b135a722a76dc26b2037d40cdbae9b35.tar.gz
Add code to calculate code buffer size based on devel time information.
* lib/jit_aarch64-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c, lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c, lib/jit_s390x-sz.c, lib/jit_size.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c: New files implementing static tables with longest known instructions length generated to match a lightning instruction. These tables should make it easier to make it very unlikely to ever miscalculate, or by too much, the size of a code buffer. * lib/jit_size.c: New file that aids to either collect jit code size information, or use the information depending on build options. * size.c: New helper file that parses input for, and create an initial jit_$arch-sz.c file, that needs some minor edit for arches with multiple configurations. * configure.ac, Makefile.am: Add the new, devel mode only --enable-devel-get-jit-size configure option, that sets compile time flags to collect jit code size information, that will be used as input for the "noinst size program". * lib/jit_aarch64.c, lib/jit_arm.c, lib/jit_disasm.c, lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_memory.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c: Minor changes for the --enable-devel-get-jit-size build mode, as well as the "production build mode" with jit code size information.
Diffstat (limited to 'lib/jit_disasm.c')
-rw-r--r--lib/jit_disasm.c 1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index af2cb52..00cd71c 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -225,6 +225,7 @@ disasm_print_address(bfd_vma addr, struct disassemble_info *info)
(*info->fprintf_func)(info->stream, "0x%s", buffer);
# define _jit disasm_jit
+# undef jit_pointer_p
# define jit_pointer_p(u) \
((u) >= _jit->code.ptr && (u) < _jit->pc.uc)
if (jit_pointer_p((jit_uint8_t *)(jit_word_t)addr)) {
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月25日 16:23:21 +0000

AltStyle によって変換されたページ (->オリジナル) /