1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-04 14:20:26 +02:00
Commit graph

419 commits

Author SHA1 Message Date
pcpa
0c6f675c8a Properly handle jit_tramp and function descriptors
* lib/jit_ia64.c, lib/jit_ppc.c: Correct handling of function
	descriptor when first prolog is a jit_tramp prolog. The
	test case was using the same jit_context_t, so was not
	triggering this condition.

	* lib/jit_ppc-cpu.c: Properly handle jump displacements that
	do not fit on 24 powerpc. This required changing from previous
	"mtlr reg, blr" to "mtctr reg, bctr" to properly handle
	the logic to "hide" function descriptors, but that would
	also be required as the proper jit_jmpr when/if implementing
	optimizations to leaf functions (was working with blr because
	it is saved/reloaded in prolog/epilog).
2014-10-24 14:31:41 -02:00
pcpa
9c5e2b511e Add label predicates
* include/lightning.h, lib/lightning.c: Add three predicates
	to query information about labels. jit_forward_p(label)
	will return non zero if the label is "forward", that is
	need a call to jit_link(label), jit_indirect_p(label)
	that returns non zero if the label was created with the
	jit_indirect() call, and jit_target_p(label) that will
	return non zero if there is at least one jump patched
	to land at that label.
2014-10-21 15:32:24 -02:00
pcpa
a43fb63055 Add the new "range" test.
* check/range.ok, check/range.tst: New test case designed
	to catch incorrect code generation, usually due to incorrect
	test of immediate size. The test checks a large amount of
	encodings in "power of two" boundaries. This test exorcises
	a significant amount of code paths that was previously not
	tested.

	* check/Makefile.am: Add range test to make check target.

	* lib/jit_aarch64-cpu.c: Correct wrong address calculation
	for stxi_c, stxi_s, stxi_i and stxi_l when the offset is
	too large.

        * lib/jit_mips-fpu.c: Correct wrong size test to check if
	an immediate can be encoded in a float or double store.

	* lib/jit_s390x-cpu.c: Correct inverted encoding to stxi_s
	when the offset cannot be encoded, and fallbacks to an
	alternate encoding in 2 instructions.
2014-10-18 15:12:07 -03:00
pcpa
960280decd Implement the jit_rsb* interface.
* check/alu_rsb.ok, check/alu_rsb.tst: New files implementing
	tests for jit_rsb*.

	* check/Makefile.am, check/lightning.c, include/lightning.h,
	lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c, lib/jit_aarch64-sz.c,
	lib/jit_aarch64.c, lib/jit_alpha-cpu.c, lib/jit_alpha-fpu.c,
	lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_arm-cpu.c,
	lib/jit_arm-swf.c, lib/jit_arm-sz.c, lib/jit_arm-vfp.c,
	lib/jit_arm.c, lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c,
	lib/jit_hppa-sz.c, lib/jit_hppa.c, lib/jit_ia64-cpu.c,
	lib/jit_ia64-fpu.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
	lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips-sz.c,
	lib/jit_mips.c, lib/jit_names.c, lib/jit_ppc-cpu.c,
	lib/jit_ppc-fpu.c, lib/jit_ppc-sz.c, lib/jit_ppc.c,
	lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_s390x-sz.c,
	lib/jit_s390x.c, lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c,
	lib/jit_sparc-sz.c, lib/jit_sparc.c, lib/jit_x86-cpu.c,
	lib/jit_x86-sse.c, lib/jit_x86-sz.c, lib/jit_x86-x87.c,
	lib/jit_x86.c, lib/lightning.c: Implement jit_rsb*. This
	was a missing lightning 1.x interface, that on most
	backends is synthesized, but on a few backends (hppa and ia64),
	it can generate better code as on those there is, or the
	only instruction with an immediate is in "rsb" format
	(left operand).
2014-10-18 11:31:18 -03:00
pcpa
624cf33d08 Add string representation of IR codes to -sz.c files
* lib/jit_names.c: New file with single definition of string
	representation of lightning IR codes.

	* size.c: Modified to append the code name in a C comment
	after the maximum instruction size.

	* lib/jit_print.c: Minor change to not duplicate jit_names.c
	contents.

	* lib/jit_aarch64-sz.c, lib/jit_alpha-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_sparc-sz.c,
	lib/jit_x86-sz.c: Rewritten to add string representation of
	IR codes in a C comment.
