]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/log
francis/libjit.git
21 years agoTest case for the long-form backward branch bug.
Rhys Weatherley [Wed, 13 Oct 2004 00:03:25 +0000 (00:03 +0000)]
Test case for the long-form backward branch bug.

21 years agooutput_branch: correct the offset when outputting a long-form backward branch.
Rhys Weatherley [Tue, 12 Oct 2004 01:19:24 +0000 (01:19 +0000)]
output_branch: correct the offset when outputting a long-form backward branch.

21 years agoRedesign the debugger API so that it contains functions
Rhys Weatherley [Wed, 6 Oct 2004 05:43:15 +0000 (05:43 +0000)]
Redesign the debugger API so that it contains functions
like "add breakpoint", "run", "step", etc that more closely resemble
what a front end debugger will want to have, shifting the
implementation burden off the front end.

21 years agoUse a common helper function for performing debug hook tests on
Rhys Weatherley [Mon, 4 Oct 2004 04:22:23 +0000 (04:22 +0000)]
Use a common helper function for performing debug hook tests on
native platforms, to avoid the need to implement breakpoint testing
individually in every native back end.

21 years agoClean up the breakpoint API and implement debug hooks for the interpreter.
Rhys Weatherley [Mon, 4 Oct 2004 02:26:41 +0000 (02:26 +0000)]
Clean up the breakpoint API and implement debug hooks for the interpreter.

21 years agoAdd instructions and function API's for supporting debug line
Rhys Weatherley [Mon, 4 Oct 2004 00:51:45 +0000 (00:51 +0000)]
Add instructions and function API's for supporting debug line
numbers and breakpoints.

21 years agoPointer-relative loads and stores for structures in the x86 back end.
Rhys Weatherley [Fri, 10 Sep 2004 03:01:24 +0000 (03:01 +0000)]
Pointer-relative loads and stores for structures in the x86 back end.

21 years agoAdd some support for structure copying to the x86 back end.
Rhys Weatherley [Thu, 9 Sep 2004 03:07:11 +0000 (03:07 +0000)]
Add some support for structure copying to the x86 back end.

21 years agoThe pointer value for indirect and vtable calls was being pushed onto the stack twice.
Rhys Weatherley [Mon, 6 Sep 2004 07:29:20 +0000 (07:29 +0000)]
The pointer value for indirect and vtable calls was being pushed onto the stack twice.

21 years agoAdd a sample program that demonstrates a simple VM based
Rhys Weatherley [Sun, 5 Sep 2004 09:50:57 +0000 (09:50 +0000)]
Add a sample program that demonstrates a simple VM based
on libjit (committed by Rhys).

21 years agoFix x86 code generation for floating-point return instructions.
Rhys Weatherley [Mon, 30 Aug 2004 02:01:22 +0000 (02:01 +0000)]
Fix x86 code generation for floating-point return instructions.

