Alien-LibJIT
view release on metacpan or search on metacpan
libjit/ChangeLog view on Meta::CPAN
* include/jit/.gitignore, jit/.gitignore: Add new built files to
the ignore list.
2010-05-31 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c: allow empty block branch optimization for blocks
used both in branch insns and in address-of insns. Branch labels are
split from address-of labels and become eligible for optimization
while the address-of labels stay with the original block.
2010-05-22 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-apply-x86-64.h (JIT_MEMCPY): fix build for MacOS X.
2010-05-15 Klaus Treichel <ktreichel@web.de>
* jit/jit-instrinsic.c ((jit_float32_to_int, jit_float32_to_uint,
jit_float32_to_long, jit_float32_to_ulong, jit_float32_to_int_ovf,
jit_float32_to_uint_ovf, jit_float32_to_long_ovf,
jit_float32_to_ulong_ovf, jit_float64_to_int, jit_float64_to_uint,
jit_float64_to_long, jit_float64_to_ulong, jit_float64_to_int_ovf,
jit_float64_to_uint_ovf, jit_float64_to_long_ovf,
jit_float64_to_ulong_ovf, jit_int_to_float32, jit_int_to_float64,
jit_uint_to_float32, jit_uint_to_float64, jit_long_to_float32,
jit_long_to_float64, jit_ulong_to_float32, jit_ulong_to_float64,
jit_float32_to_float64, jit_float64_to_float32): Add intrinsics for
direct conversion from float32 and float64 to the various integer
types and float32 to float64 and vice versa.
* include/jit/jit-intrinsic.h: Add the prototypes for the new
intrinsics.
* jit/jit-symbol.c: Add the new intrinsics to the symbol table.
* jit/jit-value.c (jit_constant_convert): Use the new intrinsics in
constant conversions.
* jit/jit-block.c (jit_block_get_next_label): Fix comment for texinfo.
* tools/gen-apply.c: Fix strict-alias-rules in returning struct tests.
2010-05-08 Klaus Treichel <ktreichel@web.de>
* jit/jit-block.c (_jit_block_clean_cfg): Don't merge an empty block
if the block's address was used.
2010-01-24 Klaus Treichel <ktreichel@web.de>
* jit/jit-insn.c (jit_insn_branch_if, jit_insn_branch_if_not): Fix
accesses to possibly freed memory.
2009-12-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_record_label): bail out on previously
assigned label.
* jit/jit-block.c (merge_empty): fix label merging.
* jit/jit-internal.h, jit/jit-insn.c (jit_insn_address_of_label)
* jit/jit-block.c (_jit_block_record_label_flags): flag labels that
are taken address of.
* jit/jit-block.c (eliminate_unreachable, _jit_block_clean_cfg):
do not optimize away blocks with labels flagged as being taken
address of.
2009-11-01 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_clean_cfg): implement the "combine" part
of cleanup algorithm.
2009-10-31 Klaus Treichel <ktreichel@web.de>
* jit/jit-compile.c (_JIT_RESULT_TO_OBJECT, _JIT_RESULT_FROM_OBJECT):
Fix compiler warnings on systems where sizeof(int) != sizeof(void *)
* jit/jit-rules-x86-64.c (fixup_alloca): Added to handle alloca
fixups with param area enabled.
(_jit_gen_epilog): Generate the epilog differenty if the stackpointer
was changed during code generation with param area enabled.
* jit/jit-rules-x86-64.h: Add the alloca_fixups to the
extra_gen_state.
* jit/jit-rules-x86-64.ins: Add support for JIT_OP_ALLOCA.
(alloca support based on a patch from Peter Lobsinger, thanks)
2009-10-30 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-function.h, jit/jit-function.c
(jit_function_labels_equal): add function that checks if two labels
belong to the same basic block.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c
(_jit_regs_clear_all_outgoing): add function.
* jit/jit-compile.c (compile_block): use _jit_regs_clear_all_outgoing
after each function call.
* include/jit/jit-except.h (JIT_RESULT_CACHE_FULL): add result code.
* jit/jit-cache.h, jit/jit-cache.c (_jit_cache_check_space): add
function to check the available cache space.
* jit/jit-compile.c: use internal exception to handle the cache full
condition.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c, jit/jit-rules-alpha.c,
* jit/jit-rules-arm.c, jit/jit-rules-interp.c, jit/jit-rules-x86.c,
* jit/jit-rules-x86-64.c, tools/gen-rules-parser.y: use internal
exceptions to signal the cache full condition and other codegen
errors.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c (_jit_regs_inst_ptr)
(_jit_regs_end): remove functions.
2009-10-13 Gopal V <gopalv@php.net>
* jit/jit-insn.c (jit_insn_branch_if_not,jit_insn_branch_if): Redo
last patch to use the branch instructions, but without removing the
actual compare step (Aleksey's suggestion).
2009-10-09 Gopal V <gopalv@php.net>
* jit/jit-insn.c (jit_insn_branch_if_not,jit_insn_branch_if): Remove
the premature optimization of compare & branch operations (thanks
Klaus).
2009-08-04 Aleksey Demakov <ademakov@gmail.com>
libjit/ChangeLog view on Meta::CPAN
* include/jit/jit-block.h:
* jit/jit-block.c (jit_block_get_next_label): add function.
2009-05-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-internal.h, jit/jit-block.c, jit/jit-insn.c,
* jit/jit-function.c: allocate insns as individual array for each
basic block instead of using common per-function pool.
* jit/jit-internal.h, jit/jit-block.c: keep useless basic blocks
in the deleted_blocks list instead of freeing them immediately as
these blocks still may be referenced from elsewhere, for instance,
from jit_value_t structs.
* jit/jit-internal.h, jit/jit-block.c (_jit_block_is_final): add
function to check if the given block is the last one.
* jit/jit-rules-alpha.c, jit/jit-rules-arm.c, jit/jit-rules-x86.c,
* jit/jit-rules-x86-64.c (jump_to_epilog): use _jit_block_is_final.
2009-04-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-block.c (_jit_block_build_cfg, _jit_block_clean_cfg): add
functions to build and clean control flow graph.
* jit/jit-block.c, jit-live.c (_jit_block_peephole_branch): remove
function superseded by jit_block_clean_cfg().
* jit/jit-internal.h, jit/jit-block.c:
* jit/jit-function.c, jit/jit-insn.c: add control flow graph edges
to basic blocks, streamline basic block handling.
* jit/jit-block.c (jit_block_get_label): return jit_label_undefined
instead of zero on error.
* jit/jit-insn.c (jit_insn_call_finally): create a new block after
JIT_OP_CALL_FINALLY.
* jit/Makefile.am (libjit_la_SOURCES): remove jit-cfg.[ch].
2009-04-24 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h (arm_mov_reg_float): fix typo.
* jit/jit-rules-arm.c (_jit_gen_load_value): fix load logic.
2009-04-22 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_call, jit_insn_call_indirect)
(jit_insn_call_indirect_vtable, jit_insn_call_native): don't end
basic block before a function call, rather end it after the call if
the call may throw some exception.
* jit/jit-function.c (compile_block): spill all registers before
calls.
2009-04-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_insn): fix "call_finally" dump.
2009-04-16 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-rules-arm.c: ARM backend fixes.
2009-04-16 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (set_regdesc_flags): fix bug reported by
jan@wedesoft.de.
2009-04-05 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-type.c (perform_layout): let struct alignment be greater
than alignment of every indvidual field.
2009-03-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules.h (jit_reg_name, jit_reg_flags, jit_reg_code); add
convenience macros for register info access.
* jit/jit-rules.h, jit/jit-rules-interp.c, jit/jit-rules-x86.c,
* jit/jit-rules-arm.c (_jit_reg_get_pair, jit_reg_get_pair): add
function and macro for finding register pair.
* jit/jit-reg-alloc.c: replace use of _jit_regs_needs_long_pair with
jit_reg_get_pair().
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c (_jit_regs_get_cpu)
(_jit_regs_needs_long_pair): remove unused functions.
2009-03-25 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h (arm_alu_cc_reg): fix a typo.
* jit/jit-rules-arm.ins (JIT_OP_IDIV): support negative dividends.
2009-03-24 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules.h (jit_reg_other_reg): add macro.
* jit/jit-reg-alloc.c: replace OTHER_REG with jit_reg_other_reg.
* jit/jit-rules-x86.c (_jit_gen_load_value): use jit_reg_other_reg.
* jit/jit-rules-arm.c (_jit_gen_load_value)
(_jit_gen_load_value_struct): use jit_reg_other_reg.
2009-03-23 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-arm.ins: minor cleanup.
2009-03-23 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-gen-arm.h: add more ARM codegen macros including VFP
support.
* jit/jit-rules-arm.ins: restore ARM FPA rules, implement IDIV and
fix MEMSET opcodes.
* jit/jit-rules-arm.h, jit/jit-rules-arm.c: more ARM code.
* jit/jit-reg-alloc.c (_jit_regs_commit): fix typo.
2009-02-07 Aleksey Demakov <ademakov@gmail.com>
* gen-sel-parser.y, gen-sel-scanner.l: remove obsolete files.
* tools/Makefile.am: remove gen-sel target.
* jit/jit-apply-arm.h (jit_builtin_apply): fix bug and optimize.
2009-02-06 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86.h: Add @PLT to the definition of JIT_MEMCPY to
prevent set TEXTREL flags in the shared library.
2009-02-06 Michele Tartara <mikyt@users.sourceforge.net>
* jit/jit-rules.h: define JIT_BACKEND_ARM on ARM.
* tools/gen-apply.c: define PLATFORM_IS_ARM on ARM.
* include/jit/jit-arch-arm.h: add ARM arch header.
* jit/Makefile.am, jit/jit-rules-arm.ins, jit/jit-rules-arm.sel:
replace obsolete .sel file for ARM with .ins file.
* jit/jit-apply-arm.h: define jit_indirector_size, jit_should_pad,
override jit_builtin_apply.
* jit/jit-apply-arm.c (_jit_create_indirector, _jit_pad_buffer): add
functions.
* jit/jit-apply-func.h: for each jit_builtin_* macro add individual
check if it's already defined.
2009-01-30 Peter Fristedt <fristedt@gmail.com>
Kirill Kononenko <Kirill.Kononenko@gmail.com>
* tools/gen-apply.c (run_detect_struct_##n): Work around a bug in
gcc-4.3 with optimization level 2 and Debian Lenny. Make
'jit_nint stack[1]' volatile.
2009-01-01 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.ins (JIT_OP_NFLOAT_TO_FLOAT32,
JIT_OP_NFLOAT_TO_FLOAT64): Add rules for the case that the
destination value is in the stack frame.
(JIT_OP_BR_ILT, JIT_OP_BR_ILE, JIT_OP_BR_IGT, JIT_OP_BR_IGE):
Handle the comparision with a constant 0 with a test opcode instead
of a cmp.
(JIT_OP_ISIGN, JIT_OP_LSIGN): Add handling of the integer sign
opcodes.
2008-12-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_function): dump undefined labels as such
rather than generating new labels for them.
2008-12-12 Aleksey Demakov <ademakov@gmail.com>
* jitruby/*: add Paul Brannan's ruby-libjit.
2008-12-11 Juan Jesus Garcia de Soria <juanj.g_soria@grupobbva.com>
* jit/jit-insn.c (jit_insn_call_native): extend small int return
values to full ints as native calls sometimes return garbage in MSB
of the return register.
2008-12-11 Aleksey Demakov <ademakov@gmail.com>
* configure.ac: bump version to 0.1.3
2008-12-10 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86-64.c (x86_64_call_code): Load %rax with 8 before
doing the call for calls to variadic functions.
* jit/jit-rules-x86-64.ins (JIT_OP_CALL_INDIRECT,
JIT_OP_CALL_VTABLE_PTR): likewise.
libjit/ChangeLog view on Meta::CPAN
* jit/jit-rules-x86.ins:
* jit/jit-rules-x86-64.ins:
* jit/jit-function.c (compile_block): let register allocator see
JIT_OP_INCOMING_REG and JIT_OP_RETURN_REG instructions so it can
free unused values on these instructions rather than on the block
end.
* jit/jit-reg-alloc.c (_jit_regs_set_incoming): it is not possible
to correctly spill the old register value at this point so do not
attempt this and do not promise this.
2008-05-04 Klaus Treichel <ktreichel@web.de>
* jit/jit-reg-alloc.c (_jit_regs_set_outgoing): Set the outgoing
register inhibited regardless if the value was already in the
register or not.
* jit/jit-insn.c (jit_insn_check_null): Emit the check only if the
value to check is no nint constant != 0.
2008-04-22 Aleksey Demakov <ademakov@gmail.com>
* configure.in: update to modern autoconf, rename to configure.ac.
* configure.ac: renamed from configure.in.
2008-04-20 Klaus Treichel <ktreichel@web.de>
* tests/Makefile.am: Add cond.pas to the tests.
* tests/math.pas: Add tests for more opcodes and execute existing
tests for more types.
* tests/cond.pas: Add tests for conditions.
2008-04-20 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: fix the sign opcode for longs (based on
a patch from Klaus) and slightly modify it for ints.
* jit/jit-insn.c: some code cleanup:
(jit_insn_neg, jit_insn_abs, jit_insn_sign): for these unary ops
replace common_binary() with more basic function calls that should
suffice.
(jit_insn_is_nan, jit_insn_is_finite, jit_insn_is_inf): return
false for non-floating point values and do not use common_binary()
as well.
2008-04-19 Klaus Treichel <ktreichel@web.de>
* jit/jit-insn.c (jit_insn_sign): the dest value of the sign insn
has to be int regardless of the argument type.
2008-04-13 Klaus Treichel <ktreichel@web.de>
* include/jit/Makefile.am:
* include/jit/jit-arch-x86-64.h: new file with x86-64 architecture
specific macros for stack frame inspection.
* configure.in: check for x86-64 arch, add -fno-omit-frame-pointer
flag.
* include/jit/jit-walk.h: use _JIT_ARCH_GET_RETURN_ADDRESS and
_JIT_ARCH_GET_CURRENT_RETURN if available.
* jit/jit-gen-x86-64.h: Add additional macros for saving and
restoring the fpu controlword and the mxcsr register. Add
additional SSE conversion macros. Add SSE compare macros.
Add macros for the SSE bit operations on packed values.
Add macros for SSE sqrt and rounding. Add macros for fpu rounding.
* jit/jit-rules-x86-64.c: Add the dreg register class and functions
to handle rounding and SSE bit opcodes on packed values.
* jit/jit-rules-x86-64.ins: Add INT_TO_NFLOAT, LONG_TO_NFLOAT,
FLOAT32_TO_NFLOAT, FLOAT64_TO_NFLOAT.
Rewrite NFLOAT_TO_INT and NFLOAT_TO_LONG to use the new functions
in jit-rules-x86-64.c. Add handling of ABS, NEG and float compares.
2008-03-31 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86.ins: Fix the sign opcode for integers and the
constant case for longs.
2008-03-30 Klaus Treichel <ktreichel@web.de>
* jit/jit-gen-x86-64.h: Add macros for the test, imul, cdw/cdq/cqo
and cmov instructions.
* jit/jit-intrinsic.c (jit_int_sign, jit_long_sign): Return 1 for
values greater than 0 instead of 0.
* jit/jit-rules-x84-64.ins: Add IMUL, IDIV, IDIV_UN, IREM, IREM_UN,
LMUL, LDIV, LDIV_UN, LREM and LREM_UN opcodes. Replace the compares
with zero done with or with test instructions.
2008-03-29 Klaus Treichel <ktreichel@web.de>
* jit/jit-rules-x86.ins: Fix signed division of negative values by a
constant positive power of two.
2008-03-29 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply.c, tools/gen-apply.c: changes to apply needed for
x86-64 support.
2008-03-25 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-interp.c (jit_function_apply_vararg): fix return code if
exception is thrown.
2008-03-24 Klaus Treichel <ktreichel@web.de>
* jit/jit-function.c (cleanup_on_restart): Reset the epilog_fixup.
* jit/jit-apply-x86-64.c: Move parameter passing handling from
jit-rules-x86-64.c to this file because they are needed by apply too.
* jit/jit-apply-x86-64.h: Add declarations needed for parameter passing.
* jit/jit-gen-x86-64.h: Add macros for shift opcodes, register exchanges
and moves from general purpose register to xmm register and vice versa.
* jit/jit-rules-x86-64.c: Move parameter handling to jit-apply.x86-64.c.
Add handling of structs in _jit_gen_load_value and _spill_reg. Fix more
parameter passing issues.
* jit/jit-rules-x86-64.ins: Do some cleanup. Add casts to jit_nint when
checking for valid ranges. Add integer and long shift opcodes. Add
memset opcode.
2008-03-04 Klaus Treichel <ktreichel@web.de>
* jit/Makefile.am: Add jit-rules-x86-64.inc to CLEANFILES to fix
make distcheck.
2008-03-03 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-cache.h, jit/jit-cache.c, jit/jit-function.c (compile):
modify cache algorithm to allow a method to occupy more than one
cache page.
* include/jit/jit-context.h: add JIT_OPTION_CACHE_MAX_PAGE_FACTOR
option.
* jit/jit-context.c (_jit_context_get_cache): use that option.
2008-03-02 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86-64.h: define the sizes for indirector and
redirector.
* jit/jit-apply-x86-64.c: do either a memory indirect, RIP relative
or register relative jump in the redirector whatever is appropriate
for the address location in _jit_create_indirector.
* jit/jit-gen-x86-64.h: add lots of additional code generation
macros and fix some bugs.
* jit/jit-insn.c: don't mark the current block dead after throwing
an exception in jit_insn_call_intrinsic because this is handled in
jit_insn_call_native if the flag JIT_CALL_NORETURN is specified.
* jit/Makefile.am: Add the new files jit-rules-x86-64.c,
jit-rules-x86-64.h and jit-rules-x86-64.ins to the sources.
* jit/jit-rules.h: add the native backend for X86_64.
* jit/jit-rules-x86-64.c, jit/jit-rules-x86-64.h,
jit/jit-rules-x86-64.ins: add the first native code generation for
X86_64.
* jit/jit-value.c: create a nint constant for long/ulong types in
jit_value_create_constant on 64bit archs.
2008-02-29 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-plus.h, jitplus/jit-plus-jump-table.cpp:
* jitplus/jit-plus-function.cpp, jitplus/Makefile.am: add
jit_jump_table class and jit_function::insn_jump_table method, add
jit-plus-jump-table.cpp file, move jit_build_exception class from
jit-plus-function.cpp to jit-plus.h.
2008-02-26 Aleksey Demakov <ademakov@gmail.com>
* use LGPL 2.1 for all the rest - dpas, tools, tests, and doc.
2008-02-06 Aleksey Demakov <ademakov@gmail.com>
* auto_gen.sh: by popular demand restore this file although it only
does "autoreconf -i -f" now.
* tools/gen-rules-parser.y: update license and copyright notices.
2008-01-30 Klaus Treichel <ktreichel@web.de>
* jit/Makefile.am: Fix typo in my last commit.
2008-01-29 Klaus Treichel <ktreichel@web.de>
* jit/jit-apply-x86-64.h: Fix the macros jit_builtin_return_int
and jit_builtin_return_float.
* jit/jit-apply-x86-64.c: Add closure support for x86_64.
* jit/jit-gen-x86-64.h: Add first codegeneration macros for x86_64.
* jit/Makefile.am: Add the two new files to the libjit sources.
2008-01-26 Aleksey Demakov <ademakov@gmail.com>
* auto_gen.sh: remove, use "autoreconf -i -f" instead (thanks
Dalibor for the hint).
* INSTALL, config.guess, config.sub, install-sh, missing: remove
from CVS, these files are automatically generated by autoreconf.
* mkinstalldirs: remove, this file is obsolete.
2008-01-25 Aleksey Demakov <ademakov@gmail.com>
* include/*, jit/*, jitplus/*, jitdynamic/*: use LGPL 2.1.
* doc/libjit.texi: remove "Why GPL?" chapter.
libjit/ChangeLog view on Meta::CPAN
* jit/jit-insn.c (jit_insn_mark_offset): do not start new block
on the bytecode mark. If a mark goes just after another mark then
replace the old mark rather than add the new.
* jit/jit-cache.c (_jit_cache_get_bytecode)
(_jit_cache_get_native): fix offset for the last bytecode mark.
2007-11-13 Aleksey Demakov <ademakov@gmail.com>
* tools/Makefile.am (noinst_HEADERS): add gen-apply-macosx.h
2007-11-08 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-plus.h, jitplus/jit-plus-function.cpp (new_label):
add c++ wrapper for jit_function_reserve_label.
* include/jit/jit-plus.h (clear_recompilable): fix a typo.
2007-10-07 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins (JIT_OP_JUMP_TABLE): fix jump table code
generation.
* include/jit/jit-function.h:
* jit/jit-function.c (jit_function_reserve_label): add new function
to create labels for jump tables.
2007-06-11 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (accumulate_relative_offset): remove.
* jit/jit-insn.c (find_base_insn, jit_insn_load_relative)
(jit_insn_store_relative, jit_insn_add_relative): add find_base_insn
function that should finally optimize relative instructions
correctly.
2007-06-10 Aleksey Demakov <ademakov@gmail.com>
* tools/gen-rules-parser.y (gensel_output_clauses): alter selection
logic so that "reg" rules are chosen over "local" in case the value
is used again in the same basic block.
* jit/jit-rules-x86.ins: tweak COPY rules for bytes, shorts, and
ints.
* jit/jit-live.c (forward_propagation, backward_propagation)
(is_copy_insn): do not perform copy propagation if JIT_OP_COPY_INT
is used for byte and short values.
2007-05-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-live.c (forward_propagation, backward_propagation): do not
optimize addressable and volatile values.
2007-05-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-live.c (_jit_function_compute_liveness)
(forward_propagation, backward_propagation): add simple copy
propagation that works only within basic blocks.
* jit/jit-value.c (jit_value_ref): do not set the live flag here
as this is done in jit-live.c now.
2007-05-26 Klaus Treichel <ktreichel@web.de>
* jit/jit-intrinsic.c: Fix conversion from ulong to nfloat for values
greater that jit_max_long.
2007-05-26 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_store): remove incorrect optimization
that eliminates intermediate value without knowledge of its later
use.
2007-04-04 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (commit_output_value): fix compilation for
archs without register stack (thanks Klaus).
2007-03-04 Aleksey Demakov <ademakov@gmail.com>
* configure.in: update working version to "0.1.1".
2007-03-03 Aleksey Demakov <ademakov@gmail.com>
* include/jit/Makefile.am: add jit-arch.h to BUILT_SOURCES.
* doc/Makefile.am: add extract-docs.sh, mkhtml.sh, mkpdf.sh to
EXTRA_DIST.
* configure.in: bump version to 0.1.0.
* NEWS: update news for the 0.1.0 release.
2007-02-25 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (adjust_assignment, _jit_regs_gen): the ops
that have dest value on x87 stack but have no x87 input values need
the dest register to be adjusted after spilling too.
(is_register_occupied, clobbers_register): undo is_register_occupied
logic introduced 2007-02-12.
2007-02-14 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-function.c (compile_block): check if cache is full and
exit if so.
2007-02-13 Aleksey Demakov <ademakov@gmail.com>
* doc/texinfo.tex: remove an ancient file version from the tree.
automake --add-missing as well as auto_gen.sh add an up-to-date
version of it.
* jit/jit-insn.c, jit/jit-rules-interp.c:
* jitplus/jit-plus-value.cpp, jitplus/jit-plus-function.cpp: fix
texinfo comments.
2007-02-12 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-dump.c (jit_dump_function): flush the output stream upon
dumping the function.
* jit/jit-function.c (cleanup_on_restart, reset_value): add new
functions to clean up the compilation state on restart.
(compile): replace the code that did cleanup on restart with a call
to cleanup_on_restart() which does this job more thoroughly.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: remove _jit_regs_abort()
function as the new cleanup-on-restart code makes it superflows.
* jit/jit-reg-alloc.c (is_register_occupied): add new function;
(clobbers_register, spill_clobbered_register, _jit_regs_gen): fix
a problem that shows up with the new cleanup method.
* tools/gen-rules-parser.y (gensel_output_clauses): the conditions
for the local and frame patterns are changed. If the value is used
before it is defined then both in_frame and in_register flags are
clear. This situation is perfectly valid if there is a backward
branch form a point after the definition to a point before the use.
So if the value is not a constant and it is not in a register assume
that it is on the stack even if the in_frame flag is not set.
2007-02-10 Klaus Treichel <ktreichel@web.de>
* jit/jit-function.c: Use the on-demand compilation driver in
jit_function_apply too. Return the functions' entry point if the
function is allready compiled in jit_function_compile_entry.
2007-02-04 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-common.h, include/jit/jit-context.h,
* include/jit/jit-function.h, jit/jit-internal.h, jit/jit-context.c,
* jit/jit-function.c: provide for user defined on-demand compilation
driver and delayed function entry point setup.
2007-01-28 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (_jit_regs_gen, set_regdesc_flags): fix bugs
introduced 2006-12-30 with loading registers for ternary ops and
handling input register thrash.
2007-01-26 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-arch-x86.h (_JIT_ARCH_GET_CURRENT_FRAME): tweak
gcc version of the macro.
* jit/jit-apply-x86.c (_jit_create_redirector): redirector does not
use stack frame so remove frame set up and restore instructions.
2007-01-23 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-internal.h, jit/jit-function.c: remove the closure_entry
field from jit_function_t. Find this value on the fly in
jit_function_to_closure() and jit_function_to_vtable_pointer()
to be equal either to entry_point or indirector fields.
* jit/jit-rules-alpha.ins, jit/jit-rules-x86.ins: use
jit_function_to_closure() instead of the closure_entry field.
2007-01-17 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: complete special x87
arithmetic support, for other x87 instructions reverse the order of
arguments on the stack.
* jit/jit-rules-x86.ins: take advantage of regalloc's x87 arithmetic
support. Also do not clobber the entire x87 stack for atan, sin, and
cos rules.
2007-01-12 Heiko Weiss <heiko.weiss@de.trumpf-laser.com>
* jit/jit-function.c: Fix a typo in jit_function_from_vtable_pointer
which breaks the build if libjit is built in interpreter mode.
2007-01-04 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-rules-alpha.c: register class should not include FIXED
registers.
* .cvsignore, tools/.cvsignore, tutorial/.cvsignore: updated
the .cvsignore files to ignore some generated files.
2007-01-03 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-rules-alpha.c: initialize alpha register classes.
Fix signed-ness warnings.
2007-01-02 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: add JIT_OP_IMIN_UN rule (based on the
patch #5540 by Kirill Kononenko).
* jit/jit-reg-alloc.c (set_regdesc_value, set_regdesc_register)
(choose_output_register): handle EARLY_CLOBBER flag for dest value.
2006-12-30 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-class.c, jit/jit-reg-class.h, jit/Makefile.am: add
register classes.
* jit/jit-rules-x86.c (_jit_init_backend): initialize x86 register
classes.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: specify register class
for each value and scratch register. Clean up interface.
* tools/gen-rules-scanner.l, tools/gen-rules-parser.y: add register
class declaration; "reg", "lreg", "freg" are not keywords anymore.
"scratch" requires register class specification. "clobber" accepts
register class which means all registers in the class are clobbered.
Remove "only", "spill_before", "unary", and "binary" keywords.
Replace "unary_note" and "binary_note" with "note". Also replace
"unary_branch" and "binary_branch" with "branch".
* jit/jit-rules-alpha.ins, jit/jit-rules-x86.ins: update according
to the new rule syntax.
2006-12-20 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-thread.h, jit/jit-thread.c: add _jit_global_lock mutex.
* jit/jit-init.c (jit_init): make sure that initialization is done
only once.
2006-12-17 Klaus Treichel <ktreichel@web.de>
* include/jit/jit-function.h, jit/jit-function.c: Add the function
jit_function_from_vtable_pointer to convert a vtable pointer back to
the jit_function_t.
2006-11-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (save_value): fix bug freeing stack register
that is not on the stack top.
2006-11-27 Kirill Kononenko <Kirill.Kononenko@gmail.com>
* jit/jit-rules-x86.c (throw_builtin):
* jit/jit-rules-x86.ins (JIT_OP_THROW, JIT_OP_LOAD_PC): directly use
the inst variable to get current PC value for the position-dependent
code case (patch #5503).
2006-11-27 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-context.h: add JIT_OPTION_POSITION_INDEPENDENT
option.
* jit/jit-internal.h (struct _jit_builder): add position_independent
field.
* jit/jit-function.c (_jit_function_ensure_builder): initialize
position_independent field.
* jit/jit-rules-x86.c (throw_builtin):
* jit/jit-rules-x86.ins (JIT_OP_ADDRESS_OF_LABEL, JIT_OP_JUMP_TABLE)
(JIT_OP_THROW, JIT_OP_LOAD_PC): add position_independent check and
stub missing cases.
libjit/ChangeLog view on Meta::CPAN
* jit/jit-opcode.c, jit/jit-rules-interp.c (_jit_gen_insn): Repair
struct handling broken since the last interpreter reorganization,
remove unused interpreter opcodes.
* jit/jit-rules-interp.c (_jit_gen_start_block): check if the fixup
position is before the cache end. This prevents segmentation fault
when the end of cache block is reached and jit_function_compile()
attempts to generate more code (it checks for the cache end way too
late).
2006-10-14 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-interp.c (_jit_create_call_return_insns): fix return
code in case of no return value or struct returned via pointer (this
is just like 2006-02-20 fix for x86).
* jit/jit-cfg.c (create_value_entry): an uninitialized value was
used (thanks Klaus for spotting).
2006-10-02 Klaus Treichel <ktreichel@web.de>
* jit/jit-intrinsic.c: Fix a copy bug in jit_ulong_mul (replace - by *).
2006-09-25 Aleksey Demakov <ademakov@gmail.com>
* include/jit/jit-arch-x86.h, include/jit/jit-arch-generic.h: add
headers for architecture-specific definitions.
(_JIT_ARCH_GET_CURRENT_FRAME): add macro to find the stack frame
pointer.
* include/jit/Makefile.am: create jit-arch.h as a symlink to one of
the jit-arch-*.h files depending on the JIT_ARCH value.
* configure.in: set JIT_ARCH according to the system architecture.
* include/jit/jit-walk.h (jit_get_current_frame):
* jit/jit-walk.c (jit_get_starting_frame):
* tools/gen-apply.c (find_return_offset, detect_frame_offsets): use
_JIT_ARCH_GET_CURRENT_FRAME macro if available. This resolves the
problem with gcc 4.1.* where __builtin_frame_address() function is
broken (thanks Klaus for identifing the problem).
2006-09-15 Radek Polak <psonek2@seznam.cz>
* include/jit/jit-insn.h, jit/jit-insn.c, jit/jit-debugger.c: new
instruction jit_insn_mark_breakpoint_variable.
2006-09-14 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: remove "old" register
allocation code.
* configure.in: remove --enable-new-reg-alloc option.
* jit/jit-rules-x86.ins: simplify JIT_OP_RETURN_LONG rule, lift code
from load_small_struct() function to JIT_OP_RETURN_SMALL_STRUCT rule.
* jit/jit-rules-x86.c: remove load_small_struct() function.
2006-09-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c:
* tools/gen-rules-parser.y: add _JIT_REGS_CLOBBER_STACK flag and use
it in the code generated for "only" rules instead of the explicit
stack top check followed by the _jit_regs_spill_all() call.
2006-09-02 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-interp.c (_jit_run_function):
* jit/jit-rules-interp.c (_jit_gen_insn): remove last traces of
register allocation from the interpreter.
2006-08-31 Klaus Treichel <ktreichel@web.de>
* configure.in: Replace the deprecated AM_PROG_LIBTOOL with the current
AC_PROG_LIBTOOL.
* jitdynamic/Makefile.am, jitplus/Makefile.am: Add -no-undefined to the
LDFLAGS to enable building cygwin/mingw dlls.
2006-08-31 Aleksey Demakov <ademakov@gmail.com>
* tools/gen-rules-scanner.l, tools/gen-rules-parser.y: add "frame"
keyword that is just like "local" but forces the value out from the
register into the stack frame.
* jit/jit-rules-x86.ins: rewrite JIT_OP_COPY_STORE_BYTE,
JIT_OP_ADDRESS_OF, and JIT_OP_COPY_STORE_SHORT rules using the
"frame" keyword.
* jit/Makefile.am, jit/jit-rules-x86.c: remove all references to
jit-rules-x86.sel and jit-rules-x86.slc.
* jit/jit-rules-x86.c: remove mov_memindex_reg_byte() and
widen_byte() functions.
2006-08-30 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-interp.h, jit/jit-interp.c, jit/jit-opcode.c,
jit/jit-rules-interp.h, jit/jit-rules-interp.c: major change in the
internal interpreter instruction set. Now the stack is used only for
function arguments. There are three pseudo-registers used instead of
the stack for operands. One is used for the destination value, two
others are used for the source values. The destination register is
spilled after each instruction. This scheme obviates the need for
register allocation for the interpreter backend.
* jit/jit-function.c (jit_function_compile, compile_block): do not
make register allocator calls if JIT_BACKEND_INTERP is defined.
2006-08-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-function.c (jit_function_from_pc): fix problem with wrong
exception handler address for interpreter.
* jit/jit-insn.c (jit_insn_return, jit_insn_return_ptr): do not pop
the setjmp context for the interpreter backend because it takes care
of this by itself.
* jit/jit-rules.h, jit/jit-rules-alpha.c, jit/jit-rules-arm.c,
* jit/jit-rules-interp.c, jit/jit-rules-x86.c, jit/jit-reg-alloc.c:
move part of the _jit_gen_exch_top() functionality into a separate
_jit_gen_move_top() function.
* include/jit/jit-opcode.h:
* jit/jit-opcode.c: add JIT_OPCODE_IS_JUMP_TABLE flag to mark the
JIT_OP_JUMP_TABLE opcode.
* jit/jit-dump.c (jit_dump_insn, dump_interp_code): add jump table
dumping.
2006-08-28 Klaus Treichel <ktreichel@web.de>
* dpas/Makefile.am, jit/Makefile.am, tests/Makefile.am: Add missing
sources to fix creation of tarballs (make dist).
2006-08-25 Yan Burman <yan_952@hotmail.com>
* jitdynamic/jit-cpp-mangle.c (mangle_type_gcc3): fix typo in
is_unsigned usage (patch #5324)
2006-08-23 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-apply-alpha.c jit/jit-apply-alpha.h: Fix jit_redirector_size.
alpha_call is 6 instructions, not 1. 5 to load the addr, 1 to call.
* jit/jit-gen-alpha.h: add macros for fp sign copy and arithmetic.
* jit/jit-rules-alpha.c: remove TODO() from unused functions.
2006-08-23 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-internal.h (struct _jit_function): change the type of
redirector and indirector fields from char array to pointer.
* jit/jit-function.c (jit_function_create): allocate the redirector
and indirector buffers in the code cache. Call jit_flush_exec on
these buffers. This fixes problems on alpha and some x86 linux
distros. [This one is based on the initial solution suggested by
Kirill Kononenko <Kirill.Kononenko@gmail.com>].
* jit/jit-rules-x86.c (_jit_gen_redirector): ifdef out as this
function is not used with the x86 backend.
* jit/jit-reg-alloc.c: improve handling of three-address op codes.
Now the dest register may re-use one of the input registers while
previously it was always assigned to a separate register. Also
restructure the code that will be used for better selection of x87
instructions (this code was not used before and still is not but
this is about to change).
* jit/jit-rules-x86.ins: rewrite all LOAD_RELATIVE and LOAD_ELEMENT
ops for x86 as three-address. Adjust IREM ops so that they work
correctly together with the latest allocator changes.
2006-08-22 Klaus Treichel <ktreichel@web.de>
* jit/jit-alloc.c: Use mmap and munmap to allocate executable memory
where available because memory allocated with malloc is not executable
on some archs/distros.
2006-08-21 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-rules-alpha.c jit/jit-gen-alpha.h: Add macros for
int to fp and fp to int conversions. Use _jit_pad_bufer.
2006-08-20 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-apply-alpha.c jit/jit-apply-alpha.h jit/jit-rules-alpha.h
jit/jit-rules-alpha.ins jit/jit-rules-alpha.c jit/jit-gen-alpha.h:
Remove unnecessary code from the prolog, epilog, redirector, and
closure. Implement > and >= opcodes for signed and unsigned values.
2006-08-19 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (set_regdesc_flags): fix a problem with the
clobber flag being ignored. The problem was introduced by the patch
from 2006-06-17.
2006-08-15 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-rules-alpha.c jit/jit-rules-alpha.h jit/jit-rules-alpha.ins
Add a TODO() macro to print unimplemented warnings. Fix some
casting warnings. Implement _jit_gen_redirector(...). Fix
JIT_CDECL_WORD_REG_PARAMS to use the correct parameter
registers. Add some stack push and pop instructions.
2006-08-15 Kirill Kononenko <Kirill.Kononenko@gmail.com>
* configure.in: add --enable-signals option;
* jit/Makefile.am: add jit/jit-signal.c;
* jit/jit-signal.c, jit/jit-internal.h: add _jit_signal_init();
* jit/jit-init.c: call _jit_signal_init() if JIT_USE_SIGNALS is
defined. (patch #5278.)
2006-08-11 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-rules-alpha.c jit/jit-rules-alpha.ins Properly handle
fixups on alpha. Implement JIT_OP_CALL_EXTERNAL for alpha.
2006-07-29 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (use_cheapest_register): allow a register that
contains an input value to be used as a scratch register. The input
value in this case is copied to another register. This resolves the
problem with JIT_OP_IREM rule that failed to allocate a scratch reg
in a very specific case (all EBX, ESI, EDI regs are used as global,
dividend is initially in ECX and copied to EAX:EDX pair where x86
idiv expects it to be).
* jit/jit-reg-alloc.c (set_regdesc_flags): fix a bug.
2006-07-23 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-apply-alpha.c jit/jit-apply-alpha.h jit/jit-apply-func.h
jit/jit-gen-alpha.h jit/jit-rules-alpha.c jit/jit-rules-alpha.h
jit/jit-rules-alpha.ins Implement the redirector for alpha.
Continue to implement more functions in jit/jit-rules-alpha.c.
2006-07-15 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-apply-alpha.c jit/jit-gen-alpha.h jit/jit-rules-alpha.h
jit/jit-rules-alpha.c: Implement closure for alpha. Use jsr
instead of bsr in alpha_call. Clean up prolog and epilog
generation for alpha to be more readable.
2006-07-13 Thomas Cort <linuxgeek@gmail.com>
* jit/jit-gen-alpha.h jit/jit-rules-alpha.c jit/jit-rules-alpha.h:
Added trap barrier macro alpha_trapb. Implemented
_jit_gen_prolog and _jit_gen_epilog for alpha.
2006-07-12 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (jit_insn_move_blocks_to_start): fix problem with
wrong order of blocks that were moved from the position just after
the init_block and with disappearance of blocks after the empty
init_block.
2006-07-12 Thomas Cort <linuxgeek@gmail.com>
* README.alpha jit/Makefile.am jit/jit-apply-alpha.c
jit/jit-apply-alpha.h jit/jit-elf-defs.h jit/jit-gen-alpha.h
jit/jit-rules-alpha.c jit/jit-rules-alpha.h
jit/jit-rules-alpha.ins /jit/jit-rules.h: Initial import of the
code for the alpha port.
2006-07-06 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: fix division by power of two.
2006-07-05 Aleksey Demakov <ademakov@gmail.com>
* configure.in: make new register allocator the default.
* jit/jit-reg-alloc.c (is_register_alive, compute_spill_cost): fix
problem with destroying the end register of a long pair.
2006-07-03 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: add JIT_OP_LOW_WORD, JIT_OP_EXPAND_INT,
JIT_OP_EXPAND_UINT, JIT_OP_INT_TO_NFLOAT, JIT_OP_UINT_TO_NFLOAT,
JIT_OP_LONG_TO_NFLOAT, JIT_OP_ULONG_TO_NFLOAT and rewrite
JIT_OP_TRUNC_SBYTE, JIT_OP_TRUNC_UBYTE, JIT_OP_LOAD_PC rules.
* jit/jit-rules-x86.c (_jit_opcode_is_supported): include .inc file
instead of .slc if USE_NEW_REG_ALLOC is defined.
2006-06-28 Aleksey Demakov <ademakov@gmail.com>
* tools/gen-rules-parser.y (gensel_output_code):
* jit/jit-rules-x86.ins: use $1 for dest register instead of $0
for consistency.
2006-06-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-insn.c (accumulate_relative_offset): add function that
accumulates JIT_OP_ADD_RELATIVE offsets.
(jit_insn_store_relative, jit_insn_load_relative)
(jit_insn_add_relative): use accumulate_relative_offset() instead
of previous_relative() to find the offset from the original address
and do not replace the accumulated instructions with JIT_OP_NOP as
it was before. The old approach is problematic because it is unknown
at this point if the values we accumulated are dead or they will be
used by instructions added later. The dead code elimination pass
removes unused values just as well but with enough knowledge to be
safe. The new code also does not move JIT_OP_ADDRESS_OF towards the
relative instructions that uses the address. Supposedly such move
may be used by the code generator as a hint. However currently the
code generator does not use such a hint. The old code is kept for
reference #ifdefed out.
2006-06-17 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: implement support of the
JIT_REGS_FREE_DEST flag for 3-argument instructions. Tweak reg alloc
API.
* tools/gen-rules-parser.y: adjust for reg alloc API changes. Use
'$0' pattern element to refer to destination register in 3-argument
instructions.
* jit/jit-rules-x86.ins: rewrite JIT_OP_IDIV, JIT_OP_IDIV_UN,
JIT_OP_IREM, JIT_OP_IREM_UN, JIT_OP_ADDRESS_OF_LABEL,
JIT_OP_LOAD_RELATIVE_FLOAT32, JIT_OP_LOAD_RELATIVE_FLOAT32,
JIT_OP_LOAD_RELATIVE_NFLOAT, JIT_OP_LOAD_ELEMENT_FLOAT32,
JIT_OP_LOAD_ELEMENT_FLOAT64, JIT_OP_LOAD_ELEMENT_NFLOAT rules.
2006-06-16 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.sel, jit/jit-rules-x86.ins: fix JIT_OP_IDIV and
JIT_OP_IREM rules for the divisor value of -1.
2006-06-09 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: rewrite JIT_OP_STORE_RELATIVE_BYTE,
JIT_OP_STORE_RELATIVE_SHORT, JIT_OP_STORE_RELATIVE_LONG,
JIT_OP_STORE_RELATIVE_FLOAT32, JIT_OP_STORE_RELATIVE_FLOAT64,
JIT_OP_STORE_RELATIVE_NFLOAT, JIT_OP_STORE_ELEMENT_LONG,
JIT_OP_STORE_ELEMENT_NFLOAT rules to use regular pattern
syntax instead of manual.
2006-06-03 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.ins: remove _jit_regs_free_reg() call from
JIT_OP_RETURN_FLOAT32, JIT_OP_PUSH_FLOAT32, JIT_OP_RETURN_FLOAT64,
JIT_OP_RETURN_NFLOAT, JIT_OP_PUSH_FLOAT64, and JIT_OP_PUSH_NFLOAT
rules. With new ``gen-rules'' tool it frees wrong register and
the right register is anyway freed automatically by the new
allocator.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c (_jit_regs_abort): add
function to unbind values from registers if the code generation
failed. This is required because new allocator may temporary bind
constants to registers and if neither _jit_regs_commit() nor
_jit_regs_abort() is called the constant value will be left in
inconsistent state. The problem shows up when the end of a cache
block has been reached and the compilation is restarted with a new
block.
* jit/jit-reg-alloc.c (_jit_regs_begin, _jit_regs_end): add
convenience functions.
* tools/gen-rules-parser.y (gensel_output_clauses): make generated
code more readable by using _jit_regs_begin() and _jit_regs_end()
where appropriate.
* jit/jit-reg-alloc.c: allow to load the second part of a register
pair to a global register. This is because x86 long arithmetics
use 4 registers at once: EAX:EDX and ECX:EBX. At the same time
EBX is the global register candidate. If the instruction clobbers
the global register, the new allocator automatically pushes it on
the stack before and pops after the instruction.
* jit/jit-function.c (compile_block): modify trace messages.
2006-05-28 Klaus Treichel <ktreichel@web.de>
* jit/jit-insn.c: Add a code_label in initialize_setjmp_block just
before the end_label that is moved with the block to the start of
the function as jump target to the code. Otherwise other blocks
moved to the start after this block will never be executed.
2006-05-27 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (free_value, save_value): the value that has
a global register and is also associated with a local register
needs to be unbound from the local one.
* jit/jit-reg-alloc.c (compute_spill_cost): assume that the spill
cost for clean values is not zero. This keeps them in registers
as long as there are free registers and thus reduces the number of
loads.
2006-05-25 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (use_cheapest_register): fix cost calculation
again for 'spill_before' rules. The last patch did not work for
values stored in global registers. Now both global and non-global
values should be copied to EAX.
2006-05-25 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (use_cheapest_register): fix cost calculation
that sometimes caused overlooking free registers. This was a serious
problem as there are some 'spill_before' rules that assume that the
allocator will always choose EAX as the first free register.
2006-05-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h: add _JIT_REGS_FREE_DEST flag to be used in
cases when the destination register is independent of any input
register.
* tools/gen-rules-parser.y: allow specification of independent
destination register with '=reg' pattern syntax. (But the allocator
does not yet handle this.)
2006-05-20 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-rules-x86.c (_jit_gen_exch_top): fix computation of stack
register index.
* jit/jit-reg-alloc.c (_jit_regs_assign): micro optimization by
changing nesting order of for and if statements.
2006-05-19 Aleksey Demakov <ademakov@gmail.com>
* jit-reg-alloc.h, jit/jit-reg-alloc.c: determine if input values
need to be saved and evicted from registers to stack frame at the
_jit_regs_assign() time. Uniformly save input values that need to
in _jit_regs_gen(), do not save them in _jit_regs_commit(). This
simplifies handling of stack registers. Remove initial_stack_top,
exchanges, num_exchages fields from the _jit_regs_t struct. Add
save and kill bit fields to the _jit_regdesc_t struct. Refactor
and clean up code.
2006-05-10 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (use_cheapest_register): check if the other
part of a register pair clobbers global registers.
* jit/jit-reg-alloc.c (exch_stack_top): run value exchange loop
for all values in both registers.
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: delete on_stack field
from the _jit_regdesc_t struct.
* jit/jit-reg-alloc.c (_jit_regs_gen): handle instructions that have
both stack and flat registers.
* jit/jit-reg-alloc.c (spill_value): spilling an input value remember
if we do register exchanges for other values.
* jit/jit-reg-alloc.c: set touched registers more accurately.
2006-05-08 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.c (commit_input_value, commit_output_value):
fix extra spills introduced at 2006-05-05.
* jit/jit-rules-x86.c (_jit_gen_spill_top): add missing
jit_cache_end_output().
2006-05-05 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h, jit/jit-reg-alloc.c: fix spilling and many
problems with stack registers.
2006-05-04 Radek Polak <psonek2@seznam.cz>
* jit/jit-dump.c (dump_object_code): Now can dump to any stream
libjit/ChangeLog view on Meta::CPAN
calls was being pushed onto the stack twice.
2004-09-05 Norbert Bollow <nb@SoftwareEconomics.biz>
* samples/hellovm.c: add a sample program that demonstrates a
simple VM based on libjit (committed by Rhys).
2004-08-30 Rhys Weatherley <rweather@southern-storm.com.au>
* jit-rules-x86.sel: fix x86 code generation for floating-point
return instructions.
2004-08-16 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-cpuid-x86.c (cpuid_query): use %ebx in a way that doesn't
confuse PIC mode in some versions of gcc (bug #10022).
2004-08-13 Rhys Weatherley <rweather@southern-storm.com.au>
* include/jit/jit-insn.h, include/jit/jit-opcode.h,
include/jit/jit-plus.h, jit/jit-insn.c, jit/jit-internal.h,
jit/jit-interp.h, jit/jit-opcode.c, jit/jit-rules-interp.c,
jitplus/jit-plus-function.cpp: re-implement the "push_return_area_ptr"
patch so as to avoid wasting stack space in functions with more
than one native function call.
2004-08-12 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-rules-interp.c: account for the extra value that is
added to the stack by the "push_return_area_ptr" instruction.
2004-08-08 Rhys Weatherley <rweather@southern-storm.com.au>
* configure.in, NEWS: update version for the "0.0.4" release.
* configure.in: updating working version to "0.0.5".
2004-08-05 Rhys Weatherley <rweather@southern-storm.com.au>
* doc/Makefile.am, doc/README, doc/libjit.texi,
jit/jit-dump.c, jit/jit-insn.c: documentation updates.
* dpas/Makefile.am, tools/Makefile.am: support for parallel builds.
2004-08-04 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-opcode.c: fix the operand types for "call_vtable_ptr".
2004-06-25 Rhys Weatherley <rweather@southern-storm.com.au>
* tools/gen-apply.c: fix a crash in gen-apply under x86-64.
* jit/jit-apply-func.h, jit/jit-apply-x86-64.h, tools/gen-apply.c:
write an x86-64 assembly version of "__builtin_apply", because
the version inside gcc has an unusable register ordering.
2004-06-24 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-reg-alloc.c, jit/jit-rules-arm.h, jit/jit-rules-interp.c,
jit/jit-rules-interp.h, jit/jit-rules-x86.h, jit/jit-rules.h:
use separate JIT_REG_xxx flags for float32, float64, and nfloat
because some platforms need to put these values in different
types of registers (e.g. x86-64).
2004-06-22 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-insn.c: properly set the "may_throw" flag for opcodes
that throw exceptions and which are also supported by the back end.
2004-06-21 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-rules-x86.c, jit/jit-rules-x86.sel: move the code
for loading/storing small structures into a central location.
2004-06-18 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-dump.c, jit/jit-reg-alloc.c, jit/jit-rules-arm.c,
jit/jit-rules-arm.h, jit/jit-rules-x86.c, jit/jit-rules-x86.h,
jit/jit-rules-x86.sel, jit/jit-rules.c, jit/jit-rules.h,
tests/param.pas: rewrite the x86 and ARM parameter handling
routines to centralise the code and fix several bugs; add new
tests for fastcall and stdcall conventions.
2004-06-17 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-reg-alloc.c (_jit_regs_set_outgoing): pass 64-bit "fastcall"
parameters in ECX:EDX, not in ECX:EBX.
* tools/gen-apply.c: allow floating-point values to be passed
in "fastcall" registers.
2004-06-16 Rhys Weatherley <rweather@southern-storm.com.au>
* tools/gen-sel-parser.y: add a missing semi-colon.
2004-06-14 Rhys Weatherley <rweather@southern-storm.com.au>
* dpas/dpas-internal.h, dpas/dpas-parser.y, dpas/dpas-scanner.l,
jit/jit-rules-x86.c, jit/jit-rules-x86.sel, tests/Makefile.am,
tests/param.pas, tools/gen-apply.c: add some test cases for
parameter passing; fix fastcall/stdcall conventions for x86.
* jit/jit-rules-arm.h, jit/jit-rules-arm.sel, jit/jit-rules-x86.h,
jit/jit-rules-x86.sel, tools/gen-sel-parser.y: enable register
allocation for 64-bit values under x86 and ARM; expand some
64-bit opcodes in the instruction selectors.
2004-06-12 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-insn.c, jit/jit-rules-x86.c, jit/jit-rules-x86.sel:
implement or stub missing x86 instruction selection rules.
* include/jit/jit-insn.h, include/jit/jit-opcode.h,
include/jit/jit-plus.h, jit/jit-function.c, jit/jit-insn.c,
jit/jit-interp.c, jit/jit-opcode.c, jit/jit-rules-interp.c,
jitplus/jit-plus-function.cpp: add the "outgoing_frame_posn"
instruction, to support tail calls.
2004-06-11 Rhys Weatherley <rweather@southern-storm.com.au>
* doc/libjit.texi, jit/jit-insn.c, jit/jit-internal.h,
jit/jit-reg-alloc.c, jit/jit-rules-arm.c, jit/jit-rules-arm.sel,
jit/jit-rules-interp.c, jit/jit-rules-x86.c, jit/jit-rules-x86.sel,
jit/jit-rules.h, jit/jit-value.c, tutorial/Makefile.am,
tutorial/t2.c, tutorial/t5.c: implement tail calls from a
function to itself.
libjit/ChangeLog view on Meta::CPAN
include/jit/jit-meta.h, include/jit/jit-type.h, include/jit/jit-util.h,
jit/jit-type.c, jit/jit-value.c: add more instances of JIT_NOTHROW
to the headers; add some special meta tags for types.
* include/jit/jit-type.h, jit/jit-type.c: tag the system-dependent
types so that they can be distinguished from the fixed-sized types
when it is necessary to do so.
* jit/Makefile.am, jit/jit-mangle.c: add the beginnings of a C++
name mangler, to help with extracting C++ symbols from dynamic
shared libraries.
* doc/Makefile.am, doc/libjit.texi, doc/mangling_rules.txt,
include/jit/jit-type.h, include/jit/jit-util.h, jit/jit-mangle.c,
jit/jit-type.c: continue the implementation of the C++ name
mangling routines.
2004-05-01 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-apply-x86.c, jit/jit-rules-x86.c, tools/gen-apply.c:
fix function prolog and epilog handling for structure returns
under x86/cdecl.
* configure.in: set the initial working version to 0.0.1.
* jit/jit-rules-x86.c: implement x86 code generation for some of
the basic operators.
* include/jit/jit-insn.h, include/jit/jit-opcode.h,
include/jit/jit-plus.h, jit/jit-insn.c, jit/jit-interp.cpp,
jit/jit-opcode.c, jit/jit-reg-alloc.c, jit/jit-reg-alloc.h,
jit/jit-rules-interp.c, jitplus/jit-plus-function.cpp:
add array access instructions.
* tools/gen-apply.c: clean up the builder/parser macros and
detect padding of the floating-point registers.
2004-04-30 Rhys Weatherley <rweather@southern-storm.com.au>
* include/jit/jit-function.h, include/jit/jit-insn.h,
include/jit/jit-opcode.h, include/jit/jit-plus.h, jit/jit-except.cpp,
jit/jit-function.c, jit/jit-insn.c, jit/jit-internal.h,
jit/jit-interp.cpp, jit/jit-interp.h, jit/jit-opcode.c,
jit/jit-rules-arm.c, jit/jit-rules-interp.c, jit/jit-rules-x86.c,
jit/jit-rules.h, jitplus/jit-plus-function.cpp: put some
infrastructure in place to support "try"-related instructions.
* dpas/dpas-parser.y, dpas/dpas-scope.h, dpas/dpas-semantics.h:
introduce effective address based l-values into dpas.
2004-04-27 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-dump.c, jit/jit-reg-alloc.c: fix a register stack bug
in "_jit_regs_set_value"; add some more debug code.
* include/jit/jit-opcode.h, jit/jit-insn.c, jit/jit-internal.h,
jit/jit-interp.cpp, jit/jit-opcode.c: wrap function calls
with code to set up and remove exception frame information.
* jit/jit-function.c, jit/jit-insn.c, jit/jit-internal.h:
intuit "nothrow" and "noreturn" flags for compiled functions.
* include/jit/jit-insn.h, include/jit/jit-plus.h, jit/jit-insn.c,
jitplus/jit-plus-function.cpp: add "jit_insn_throw",
"jit_insn_rethrow", and "jit_insn_get_call_stack" to assist
with throwing exceptions.
* include/jit/jit-insn.h, jit/jit-block.c, jit/jit-insn.c,
jit/jit-internal.h: add some instructions for managing "try" blocks.
* include/jit/jit-opcode.h, jit/jit-block.c, jit/jit-insn.c,
jit/jit-internal.h, jit/jit-opcode.c: more work on "try" blocks.
2004-04-26 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-reg-alloc.c, jit/jit-reg-alloc.h: add functions to
assist with register allocation on stack-based architectures.
* jit/jit-rules-interp.c: implement "_jit_gen_load_value" for
the interpreter backend.
* jit/jit-interp.cpp, jit/jit-interp.h: fix some opcode names that
should be prefixed with "JIT_OP".
* jit/jit-function.c, jit/jit-internal.h, jit/jit-reg-alloc.c,
jit/jit-reg-alloc.h, jit/jit-rules-arm.c, jit/jit-rules-interp.c,
jit/jit-rules-interp.h, jit/jit-rules-x86.c, jit/jit-rules.h:
interpreter back end code generation for binary, unary, and
branch opcodes.
* doc/libjit.texi, jit/jit-rules-interp.c: fix the Texinfo section
markers in the "Porting" chapter.
* jit/jit-rules-interp.c: code generation for interpreter return's.
* include/jit/jit-except.h, include/jit/jit-function.h,
include/jit/jit-plus.h, jit/jit-except.cpp, jit/jit-function.c,
jit/jit-interp.cpp, jit/jit-interp.h, jit/jit-rules-interp.c,
jitplus/jit-plus-function.cpp: implement "jit_function_apply"
and "jit_function_apply_vararg" for the interpreter back end.
* jitplus/jit-plus-function.cpp: initialization errors in
the C++ binding.
* jit/jit-function.c, jit/jit-insn.c, jit/jit-interp.cpp,
jit/jit-rules-interp.c: work on code generation for function calls.
* doc/libjit.texi, include/jit/jit-insn.h, include/jit/jit-plus.h,
jit/jit-insn.c, jitplus/jit-plus-function.cpp, tutorial/t2.c:
add a "flags" parmeter to "jit_insn_call" and friends, so that
"nothrow", "noreturn", and "tail" options can be supplied.
* jit/jit-dump.c, jit/jit-interp.cpp, jit/jit-interp.h,
jit/jit-opcode.c, jit/jit-rules-interp.c: dump the translated
native code from "jit_dump_function" are compilation.
* jit/jit-interp.cpp, jit/jit-rules-interp.c: argument variable
offsets should in item units, not byte units.
* jit/jit-insn.c, jit/jit-reg-alloc.c, jit/jit-reg-alloc.h,
jit/jit-rules-interp.c: improve register allocation in stacks.
2004-04-25 Rhys Weatherley <rweather@southern-storm.com.au>
* jit/jit-apply-func.h, jit/jit-apply-x86.c, jit/jit-apply-x86.h,
jit/jit-cache.c: use CPU-specifc padding for aligning code
areas with NOP's, for greater runtime efficiency.
* include/jit/jit-elf.h, jit/Makefile.am, jit/jit-elf-write.c:
add the skeleton of the ELF writing routines.
* jit/jit-interp.cpp: modify VM_BR_TARGET so that it is PIC-friendly.
2004-04-24 Rhys Weatherley <rweather@southern-storm.com.au>
* */*: Initial public release. Most of the skeleton code is in place.
( run in 0.510 second using v1.01-cache-2.11-cpan-796a6f069b2 )