2014-10-17 13:48:56 -03:00
pcpa
5c0c5bde6d Add back files missed when reapplying patches 2014-10-15 13:09:14 -03:00
pcpa
afae5407f6 Implement the jit_align interface
* lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c,
	lib/jit_hppa-cpu.c, lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c,
	lib/jit_sparc-cpu.c: Implement or correct the internal
	nop(count) call that receives an argument that tells the
	modulo bytes to align the code for the next instruction.

	* include/lightning.h, lib/lightning.c, lib/jit_aarch64.c,
	lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c,
	lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
	lib/jit_x86.c: Implement the new jit_align() call that receive
	an argument, that tells the modulo, in bytes, to align the
	next instruction. In most backends the only value that makes
	a difference is a value that matches sizeof(void*), as all
	other values usually are already automatically aligned in
	labels, but not guaranteed to be aligned at word size bytes.

	* check/align.ok, check/align.tst: New files, implementing
	a simple test for the new jit_align() interface.

	* check/Makefile.am, check/lightning.c, lib/jit_aarch64-sz.c,
	lib/jit_alpha-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_print.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c,
	lib/jit_x86-sz.c: Update for the new jit_code_align code and
	the jit_align() interface.
2014-10-14 17:05:25 -03:00
pcpa
dbb1bb2409 Use jit_code_last_code as symbolic name of last enum
* include/lightning.h, lib/jit_size.c, size.c: Use a
	symbolic value for the last IR code.
2014-10-14 17:05:02 -03:00
pcpa
839341a498 Implement jit_frame and jit_tramp interfaces
* include/lightning.h, include/lightning/jit_private.h,
	lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c,
	lib/jit_hppa-cpu.c, lib/jit_ia64-cpu.c, lib/jit_mips-cpu.c,
	lib/jit_ppc-cpu.c, lib/jit_s390x-cpu.c, lib/jit_sparc-cpu.c,
	lib/jit_x86-cpu.c, lib/lightning.c: Implement the new
	jit_frame and jit_tramp interfaces, that allow writing
	trampoline like calls, where a single dispatcher jit buffer
	is written, and later other jit buffers are created, with
	the same stack frame layout as the dispatcher. This is the
	logic that GNU Smalltalk used in lightning 1.x, and is required
	to make a sane port for lighting 2.x.

	* jit_ia64-cpu.c: Implement support for jit_frame and jit_tramp,
	and also correct wrong encoding for B4 instructions, that
	implement jmpr, as well as correct reverse logic in _jmpr,
	that was moving the branch register to the jump register,
	and not vice-versa.
	Also, if a stack frame is to be assumed, always assume it may
	call a function with up to 8 arguments, regardless of the
	hint frame argument.

	* lib/jit_arm.c: Add a new must_align_p() interface to ensure
	function prologs are always aligned. This condition was
	previously always true, somewhat by accident, but with
	jit_tramp it is not guaranteed.

	* jit_ia64-cpu.c: lib/jit_ppc.c: Add minor special handling
	required to implement jit_tramp, where a function descriptor
	should not be added before a prolog, as jit_tramp means omit
	prolog.

	* check/lightning.c: Update test driver for the new interfaces.

	* check/Makefile.am, check/tramp.tst, check/tramp.ok: Add
	a simple test and example of the jit_frame and jit_tramp
	usage implementing a simple Fibonacci function using a
	simulation of an interpreter stack and how it would handle
	state in language specific variables.

	* doc/body.texi: Add documentation for jit_frame and
	jit_tramp.
2014-10-14 17:04:40 -03:00
pcpa
20a2f1f9c5 Allow jit_jmpi on an immediate constant address.
* lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
	lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c,
	lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
	lib/jit_x86.c, lib/lightning.c: Allow jit_jmpi on a
	target that is not a node. This may lead to hard to
	debug code generation, but is a required feature for
	certain generators, like the ones that used lightning
	1.2x. Note that previously, but not really well
	documented, it was instructed to use:
	jit_movi(rn, addr); jit_jmpr(rn);
	but now, plain:
	jit_patch_abs(jit_jmpi(), addr);
	should also work.