21 years agocpuid_query: use %ebx in a way that doesn't confuse PIC mode in some
Rhys Weatherley [Mon, 16 Aug 2004 06:45:03 +0000 (06:45 +0000)]
cpuid_query: use %ebx in a way that doesn't confuse PIC mode in some
versions of gcc (bug #10022).

21 years agoRe-implement the "push_return_area_ptr" patch so as to avoid wasting
Rhys Weatherley [Fri, 13 Aug 2004 04:06:33 +0000 (04:06 +0000)]
Re-implement the "push_return_area_ptr" patch so as to avoid wasting
stack space in functions with more than one native function call.

21 years agoAccount for the extra value that is added to the stack by the
Rhys Weatherley [Thu, 12 Aug 2004 00:53:50 +0000 (00:53 +0000)]
Account for the extra value that is added to the stack by the
"push_return_area_ptr" instruction.

21 years agoMinor fix to previous checkin.
Rhys Weatherley [Sun, 8 Aug 2004 01:29:57 +0000 (01:29 +0000)]
Minor fix to previous checkin.

21 years agoUpdating working version to "0.0.3".
Rhys Weatherley [Sun, 8 Aug 2004 01:14:18 +0000 (01:14 +0000)]
Updating working version to "0.0.3".

21 years agoUpdate version for the "0.0.4" release. r.0.0.4
Rhys Weatherley [Sun, 8 Aug 2004 01:11:36 +0000 (01:11 +0000)]
Update version for the "0.0.4" release.

21 years agoSupport for parallel builds.
Rhys Weatherley [Thu, 5 Aug 2004 00:11:27 +0000 (00:11 +0000)]
Support for parallel builds.

21 years agoDocumentation updates.
Rhys Weatherley [Thu, 5 Aug 2004 00:07:25 +0000 (00:07 +0000)]
Documentation updates.

21 years agoFix the operand types for "call_vtable_ptr".
Rhys Weatherley [Wed, 4 Aug 2004 06:59:22 +0000 (06:59 +0000)]
Fix the operand types for "call_vtable_ptr".

21 years agoWrite an x86-64 assembly version of "__builtin_apply", because
Rhys Weatherley [Fri, 25 Jun 2004 06:24:40 +0000 (06:24 +0000)]
Write an x86-64 assembly version of "__builtin_apply", because
the version inside gcc has an unusable register ordering.

21 years agoFix a crash in gen-apply under x86-64.
Rhys Weatherley [Fri, 25 Jun 2004 00:17:59 +0000 (00:17 +0000)]
Fix a crash in gen-apply under x86-64.

21 years agoUse separate JIT_REG_xxx flags for float32, float64, and nfloat
Rhys Weatherley [Thu, 24 Jun 2004 04:11:46 +0000 (04:11 +0000)]
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).

21 years agoProperly set the "may_throw" flag for opcodes that throw exceptions and
Rhys Weatherley [Mon, 21 Jun 2004 21:59:47 +0000 (21:59 +0000)]
Properly set the "may_throw" flag for opcodes that throw exceptions and
which are also supported by the back end.

21 years agoMove the code for loading/storing small structures into a central location.
Rhys Weatherley [Mon, 21 Jun 2004 02:09:44 +0000 (02:09 +0000)]
Move the code for loading/storing small structures into a central location.

21 years agoRewrite the x86 and ARM parameter handling routines to centralise the
Rhys Weatherley [Fri, 18 Jun 2004 06:51:33 +0000 (06:51 +0000)]
Rewrite the x86 and ARM parameter handling routines to centralise the
code and fix several bugs; add new tests for fastcall and stdcall conventions.

21 years agoAllow floating-point values to be passed in "fastcall" registers.
Rhys Weatherley [Thu, 17 Jun 2004 00:38:33 +0000 (00:38 +0000)]
Allow floating-point values to be passed in "fastcall" registers.

21 years ago_jit_regs_set_outgoing: pass 64-bit "fastcall" parameters in ECX:EDX,
Rhys Weatherley [Thu, 17 Jun 2004 00:31:03 +0000 (00:31 +0000)]
_jit_regs_set_outgoing: pass 64-bit "fastcall" parameters in ECX:EDX,
not in ECX:EBX.

21 years agoAdd a missing semi-colon.
Rhys Weatherley [Wed, 16 Jun 2004 09:02:08 +0000 (09:02 +0000)]
Add a missing semi-colon.

21 years agoEnable register allocation for 64-bit values under x86 and ARM; expand some
Rhys Weatherley [Mon, 14 Jun 2004 07:14:28 +0000 (07:14 +0000)]
Enable register allocation for 64-bit values under x86 and ARM; expand some
64-bit opcodes in the instruction selectors.

21 years agoAdd some test cases for parameter passing; fix fastcall/stdcall
Rhys Weatherley [Mon, 14 Jun 2004 04:57:02 +0000 (04:57 +0000)]
Add some test cases for parameter passing; fix fastcall/stdcall
conventions for x86.

21 years agoAdd the "outgoing_frame_posn" instruction, to support tail calls.
Rhys Weatherley [Sun, 13 Jun 2004 01:48:58 +0000 (01:48 +0000)]
Add the "outgoing_frame_posn" instruction, to support tail calls.

21 years agoImplement or stub missing x86 instruction selection rules.
Rhys Weatherley [Sat, 12 Jun 2004 00:54:22 +0000 (00:54 +0000)]
Implement or stub missing x86 instruction selection rules.

