dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and to


From: Klaus Treichel
Subject: [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. 33391f26371084da3a273e06074a924e02ae4267
Date: Tue, 06 Apr 2010 07:12:42 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET engine, compilers and tools (pnet)".

The branch, master has been updated
       via  33391f26371084da3a273e06074a924e02ae4267 (commit)
      from  7673319d744b6dec9f81b14d93698233455c68e6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/pnet.git/commit/?id=33391f26371084da3a273e06074a924e02ae4267

commit 33391f26371084da3a273e06074a924e02ae4267
Author: Klaus Treichel <address@hidden>
Date:   Tue Apr 6 09:12:17 2010 +0200

    Add more float support in the unroller and for the amd64 backend.

diff --git a/ChangeLog b/ChangeLog
index 5d4573b..24ad317 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-04-06  Klaus Treichel  <address@hidden>
+
+       * engine/amd64_codegen.h: Remove emitting the Rex prefix for some fpu
+       opcodes where it's not needed.
+
+       * engine/md_amd64.h: Add macros for unary float operations.
+
+       * engine/unroll_arith.c (COP_PREFIX_COS, COP_PREFIX_SIN, 
COP_PREFIX_TAN):
+       Add unroller support for these cvm opcodes.
+
 2010-04-05  Klaus Treichel  <address@hidden>
 
        * engine/arm_codegen.h: Add code generation macros for arm vfp support.
diff --git a/engine/amd64_codegen.h b/engine/amd64_codegen.h
index 4f516b5..550f244 100644
--- a/engine/amd64_codegen.h
+++ b/engine/amd64_codegen.h
@@ -8,9 +8,11 @@
  *   Dietmar Maurer (address@hidden)
  *   Patrik Torstensson
  *   Zalman Stern
+ *   Klaus Treichel
  * 
  * Copyright (C)  2000 Intel Corporation.  All rights reserved.
  * Copyright (C)  2001, 2002 Ximian, Inc.
+ * Copyright (C)  2010  Southern Storm Software, Pty Ltd.
  *
  * This file originated with the Mono project (www.go-mono.com), and may
  * be redistributed under the terms of the Lesser General Public License.
@@ -694,17 +696,17 @@ typedef union {
 #define amd64_enter_size(inst,framesize) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_enter((inst),(framesize)); } while (0)
 //#define amd64_leave_size(inst,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_leave(inst); } while (0)
 #define amd64_sahf_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_sahf(inst); } while (0)
-#define amd64_fsin_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fsin(inst); } while (0)
-#define amd64_fcos_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fcos(inst); } while (0)
-#define amd64_fabs_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fabs(inst); } while (0)
+#define amd64_fsin(inst) do { x86_fsin(inst); } while (0)
+#define amd64_fcos(inst) do { x86_fcos(inst); } while (0)
+#define amd64_fabs(inst) do { x86_fabs(inst); } while (0)
 #define amd64_ftst_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_ftst(inst); } while (0)
 #define amd64_fxam_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fxam(inst); } while (0)
 #define amd64_fpatan_size(inst,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_fpatan(inst); } while (0)
 #define amd64_fprem_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fprem(inst); } while (0)
 #define amd64_fprem1_size(inst,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_fprem1(inst); } while (0)
 #define amd64_frndint_size(inst,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_frndint(inst); } while (0)
-#define amd64_fsqrt_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fsqrt(inst); } while (0)
-#define amd64_fptan_size(inst,size) do { amd64_emit_rex ((inst),(size),0,0,0); 
x86_fptan(inst); } while (0)
+#define amd64_fsqrt(inst) do { x86_fsqrt(inst); } while (0)
+#define amd64_fptan(inst) do { x86_fptan(inst); } while (0)
 //#define amd64_padding_size(inst,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_padding((inst),(size)); } while (0)
 #define amd64_prolog_size(inst,frame_size,reg_mask,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_prolog((inst),(frame_size),(reg_mask)); } while (0)
 #define amd64_epilog_size(inst,reg_mask,size) do { amd64_emit_rex 
((inst),(size),0,0,0); x86_epilog((inst),(reg_mask)); } while (0)
@@ -887,17 +889,12 @@ typedef union {
 #define amd64_enter(inst,framesize) amd64_enter_size(inst,framesize)
 //#define amd64_leave(inst) amd64_leave_size(inst,8)
 #define amd64_sahf(inst) amd64_sahf_size(inst,8)
-#define amd64_fsin(inst) amd64_fsin_size(inst,8)
-#define amd64_fcos(inst) amd64_fcos_size(inst,8)
-#define amd64_fabs(inst) amd64_fabs_size(inst,8)
 #define amd64_ftst(inst) amd64_ftst_size(inst,8)
 #define amd64_fxam(inst) amd64_fxam_size(inst,8)
 #define amd64_fpatan(inst) amd64_fpatan_size(inst,8)
 #define amd64_fprem(inst) amd64_fprem_size(inst,8)
 #define amd64_fprem1(inst) amd64_fprem1_size(inst,8)
 #define amd64_frndint(inst) amd64_frndint_size(inst,8)
-#define amd64_fsqrt(inst) amd64_fsqrt_size(inst,8)
-#define amd64_fptan(inst) amd64_fptan_size(inst,8)
 #define amd64_padding(inst,size) amd64_padding_size(inst,size)
 #define amd64_prolog(inst,frame,reg_mask) 
amd64_prolog_size(inst,frame,reg_mask,8)
 #define amd64_epilog(inst,reg_mask) amd64_epilog_size(inst,reg_mask,8)
diff --git a/engine/md_amd64.h b/engine/md_amd64.h
index 08114d1..9ef150f 100644
--- a/engine/md_amd64.h
+++ b/engine/md_amd64.h
@@ -1,7 +1,7 @@
 /*
  * md_amd64.h - Machine-dependent definitions for x86_64 (AMD64/EM64T).
  *
- * Copyright (C) 2003,2005  Southern Storm Software, Pty Ltd.
+ * Copyright (C) 2003, 2005, 2010  Southern Storm Software, Pty Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -794,6 +794,46 @@ extern md_inst_ptr _md_amd64_mov_memindex_reg_byte
                                                                         1, 
(reg), 2); \
                        } while (0)
 
+/*
+ * Absolute of a floatinpoint value
+ */
+#define md_abs_reg_float(inst,reg) \
+                       do { \
+                               amd64_fabs((inst)); \
+                       } while (0)
+
+/*
+ * Sqare root of a floatingpoint value
+ */
+#define md_sqrt_reg_float(inst,reg) \
+                       do { \
+                               amd64_fsqrt((inst)); \
+                       } while (0)
+
+/*
+ * Sine of a floatingpoint value
+ */
+#define md_sin_reg_float(inst,reg) \
+                       do { \
+                               amd64_fsin((inst)); \
+                       } while (0)
+
+/*
+ * Cosine of a floatingpoint value
+ */
+#define md_cos_reg_float(inst,reg) \
+                       do { \
+                               amd64_fcos((inst)); \
+                       } while (0)
+
+/*
+ * Tangent of a floatingpoint value
+ */
+#define md_tan_reg_float(inst,reg) \
+                       do { \
+                               amd64_fptan((inst)); \
+                       } while (0)
+
 #ifdef __cplusplus
 };
 #endif