2014-10-14 17:04:13 -03:00
pcpa
1d75fe625a Do not fail if NULL is passed to init_jit.
This should just tell to disable the disassembler.
2014-10-14 17:03:51 -03:00
Paulo Andrade
52448473be x86: Update instruction size information for Windows x64
* lib/jit_x86-sz.c: Generate information about instruction
	lengths for more precise calculation of buffer size on
	Windows x64. This change is specially important because
	the maximum instruction length is larger than other
	systems, what could cause an out of bounds write on
	special conditions without this update.
2014-09-24 14:56:20 -03:00
Paulo Andrade
4d0e4b32a1 x86: Build and pass all tests on 32 bit cygwin
* check/lightning.c: Add workaround to conflicting global
	optind variable in cygwin binutils that have an internal
	getopt* implementation.

	* lib/jit_x86-cpu.c: Add a simple define ffsl ffs if building
	for 32 bit and there is no ffsl function.
2014-09-24 14:32:49 -03:00
Paulo Andrade
f469a5c87b x86: Build and pass all tests under cygwin64 (Windows x64)
* check/lightning.c: Add a hopefully temporary kludge to not use
	sprintf and sscanf returned by dlsym. This is required to pass
	the varargs test.

        * include/lightning/jit_private.h: Use symbolic name for first
	integer register argument, as this is different in sysv and
	win64 abi.

        * include/lightning/jit_x86.h: Add conditionals and definitions
	for Windows x64 (under __CYGWIN__ preprocessor conditional).

        * lib/jit_x86-cpu.c: Correct one instruction encoding bug, that
	was working by accident. Only use rax to rdx for some byte
	operations to work on compatibility mode (that is, to generate
	the proper encoding, instead of actually generating encoding
	for high byte registers, e.g. %bh).
	Add proper prolog and epilog for windows x64.

        * lib/jit_x86-sse.c: Correct a swapped rex prefix for float
	operations.

        * lib/jit_x86.c: Adjust to support Windows x64 abi.

	* check/check.x87.nodata.sh: New file, previously used but that
	was missing git.
2014-09-24 11:03:20 -03:00
pcpa
c8bb0dad56 Consider all callee_save_p regs as live on non trackable jumps 2014-09-07 15:32:32 -03:00
pcpa
120dfc956d Correct typo in documentation.
Thanks to Yaroslav Tsarko for noticing the problem.
2014-09-04 11:33:52 -03:00
pcpa
45c4df506c Only mark callee save regs as live on jumps that cannot be tracked.
* lib/lightning.c: Do not mark all registers in unknown state
	as live on jit_jmpr, or jit_jmpi to an absolute address. Instead,
	treat it as a function call, and only consider JIT_Vn registers
	as possibly live.
2014-09-01 16:27:19 -03:00
pcpa
4f8d85b90d Add info menu entry for lightning
* doc/body.texi: Add a proper info menu entry for
	GNU lightning.

	* doc/version.texi: Regenerate.
2014-08-29 11:23:22 -03:00
pcpa
90a70f91e0 GNU lightning 2.0.5 release 2014-08-16 20:33:38 -03:00
pcpa
b58960638d Add consistency check on temporaries during a jump
* lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c,
	lib/jit_arm-cpu.c, lib/jit_arm-vfp.c,
	lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c,
	lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c,
	lib/jit_mips-cpu.c, lib/jit_mips-fpu.c,
	lib/jit_ppc-cpu.c, lib/jit_ppc-fpu.c,
	lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c,
	lib/jit_s390x.c, lib/jit_sparc-cpu.c,
	lib/jit_x86-cpu.c, lib/jit_x86-sse.c,
	lib/jit_x86-x87.c: Review generation of all branch
	instructions and always adds the jit_class_nospill
	bitfield for temporary registers that cannot be	spilled
	because the reload would be after a conditional jump; the
	patch only adds an extra assertion. These conditions do
	not happen on documented lightning usage, but can happen
	if one uses the not exported jit_get_reg and jit_unget_reg
	calls and cause enough register starvation.
2014-08-16 20:31:55 -03:00
pcpa
93e3ff38e1 ALPHA: Correct class of argument float registers
* lib/jit_alpha.c: Correct wrong bitmask of most argument
	float register arguments, that were being set as callee
	save instead of argument registers class.
2014-08-16 20:19:02 -03:00
pcpa
a597e3575d ARM: Correct wrong table of instruction sizes in software float
* lib/jit_arm-sz.c: Regenerate table of known maximum
	instruction sizes for the software float fallback,
	that implements "virtual" float registers in the stack
	and operations as calls to libgcc.

	* size.c: Correct typo in the generated jit_arm-sz.c file.