21 years agoOptimize the x86 function epilog when we are certain that the
Rhys Weatherley [Fri, 11 Jun 2004 03:48:00 +0000 (03:48 +0000)]
Optimize the x86 function epilog when we are certain that the
stack height doesn't change between entry and exit (i.e. the
function is a leaf and there are no alloca's).

21 years agoImplement global register allocation for parameters in stack slots.
Rhys Weatherley [Fri, 11 Jun 2004 02:01:18 +0000 (02:01 +0000)]
Implement global register allocation for parameters in stack slots.

21 years agoImplement tail calls from a function to itself.
Rhys Weatherley [Fri, 11 Jun 2004 01:39:00 +0000 (01:39 +0000)]
Implement tail calls from a function to itself.

21 years ago_jit_regs_load_value: avoid unnecessary spills if a temporary value
Rhys Weatherley [Thu, 10 Jun 2004 05:20:05 +0000 (05:20 +0000)]
_jit_regs_load_value: avoid unnecessary spills if a temporary value
won't be used again in the current block.

21 years agoDon't over-allocate x86 stack frames if EBX, ESI, and EDI don't need to
Rhys Weatherley [Thu, 10 Jun 2004 03:06:07 +0000 (03:06 +0000)]
Don't over-allocate x86 stack frames if EBX, ESI, and EDI don't need to
be saved; don't perform global register allocation on stacked parameters
because it confuses the register spill logic.

21 years agoAdd support for outgoing parameter areas, which should reduce
Rhys Weatherley [Thu, 10 Jun 2004 02:05:56 +0000 (02:05 +0000)]
Add support for outgoing parameter areas, which should reduce
the overhead of function calls that involve stacked arguments
on non-x86 platforms; use parameter areas in the ARM back end.

21 years agoDump the hex address of external functions, to aid with debugging
Rhys Weatherley [Thu, 10 Jun 2004 00:38:35 +0000 (00:38 +0000)]
Dump the hex address of external functions, to aid with debugging
native disassembly dumps.

21 years agoFlush the constant pool after unconditional branches, to try to
Rhys Weatherley [Thu, 10 Jun 2004 00:07:36 +0000 (00:07 +0000)]
Flush the constant pool after unconditional branches, to try to
minimize the probability that the pool will be flushed in the
middle of a loop body.

21 years agoRedesign the ARM code generation macros so that they have stronger
Rhys Weatherley [Wed, 9 Jun 2004 23:40:34 +0000 (23:40 +0000)]
Redesign the ARM code generation macros so that they have stronger
protection against buffer overruns.

21 years ago_jit_gen_load_value: use ARM register pairs properly for "long"
Rhys Weatherley [Wed, 9 Jun 2004 07:39:37 +0000 (07:39 +0000)]
_jit_gen_load_value: use ARM register pairs properly for "long"
and "float64" values.

21 years agoOptimize the use of rotated immediate values.
Rhys Weatherley [Wed, 9 Jun 2004 07:12:10 +0000 (07:12 +0000)]
Optimize the use of rotated immediate values.

21 years ago_arm_alu_reg_imm: forgot to update the instruction pointer when
Rhys Weatherley [Wed, 9 Jun 2004 06:49:13 +0000 (06:49 +0000)]
_arm_alu_reg_imm: forgot to update the instruction pointer when
loading the immediate value.

21 years agoFix some bugs in the encoding of floating-point load and store instructions.
Rhys Weatherley [Wed, 9 Jun 2004 02:22:47 +0000 (02:22 +0000)]
Fix some bugs in the encoding of floating-point load and store instructions.

21 years agoflush_constants: update the instruction location after flushing the
Rhys Weatherley [Wed, 9 Jun 2004 01:16:02 +0000 (01:16 +0000)]
flush_constants: update the instruction location after flushing the
constant table.

21 years agoImplement a constant pool for ARM, which gets complicated constants out
Rhys Weatherley [Tue, 8 Jun 2004 10:43:14 +0000 (10:43 +0000)]
Implement a constant pool for ARM, which gets complicated constants out
of the main stream of execution.

21 years agoARM parameters cannot be split between registers and the stack.
Rhys Weatherley [Tue, 8 Jun 2004 07:14:25 +0000 (07:14 +0000)]
ARM parameters cannot be split between registers and the stack.

