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_note.c
AgeCommit message (Collapse)AuthorFilesLines
2023年04月06日Correct wrong assertion in jit_note.c when relocating notes. pcpa1-3/+3
2023年02月17日Update copyright year pcpa1-1/+1
2022年10月06日Update Copyright year. pcpa1-1/+1
Intermediate preparation for a new release in the near future.
2019年09月17日Update copyright year pcpa1-1/+1
2017年09月14日Update copyright year pcpa1-1/+1
2015年04月26日Update copyright date pcpa1-1/+1
2014年11月01日Resync with new patch to make functions receive a const argument pcpa1-1/+1
2014年11月01日misc: Make jit_note and related functions take a const argument Holger Hans Peter Freyther1-1/+1
Make jit_memcpy, jit_memmove, jit_data take const pointers to allow jit_note to be used with a const string (e.g. a string literal, __FILE__ or __func__). This is needed for GNU Smalltalk to silence compiler warnings. Sadly "const jit_pointer_t" is not the same as "typedef const void *" so I introduced a new typedef for a const jit pointer. The other option would be to replace jit_pointer_t with void*.
2014年07月29日Do not pass null for free, memcpy and memmove pcpa1-11/+12
* lib/jit_memory.c: Do not call free on NULL pointers. * include/lightning/jit_private.h, lib/jit_note.c, lib/lightning.c: Add a wrapper to memcpy and memmove to not actually call those functions with a zero size argument, and likely also a null src or dst.
2014年03月12日Implement the new jit_set_data interface. pcpa1-1/+1
* include/lightning.h, include/lightning/jit_private.h, lib/lightning.c: Implement the new jit_set_data() interface, and the new jit_get_data() helper. Like jit_set_code(), jit_realize() should be called before jit_set_data(). The most common usage should be jit_set_data(JIT_DISABLE_DATA | JIT_DISABLE_NOTE), to force synthesize any float/double constant in the stack and not generate any debug information. * lib/jit_note.c: Minor change to debug note generation as now it uses an alternate temporary data buffer during constants and debug generation to accommodate the possibility of the user setting an alternate data buffer. * lib/jit_hppa-fpu.c, lib/jit_s390x.c, lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_sparc.c, lib/jit_sparc-fpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c: Implement jit_set_data. * lib/jit_hppa-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c, lib/jit_s390x-sz.c: Update for several instructions that now have a different maximum length due to jit_set_data. * lib/jit_mips-fpu.c: Implement jit_set_data, but missing validation on n32 and n64 abis (and/or big endian). * lib/jit_mips-sz.c: Update for changes in o32. * lib/jit_ppc-fpu.c: Implement jit_set_data, but missing validation on Darwin PPC. * lib/jit_ppc-sz.c: Update for changes in powerpc 32 and 64 bit. * lib/jit_ia64-fpu.c: Implement untested jit_set_data. * TODO: Add note to list ports that were not tested for the new jit_set_data() feature, due to no longer having access to them. * check/nodata.c: New file implementing a simple test exercising several different conditions created by jit_set_data(). * check/check.nodata.sh: New file implementing a wrapper over the existing *.tst files, that runs all tests without using a data buffer for constants; only meaningful (and enabled) on architectures that used to store float/double constants on a read only data buffer. * configure.ac, check/Makefile.am: Update for the new test cases. * check/lightning.c: Implement the new "-d" option that sets an internal flag to call jit_set_data() disable constants and debug, that is, using only a pure code buffer.
2013年09月13日Make jit_get_note a public interface. pcpa1-4/+5
* include/lightning.h, include/lightning/jit_private.h, lib/jit_note.c: Change the code argument of jit_get_note to a jit_pointer_t and make jit_get_note a public interface. It was intended so since start, as a way to map an offset in the code to a function name, file name and line number mapping.
2013年08月11日Correct license to properly advertise LGPLv3 and not GPLv3. pcpa1-8/+10
2013年03月29日Add a simple memory management wrapper. pcpa1-12/+15
* lib/jit_memory.c: Implement a simple memory allocation wrapper to allow overriding calls to malloc/calloc/realloc/free, as well as ensuring all memory containing pointers is zero or points to allocated memory. * include/lightning.h, include/lightning/jit_private.h: Definitions for the memory allocation wrapper. * lib/Makefile.am: Update for new jit_memory.c file. * lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c: Use the new memory allocation wrapper code.
2013年03月06日Rework to better describe what is used only during jit generation. pcpa1-35/+35
* include/lightning/jit_private.h, lib/jit_arm-cpu.c, lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips-cpu.c, lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc-cpu.c, lib/jit_ppc.c, lib/jit_print.c, lib/jit_sparc-cpu.c, lib/jit_sparc.c, lib/jit_x86-cpu.c, lib/jit_x86.c, lib/lightning.c: Add an extra structure for data storage during jit generation, and release it after generating jit, to reduce a bit memory usage, and also to make it easier to understand what data is available during jit runtime.
2013年02月11日Add code to release all memory used by the jit state. pcpa1-2/+2
* include/lightning.h, lib/lightning.c: Implement the new jit_clear_state and jit_destroy_state calls. jit_clear_state releases all memory not required during jit_execution; that is, leaves only the mmap'ed data and code buffers allocated. jit_destroy_state releases the mmap'ed buffers as well as the jit_state_t object itself, that holds pointers to the code and data buffers, as well as annotation pointers (for disassembly or backtrace) in the data buffer. * lib/jit_note.c: Correct invalid vector offset access. * check/ccall.c, check/lightning.c, doc/ifib.c, doc/incr.c, doc/printf.c, doc/rfib.c, doc/rpn.c: Use the new jit_clear_state and jit_destroy_state calls, to demonstrate the new code to release all jit memory. * doc/body.texi: Add basic documentation and usage description of jit_clear_state and jit_destroy_state.
2013年02月11日Store all annotation information in the read only data buffer. pcpa1-17/+64
* include/lightning/jit_private.h, lib/jit_note.c, lib/lightning.c: Store all annotation information in the mmap'ed area reserved for read only data. This adds code to not allocate memory for jit_note_t objects, and to relocate jit_line_t objects and its contents after calculating annotation information. The jit_line_t objects are relocated because it is not possible to always calculate before hand data layout because note information may be extended or redundant entries removed, as well as allowed to be added in non sequential order. A bug was also corrected in _jit_set_note, that was causing it to allocate new jit_line_t objects when not needed. It was still working correctly, but allocating way more memory than required.
2013年01月18日Correct reference to dangling pointer and better note bounds checking pcpa1-2/+2
lib/jit_note.c: Correct bounds check and wrong code keeping a pointer that could be changed after a realloc call.
2013年01月18日Add the new jit_name call to mark function boundaries pcpa1-75/+199
* check/3to2.tst, check/add.tst, check/allocai.tst, check/bp.tst, check/call.tst, check/ccall.c, check/clobber.tst, check/divi.tst, check/fib.tst, check/ldsti.tst, check/ldstr-c.tst, check/ldstr.tst, check/ldstxi-c.tst, check/ldstxi.tst, check/ldstxr-c.tst, check/ldstxr.tst, check/lightning.c, check/rpn.tst, check/stack.tst, check/varargs.tst, include/lightning.h, include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc.c, lib/jit_print.c, lib/jit_x86.c, lib/lightning.c: Extend the "jit_note" abstraction with the new "jit_name" call, that receives a string argument, and should usually be called to mark boundaries of functions of code generating jit (that is, it is not expected that the language generating jit map its functions to jit functions).
2013年01月11日Add filename and line number annotation abstraction. pcpa1-0/+236
* lib/jit_note.c: New file implementing a simple string+integer annotation, that should be used to map filename and line number to offsets in the generated jit. * include/lightning.h, lib/lightning.c: Update for the new note code. Add an extra mandatory argument to init_jit, that is used as argument to bfd_openr. Change from generic void* to char* the argument to jit_note and add an extra integer argument, to map to filename and line number. * check/ccall.c, check/lightning.c, include/lightning/jit_private.h, lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_print.c, lib/jit_x86.c: lib/Makefile.am: Update for the new annotation code. * configure.ac, check/Makefile.am: Update to work with latest automake.
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月13日 19:22:14 +0000

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