2014-08-16 20:08:07 -03:00
pcpa
73c2fc830e Do not filter -sz.c files in gitignore 2014-08-10 11:49:31 -03:00
pcpa
05b88d9d45 ALPHA: Implement lightning Alpha port.
* include/lightning/jit_alpha.h, lib/jit_alpha-cpu.c,
        lib/jit_alpha-fpu.c, lib/jit_alpha-sz.c, lib/jit_alpha.c:
	New files implementing a lightning Alpha port. Thanks
	to Trent Nelson and snakebit.net staff for providing access
	to an Alpha system.

        * check/float.tst, check/lightning.c, configure.ac,
        include/lightning.h, include/lightning/Makefile.am,
        include/lightning/jit_private.h, lib/Makefile.am,
        lib/jit_disasm.c, lib/jit_size.c, lib/lightning.c:
	Minor changes to adapt for the new Alpha port.
2014-08-10 11:48:35 -03:00
pcpa
53dd28d682 Always mark return registers as live in epilog
* lib/lightning.c: Always mark JIT_RET and JIT_FRET as
	live in a function epilog. This is required because
	on some ports a complex sequence, allocating one or more
	registers, may be required to jump from a ret* to the
	epilog, and the lightning api does not have annotations
	to know if a function returns a value, or the type of
	the return value.
2014-08-10 11:39:53 -03:00
pcpa
f79f9777b1 Correct change of possibly wrong bitmask in jit_update
* lib/lightning.c: Change the correct live bitmask of
	return registers after a function call in jit_update.
2014-08-10 11:36:08 -03:00
pcpa
dbf2847e47 Do not have assertions with a long type test
* lib/lightning.c: Change assertions to have an int
	result and correct a bad bit mask assertion.
2014-08-10 11:33:00 -03:00
pcpa
b23322100c AARCH64: Correct assertion test
* lib/jit_aarch64.c: Correct bad setup for assertion
	of consistency before a patch.
2014-08-10 11:26:18 -03:00
pcpa
cf2be67c5a MIPS: Correct use of wrong test register
* lib/jit_mips-cpu.c: Correct typo in the jit_bmsr
	implementation that was using the wrong test result
	register.
2014-08-10 11:21:57 -03:00
pcpa
0d9ac79a12 Do not pass null for free, memcpy and memmove
* 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-07-29 10:29:49 -03:00
pcpa
a8c180a926 Remove the global but not advertised jit_progname variable
* include/lightning/jit_private.h, lib/jit_disasm.c,
	lib/lightning.c: Remove the global jit_progname variable.
	It was being only used in jit_init_debug, that is called
	from init_jit, so, just pass an argument.
2014-07-27 16:48:52 -03:00
pcpa
0d96d24073 Add note about jit_set_memory_functions call.
* doc/body.texi: Add note that jit_set_memory_functions
	should be called before init_jit, because init_jit
	itself may call the memory wrappers.
2014-07-27 16:45:03 -03:00
pcpa
354146b4ca ARM: Do not leave early init_jit if /proc is not mounted.
* lib/jit_arm.c: Do not get confused with default settings
	if /proc is not mounted on Linux specific code path.
2014-04-22 14:39:10 -03:00
pcpa
abf1b6e678 Do not export private definitions and types.
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_private.h, include/lightning/jit_s390x.h,
	include/lightning/jit_sparc.h, include/lightning/jit_x86.h:
	Do not add jit_regset_t, JIT_RA0, and JIT_FA0 to the installed
	header file. These types and definitions are supposed to be
	only used internally.
2014-04-09 14:46:30 -03:00
pcpa
0fac1b11ea GNU lightning 2.0.4 release 2014-04-05 19:38:25 -03:00
pcpa
6726b2b8f5 ARM: Do not emit a nop stack adjust instruction.
lib/jit_arm-cpu.c: Only adjust stack pointer in prolog if
	need stack space, that is, do not emit a nop instruction
	subtracting zero from the stack pointer.
2014-04-05 17:14:04 -03:00
pcpa
16384ff2fe Correct crash on arm in the doc/printf example.
* lib/jit_disasm.c: Correct a crash in the doc/printf example
	on arm due to releasing the data_info information in
	jit_clear_state. This is a special case for arm only, and
	actually, only armv5 or older uses the data_info buffer,
	or when forcing arm instruction set mode besides thumb
	available.