21 years agoMinor register assignment bugs.
Rhys Weatherley [Tue, 8 Jun 2004 06:40:53 +0000 (06:40 +0000)]
Minor register assignment bugs.

21 years ago_jit_gen_spill_reg: spill properly to global registers for ARM.
Rhys Weatherley [Tue, 8 Jun 2004 06:16:12 +0000 (06:16 +0000)]
_jit_gen_spill_reg: spill properly to global registers for ARM.

21 years ago_jit_gen_spill_reg: spill properly to global registers for ARM.
Rhys Weatherley [Tue, 8 Jun 2004 05:53:41 +0000 (05:53 +0000)]
_jit_gen_spill_reg: spill properly to global registers for ARM.

21 years agoIntroduce conditional rules into "gen-sel" so that we can disable
Rhys Weatherley [Tue, 8 Jun 2004 05:33:37 +0000 (05:33 +0000)]
Introduce conditional rules into "gen-sel" so that we can disable
certain rules on ARM platforms that lack floating-point support.

21 years agoarm_call: use a more efficient form of call for offsets beyond the
Rhys Weatherley [Tue, 8 Jun 2004 03:27:50 +0000 (03:27 +0000)]
arm_call: use a more efficient form of call for offsets beyond the
simple target range.

21 years ago_jit_regs_set_outgoing: implement missing function.
Rhys Weatherley [Tue, 8 Jun 2004 03:17:14 +0000 (03:17 +0000)]
_jit_regs_set_outgoing: implement missing function.

21 years agoMore x86 instruction selection rules.
Rhys Weatherley [Tue, 8 Jun 2004 02:30:55 +0000 (02:30 +0000)]
More x86 instruction selection rules.

21 years agoRemove obsolete opcodes which violate "_jit_load_opcode"'s rules.
Rhys Weatherley [Tue, 8 Jun 2004 00:46:54 +0000 (00:46 +0000)]
Remove obsolete opcodes which violate "_jit_load_opcode"'s rules.

21 years agoAdd an API for querying the x86 "cpuid" information.
Rhys Weatherley [Mon, 7 Jun 2004 22:53:50 +0000 (22:53 +0000)]
Add an API for querying the x86 "cpuid" information.

21 years agoFix ROUND_END_PTR so that it adds the size after casting to jit_nuint.
Rhys Weatherley [Mon, 7 Jun 2004 22:07:11 +0000 (22:07 +0000)]
Fix ROUND_END_PTR so that it adds the size after casting to jit_nuint.

21 years ago(jit_flush_exec): warning fix for ia64.
Rhys Weatherley [Mon, 7 Jun 2004 10:00:49 +0000 (10:00 +0000)]
(jit_flush_exec): warning fix for ia64.

21 years agoGen-apply fix for ia64.
Rhys Weatherley [Mon, 7 Jun 2004 09:54:27 +0000 (09:54 +0000)]
Gen-apply fix for ia64.

21 years agoBypass the auto-detection logic in gen-apply under MacOSX because
Rhys Weatherley [Mon, 7 Jun 2004 07:15:30 +0000 (07:15 +0000)]
Bypass the auto-detection logic in gen-apply under MacOSX because
it doesn't work with Apple's version of gcc.

21 years agoAdd "_setjmp" to the list of names to try to work around the
Rhys Weatherley [Mon, 7 Jun 2004 04:36:31 +0000 (04:36 +0000)]
Add "_setjmp" to the list of names to try to work around the
"setjmp" macro (needed for Win32).

21 years agoFix misnaming of jit_type_get_abi, jit_abi_stdcall, and jit_abi_fastcall.
Rhys Weatherley [Mon, 7 Jun 2004 04:25:46 +0000 (04:25 +0000)]
Fix misnaming of jit_type_get_abi, jit_abi_stdcall, and jit_abi_fastcall.

21 years agoExpand floating-point instructions for ARM.
Rhys Weatherley [Mon, 7 Jun 2004 04:21:25 +0000 (04:21 +0000)]
Expand floating-point instructions for ARM.

21 years agoAdd floating-point instruction macros.
Rhys Weatherley [Mon, 7 Jun 2004 03:18:34 +0000 (03:18 +0000)]
Add floating-point instruction macros.

