1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 09:40:25 +02:00

Correct jit implementation to pass several test cases.

* include/lightning/jit_ia64.h, lib/jit_ia64-cpu.c,
	lib/jit_ia64-fpu.c, lib/jit_ia64.c:
	  Relocate JIT_Rn registers to the local registers, as, like
	float registers, div/rem and sqrt are implemented as function
	calls, and may overwrite non saved scratch registers.
	  Change patch_at to receive a jit_code_t instead of a
	jit_node_t, so that it is easier to "inline" patches when
	some instruction requires complex code to implement, e.g.
	uneq and ltgt.
	  Correct arguments to FMA and FMA like instructions that,
	due to a cut&paste error were passing the wrong argument
	to the related F- implementation function.
	  Rewrite ltgt to return the proper result if one (or both)
	of the arguments is unordered.
This commit is contained in:
pcpa 2013-04-26 21:07:40 -03:00
parent 89f1e2f608
commit 746f3bb6c7
5 changed files with 80 additions and 44 deletions

View file

@ -26,16 +26,18 @@
*/
#define JIT_FP _R4 /* Not abi specific */
typedef enum {
#define JIT_R0 _R14
#define JIT_R1 _R15
#define JIT_R2 _R16
#define JIT_V0 _R40
#define JIT_V1 _R41
#define JIT_V2 _R42
#define jit_r_num() 16
#define jit_r(n) (_R14 - (n))
#define jit_v_num() 8
#define jit_v(n) (_R40 + (n))
#define JIT_R0 _R40
#define JIT_R1 _R41
#define JIT_R2 _R42
#define JIT_R3 _R43
#define JIT_V0 _R44
#define JIT_V1 _R45
#define JIT_V2 _R46
#define JIT_V3 _R47
#define jit_r_num() 4
#define jit_r(n) (_R40 - (n))
#define jit_v_num() 4
#define jit_v(n) (_R44 + (n))
_R0, /* constant - Always 0 */
_R1, /* special - Global Data pointer (gp) */
/* r2-r3 - scratch - Use with 22-bit immediate add - scratch */