[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] libjit ChangeLog jit/jit-rules-alpha.c jit/jit-...
From: |
Thomas Cort |
Subject: |
[dotgnu-pnet-commits] libjit ChangeLog jit/jit-rules-alpha.c jit/jit-... |
Date: |
Mon, 21 Aug 2006 14:23:44 +0000 |
CVSROOT: /sources/dotgnu-pnet
Module name: libjit
Changes by: Thomas Cort <tcort> 06/08/21 14:23:44
Modified files:
. : ChangeLog
jit : jit-rules-alpha.c jit-gen-alpha.h
Log message:
Add macros for int to fp and fp to int conversions. Use _jit_pad_bufer.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libjit/ChangeLog?cvsroot=dotgnu-pnet&r1=1.251&r2=1.252
http://cvs.savannah.gnu.org/viewcvs/libjit/jit/jit-rules-alpha.c?cvsroot=dotgnu-pnet&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/libjit/jit/jit-gen-alpha.h?cvsroot=dotgnu-pnet&r1=1.5&r2=1.6
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/ChangeLog,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -b -r1.251 -r1.252
--- ChangeLog 20 Aug 2006 15:47:54 -0000 1.251
+++ ChangeLog 21 Aug 2006 14:23:44 -0000 1.252
@@ -1,3 +1,7 @@
+2006-08-21 Thomas Cort <address@hidden>
+ * 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 <address@hidden>
* jit/jit-apply-alpha.c jit/jit-apply-alpha.h jit/jit-rules-alpha.h
Index: jit/jit-rules-alpha.c
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-rules-alpha.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- jit/jit-rules-alpha.c 20 Aug 2006 15:47:54 -0000 1.7
+++ jit/jit-rules-alpha.c 21 Aug 2006 14:23:44 -0000 1.8
@@ -586,12 +586,7 @@
*addr = (long) block->fixup_list;
inst++; inst++;
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
+ _jit_pad_buffer((char*)inst,6);
}
}
@@ -630,12 +625,7 @@
*addr = (long) gen->epilog_fixup;
inst++; inst++;
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst);
- alpha_nop(inst); /* to be overwritten later with jmp */
+ _jit_pad_buffer((char*)inst,6); /* to be overwritten later with jmp */
(gen)->posn.ptr = (char*) inst;
}
Index: jit/jit-gen-alpha.h
===================================================================
RCS file: /sources/dotgnu-pnet/libjit/jit/jit-gen-alpha.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- jit/jit-gen-alpha.h 20 Aug 2006 15:47:54 -0000 1.5
+++ jit/jit-gen-alpha.h 21 Aug 2006 14:23:44 -0000 1.6
@@ -157,6 +157,7 @@
#define ALPHA_LIT_SHIFT 0x0d
#define ALPHA_FUNC_MASK 0x7f
+#define ALPHA_FP_FUNC_MASK 0x7ff
#define ALPHA_FUNC_SHIFT 0x5
#define ALPHA_FUNC_MEM_BRANCH_MASK 0x3
@@ -254,11 +255,16 @@
#define ALPHA_OP_UMULH 0x13
#define ALPHA_OP_MULLV 0x13
#define ALPHA_OP_MULLQV 0x13
+#define ALPHA_OP_ITOFS 0x14
+#define ALPHA_OP_ITOFF 0x14
+#define ALPHA_OP_ITOFT 0x14
#define ALPHA_OP_TRAPB 0x18
#define ALPHA_OP_JMP 0x1a
#define ALPHA_OP_JSR 0x1a
#define ALPHA_OP_RET 0x1a
#define ALPHA_OP_JSRCO 0x1a
+#define ALPHA_OP_FTOIT 0x1c
+#define ALPHA_OP_FTOIS 0x1c
#define ALPHA_OP_LDF 0x20
#define ALPHA_OP_LDG 0x21
#define ALPHA_OP_LDS 0x22
@@ -379,6 +385,11 @@
#define ALPHA_FUNC_MULLV 0x40
#define ALPHA_FUNC_MULQV 0x60
+/* integer to floating point operations -- use with ALPHA_OP_* == 0x14 */
+#define ALPHA_FUNC_ITOFS 0x4
+#define ALPHA_FUNC_ITOFF 0x14
+#define ALPHA_FUNC_ITOFT 0x24
+
/* trap barrier -- use with ALPHA_OP_* == 0x18 */
#define ALPHA_FUNC_TRAPB 0x0
@@ -388,6 +399,9 @@
#define ALPHA_FUNC_RET 0x2
#define ALPHA_FUNC_JSRCO 0x3
+/* floating point to integer operations -- use with ALPHA_OP_* == 0x1c */
+#define ALPHA_FUNC_FTOIT 0x70
+#define ALPHA_FUNC_FTOIS 0x78
/* encode registers */
#define alpha_encode_reg_a(reg) \
@@ -411,6 +425,9 @@
#define alpha_encode_func(func) \
((func & ALPHA_FUNC_MASK) << ALPHA_FUNC_SHIFT)
+#define alpha_encode_fp_func(func) \
+ ((func & ALPHA_FP_FUNC_MASK) << ALPHA_FUNC_SHIFT)
+
#define alpha_encode_func_mem_branch(func,hint) \
(((func & ALPHA_FUNC_MEM_BRANCH_MASK) << ALPHA_FUNC_MEM_BRANCH_SHIFT) |
\
(hint & ALPHA_HINT_MASK))
@@ -428,6 +445,11 @@
alpha_encode_reg_b(sreg1)| alpha_encode_reg_c(dreg) | \
alpha_encode_func(func))
+#define alpha_encode_fpops(inst,op,func,sreg0,sreg1,dreg) \
+ *(inst)++ = (alpha_encode_op(op) | alpha_encode_reg_a(sreg0) | \
+ alpha_encode_reg_b(sreg1)| alpha_encode_reg_c(dreg) | \
+ alpha_encode_fp_func(func))
+
#define alpha_encode_mem_branch(inst,op,func,dreg,sreg,hint) \
*(inst)++ = (alpha_encode_op(op) | alpha_encode_reg_a(dreg) | \
alpha_encode_reg_b(sreg) | \
@@ -621,10 +643,15 @@
#define alpha_bge(inst,reg,offset)
alpha_encode_branch(inst,ALPHA_OP_BGE,reg,offset)
#define alpha_bgt(inst,reg,offset)
alpha_encode_branch(inst,ALPHA_OP_BGT,reg,offset)
-/*
- * load immediate pseudo instruction.
- */
+/* Floating point conversion instructions */
+#define alpha_ftoit(inst,fsreg,dreg)
alpha_encode_fpop(inst,ALPHA_OP_FTOIT,ALPHA_FUNC_FTOIT,fsreg,ALPHA_ZERO,dreg)
+#define alpha_ftois(inst,fsreg,dreg)
alpha_encode_fpop(inst,ALPHA_OP_FTOIS,ALPHA_FUNC_FTOIS,fsreg,ALPHA_ZERO,dreg)
+
+#define alpha_itofs(inst,sreg,fdreg)
alpha_encode_fpop(inst,ALPHA_OP_ITOFS,ALPHA_FUNC_ITOFS,sreg,ALPHA_ZERO,fdreg)
+#define alpha_itoff(inst,sreg,fdreg)
alpha_encode_fpop(inst,ALPHA_OP_ITOFF,ALPHA_FUNC_ITOFF,sreg,ALPHA_ZERO,fdreg)
+#define alpha_itoft(inst,sreg,fdreg)
alpha_encode_fpop(inst,ALPHA_OP_ITOFT,ALPHA_FUNC_ITOFT,sreg,ALPHA_ZERO,fdreg)
+/* load immediate pseudo instruction. */
#define _alpha_li64(code,dreg,val) \
do { \
unsigned long c1 = val; \