21 years agoUse "sigsetjmp" instead of "setjmp", because "setjmp" may
Rhys Weatherley [Mon, 7 Jun 2004 01:01:33 +0000 (01:01 +0000)]
Use "sigsetjmp" instead of "setjmp", because "setjmp" may
be a macro on some systems.

21 years agoFix a warning.
Rhys Weatherley [Mon, 7 Jun 2004 00:35:58 +0000 (00:35 +0000)]
Fix a warning.

21 years agoWork around a SIGFPE for sqrt(-1) on Alpha; it should return NaN instead.
Rhys Weatherley [Mon, 7 Jun 2004 00:20:40 +0000 (00:20 +0000)]
Work around a SIGFPE for sqrt(-1) on Alpha; it should return NaN instead.

21 years agoAlignment problem with "push_const_float32" on 64-bit platforms.
Rhys Weatherley [Mon, 7 Jun 2004 00:06:22 +0000 (00:06 +0000)]
Alignment problem with "push_const_float32" on 64-bit platforms.

21 years agoGen-apply fixes for Alpha platforms.
Rhys Weatherley [Sun, 6 Jun 2004 23:52:14 +0000 (23:52 +0000)]
Gen-apply fixes for Alpha platforms.

21 years agojit_flush_exec: flush cache lines properly if the start is not
Rhys Weatherley [Sun, 6 Jun 2004 04:59:57 +0000 (04:59 +0000)]
jit_flush_exec: flush cache lines properly if the start is not
on a line boundary.

21 years agoAdd some more instructions to the ARM back end; split some x86
Rhys Weatherley [Sun, 6 Jun 2004 04:53:08 +0000 (04:53 +0000)]
Add some more instructions to the ARM back end; split some x86
back end code out into common code for ARM to use as well.

21 years agoRecognise "t = a op b; a = t" and turn it into "a = a op b" to make
Rhys Weatherley [Wed, 2 Jun 2004 10:18:55 +0000 (10:18 +0000)]
Recognise "t = a op b; a = t" and turn it into "a = a op b" to make
it easier for back ends to recognise special idioms such as
increments and decrements.

21 years ago_jit_regs_load_value: if a value is in a global register and it is
Rhys Weatherley [Wed, 2 Jun 2004 07:29:47 +0000 (07:29 +0000)]
_jit_regs_load_value: if a value is in a global register and it is
not going to be destroyed by an instruction, then use the global
register as the operand.

21 years agoImplement a simple global register allocation policy, based on usage counts.
Rhys Weatherley [Wed, 2 Jun 2004 07:17:23 +0000 (07:17 +0000)]
Implement a simple global register allocation policy, based on usage counts.

21 years agoEnable the x86 back end by default on platforms where it makes sense,
Rhys Weatherley [Tue, 1 Jun 2004 10:20:41 +0000 (10:20 +0000)]
Enable the x86 back end by default on platforms where it makes sense,
and add the option "--enable-interpreter" to "configure".

21 years agoMore instruction selection rules for ARM.
Rhys Weatherley [Tue, 1 Jun 2004 09:55:54 +0000 (09:55 +0000)]
More instruction selection rules for ARM.

21 years agoFix some gcc 3.x compile warnings.
Rhys Weatherley [Tue, 1 Jun 2004 06:46:37 +0000 (06:46 +0000)]
Fix some gcc 3.x compile warnings.

21 years agoThrow exceptions correctly for "check_null".
Rhys Weatherley [Mon, 31 May 2004 11:24:49 +0000 (11:24 +0000)]
Throw exceptions correctly for "check_null".

21 years agoInline and optimize divisions for x86.
Rhys Weatherley [Mon, 31 May 2004 10:50:09 +0000 (10:50 +0000)]
Inline and optimize divisions for x86.

21 years agoOptimize multiplications for x86.
Rhys Weatherley [Mon, 31 May 2004 07:25:46 +0000 (07:25 +0000)]
Optimize multiplications for x86.

21 years agoFix a cpu vs non-cpu register problem in the floating-point
Rhys Weatherley [Sun, 30 May 2004 10:14:30 +0000 (10:14 +0000)]
Fix a cpu vs non-cpu register problem in the floating-point
"push" operations for x86.