2014-04-04 19:53:14 -03:00
pcpa
a7cde4ba18 Document the lightning customization functions.
* doc/body.texi: Write detailed description and examples for
	jit_get_memory_functions, jit_set_memory_functions,
	jit_get_code, jit_set_code, jit_get_data and jit_set_data.
2014-03-12 18:23:15 -03:00
pcpa
33ee2337c7 Implement the new jit_set_data interface.
* 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.
2014-03-12 14:50:31 -03:00
pcpa
79bc3d03dd Implement the new jit_set_code interface.
* include/lightning.h, include/lightning/jit_private.h,
	lib/lightning.c: Implement the new jit_set_code() interface,
	that allows instructing lightning to use an alternate code
	buffer. The new jit_realize() function should be called
	before jit_set_code(), and usually call jit_get_code()
	to query the amount of bytes expected to be required for
	the code.

	* lib/jit_size.c: Minor update to have less chances of
	miscalculating the code buffer by starting the counter
	with the size of the longest instruction instead of zero,
	as code emit fails if at any moment less than the longest
	instruction bytes are available.

	* check/setcode.c: New file implementing some basic tests
	of the new jit_set_code() interface.

	* check/Makefile.am: Update for newer test case.
2014-03-11 11:40:42 -03:00
pcpa
a9433b5a2c Implement and document the new jit_indirect call.
* include/lightning.h, lib/lightning.c: Add the new
	jit_indirect() call, that returns a special label node,
	and tells lightning that the label may be the target of
	an indirect jump.

	* doc/body.texi: Document the new jit_indirect() call, and
	add examples of different ways to create labels and branches.
2014-03-06 18:20:29 -03:00
pcpa
c146f06793 x86_64: Change x86_64 to also save/restore %rbx in inline asm.
*  lib/jit_x86.c: Rewrite previous patch to inline save/restore
	because clobbering %ebx in x86 is treated as an error
	(jit_x86.c:239:5: error: PIC register clobbered by 'ebx' in 'asm').
2014-02-23 17:31:12 -03:00
pcpa
dbb9fe1e81 x86_64: Correct wrong inline assembly in jit_get_cpu
* lib/jit_x86.c: Rewrite incorrect inline assembly that could
	truncate a variable in a callee save register. Now it simply
	tells gcc that the register is clobbered, instead of using a
	*32 bit* swap with a temporary variable. The problem only
	happens when compiling with optimization.
2014-02-19 15:29:26 -03:00
pcpa
6e75c0352d Rewrite jit_regset_scan1 for easier optimization.
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_s390x.h, include/lightning/jit_sparc.h,
	include/lightning/jit_x86.h: Change jit_regset_t to an
	unsigned type, to allow safe right shift.

	* lib/lightning.c: Rewrite jit_regset_scan1 to allow easier
	compiler optimization.
2014-02-19 14:38:14 -03:00
pcpa
b1d3217b63 GNU lightning 2.0.3 release 2014-01-08 17:48:33 -02:00
pcpa
8567d28d60 x86: Correct wrong x87 optimization.
* lib/jit_x86-x87.c: Correct wrong optimization when
	loading the log(2) constant.
2013-12-03 15:11:11 -02:00
pcpa
0b0d63d892 x86: Ensure the x87 stack is empty when calling a function.
* lib/jit_x86-cpu.c: Use the emms instruction before
	calling any function. This is particularly important
	when using c99 complex functions as it can easily
	overflow the x87 stack due to the way lightning uses
	the x87 stack as a flat register file.
2013-12-03 15:09:48 -02:00
pcpa
c162b9d836 x86: Correct wrong x87 float indexed store code generation.
* lib/jit_x86-x87.c: Correct wrong code generation due
	to comparing the base and not the value register with
	%st(0) in stxi_f.
2013-12-02 19:17:03 -02:00
pcpa
4e5368d291 Correct wrong call in ldi_f if address does not fit in 32 bit.
This would only happen in x86_64, where x87 registers are not used
neither "exported".
2013-12-02 18:15:14 -02:00
pcpa
479c2eda3c x86: Use aligned offset for x87 to/from sse move.
* lib/jit_x86-x87.c, lib/jit_x86.c: Use 8 bytes aligned
	stack offset for float/double x87 to/from sse move.
2013-12-02 17:58:00 -02:00