diff --git a/engine/unroll_arith.c b/engine/unroll_arith.c
index 40fe574..7bfad10 100644
--- a/engine/unroll_arith.c
+++ b/engine/unroll_arith.c
@@ -807,6 +807,34 @@ break;
 
 #endif /* md_abs_reg_float */
 
+#ifdef md_cos_reg_float
+
+case 0x100 + COP_PREFIX_COS:
+{
+       /* Sqare root of a floating point */
+       UNROLL_START();
+       reg = GetTopFPRegister(&unroll);
+       md_cos_reg_float(unroll.out, reg);
+       MODIFY_UNROLL_PC(CVM_LEN_NONE);
+}
+break;
+
+#endif /* md_cos_reg_float */
+
+#ifdef md_sin_reg_float
+
+case 0x100 + COP_PREFIX_SIN:
+{
+       /* Sqare root of a floating point */
+       UNROLL_START();
+       reg = GetTopFPRegister(&unroll);
+       md_sin_reg_float(unroll.out, reg);
+       MODIFY_UNROLL_PC(CVM_LEN_NONE);
+}
+break;
+
+#endif /* md_sin_reg_float */
+
 #ifdef md_sqrt_reg_float
 
 case 0x100 + COP_PREFIX_SQRT:
@@ -821,6 +849,20 @@ break;
 
 #endif /* md_sqrt_reg_float */
 
+#ifdef md_tan_reg_float
+
+case 0x100 + COP_PREFIX_TAN:
+{
+       /* Sqare root of a floating point */
+       UNROLL_START();
+       reg = GetTopFPRegister(&unroll);
+       md_tan_reg_float(unroll.out, reg);
+       MODIFY_UNROLL_PC(CVM_LEN_NONE);
+}
+break;
+
+#endif /* md_tan_reg_float */
+
 #endif /* MD_HAS_FP */
 
 #endif /* IL_UNROLL_CASES */

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   10 ++++++++++
 engine/amd64_codegen.h |   17 +++++++----------
 engine/md_amd64.h      |   42 +++++++++++++++++++++++++++++++++++++++++-
 engine/unroll_arith.c  |   42 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 100 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
DotGNU Portable.NET engine, compilers and tools (pnet)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]