21 years agoAdd "jit_insn_defer_pop_stack" and "jit_insn_flush_defer_pop",
Rhys Weatherley [Sun, 30 May 2004 09:05:05 +0000 (09:05 +0000)]
Add "jit_insn_defer_pop_stack" and "jit_insn_flush_defer_pop",
to defer the popping of function call arguments as long as possible.

21 years agoImprove instruction selection for floating-point "push" operations.
Rhys Weatherley [Sun, 30 May 2004 05:37:05 +0000 (05:37 +0000)]
Improve instruction selection for floating-point "push" operations.

21 years agoAnother small change.
Rhys Weatherley [Sun, 30 May 2004 03:00:26 +0000 (03:00 +0000)]
Another small change.

21 years agoSmall update to LLVM URL.
Rhys Weatherley [Sun, 30 May 2004 02:58:52 +0000 (02:58 +0000)]
Small update to LLVM URL.

21 years agojit_insn_convert: use intrinsic functions for conversions when the
Rhys Weatherley [Sun, 30 May 2004 02:24:16 +0000 (02:24 +0000)]
jit_insn_convert: use intrinsic functions for conversions when the
back end doesn't support the opcode.

21 years agoClarify the text that describes LLVM, at the request of Chris Lattner,
Rhys Weatherley [Sun, 30 May 2004 01:39:19 +0000 (01:39 +0000)]
Clarify the text that describes LLVM, at the request of Chris Lattner,
LLVM's author.

21 years agoStub out JIT_OP_RETURN_REG, which doesn't need any special handling for x86.
Rhys Weatherley [Sat, 29 May 2004 10:14:11 +0000 (10:14 +0000)]
Stub out JIT_OP_RETURN_REG, which doesn't need any special handling for x86.

21 years agoContinue the x86 back end; particularly byte/short stores.
Rhys Weatherley [Sat, 29 May 2004 09:44:51 +0000 (09:44 +0000)]
Continue the x86 back end; particularly byte/short stores.

21 years agoRelative loads and stores for x86.
Rhys Weatherley [Thu, 27 May 2004 04:36:30 +0000 (04:36 +0000)]
Relative loads and stores for x86.

21 years agodpas_type_identical: treat "float64" and "nfloat" as identical on
Rhys Weatherley [Thu, 27 May 2004 01:05:30 +0000 (01:05 +0000)]
dpas_type_identical: treat "float64" and "nfloat" as identical on
platforms whose "long double" type is the same as "double".

21 years agoSplit "detect_struct_conventions" up a bit more to (hopefully) prevent
Rhys Weatherley [Thu, 27 May 2004 00:49:53 +0000 (00:49 +0000)]
Split "detect_struct_conventions" up a bit more to (hopefully) prevent
problems under MacOSX; fix a bug in the generation of
"jit_apply_builder_align_regs" that affected ARM and PPC systems.

21 years agoAdd the beginnings of the instruction selector for ARM.
Rhys Weatherley [Wed, 26 May 2004 07:21:04 +0000 (07:21 +0000)]
Add the beginnings of the instruction selector for ARM.

21 years agoMore selection cases for the x86 back end.
Rhys Weatherley [Wed, 26 May 2004 03:47:38 +0000 (03:47 +0000)]
More selection cases for the x86 back end.

21 years agoAdd "jit_block_current_is_dead" to simplify testing if the last block
Rhys Weatherley [Wed, 26 May 2004 01:19:38 +0000 (01:19 +0000)]
Add "jit_block_current_is_dead" to simplify testing if the last block
is reachable or not, taking empty trailing blocks into account.

21 years agoAdd "jit_insn_new_block" to simplify creating a new block that
Rhys Weatherley [Wed, 26 May 2004 01:05:03 +0000 (01:05 +0000)]
Add "jit_insn_new_block" to simplify creating a new block that
doesn't have an explicit label.

21 years agoMore bug fixes for the x86 back end.
Rhys Weatherley [Wed, 26 May 2004 00:31:51 +0000 (00:31 +0000)]
More bug fixes for the x86 back end.

21 years agoFix some compile issues in the x86 native back end.
Rhys Weatherley [Tue, 25 May 2004 23:59:22 +0000 (23:59 +0000)]
Fix some compile issues in the x86 native back end.