Source-Changes-HG archive

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

[src/trunk]: src/lib/libm/arch/i387 SSE2 registers are only used for float an...



details:   https://anonhg.NetBSD.org/src/rev/5027489bf2f3
branches:  trunk
changeset: 766196:5027489bf2f3
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jun 18 18:16:40 2011 +0000

description:
SSE2 registers are only used for float and double arguments, so update
comment to reflect reality. Add some accessor macros for long double
arguments for i386 and x86_64.

diffstat:

 lib/libm/arch/i387/abi.h |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r a4f8c0ffefe4 -r 5027489bf2f3 lib/libm/arch/i387/abi.h
--- a/lib/libm/arch/i387/abi.h  Sat Jun 18 17:47:20 2011 +0000
+++ b/lib/libm/arch/i387/abi.h  Sat Jun 18 18:16:40 2011 +0000
@@ -1,12 +1,12 @@
-/*     $NetBSD: abi.h,v 1.5 2008/06/23 10:24:13 drochner Exp $ */
+/*     $NetBSD: abi.h,v 1.6 2011/06/18 18:16:40 joerg Exp $    */
 
 /*
  * Written by Frank van der Linden (fvdl%wasabisystems.com@localhost)
  */
 
 /*
- * The x86-64 ABI specifies that float, double and long double
- * arguments are passed in SSE2 (xmm) registers. Unfortunately,
+ * The x86-64 ABI specifies that float and double arguments
+ * are passed in SSE2 (xmm) registers. Unfortunately,
  * there is no way to push those on to the FP stack, which is
  * where the fancier instructions get their arguments from.
  *
@@ -16,6 +16,8 @@
 
 #ifdef __x86_64__
 
+#define ARG_LONG_DOUBLE_ONE    8(%rsp)
+#define ARG_LONG_DOUBLE_TWO    24(%rsp)
 #define ARG_DOUBLE_ONE         -8(%rsp)
 #define ARG_DOUBLE_ONE_LSW     -8(%rsp)
 #define ARG_DOUBLE_ONE_MSW     -4(%rsp)
@@ -49,6 +51,8 @@
 
 #else
 
+#define ARG_LONG_DOUBLE_ONE    4(%rsp)
+#define ARG_LONG_DOUBLE_TWO    16(%rsp)
 #define ARG_DOUBLE_ONE         4(%esp)
 #define ARG_DOUBLE_ONE_LSW     4(%esp)
 #define ARG_DOUBLE_ONE_MSW     8(%esp)



Home | Main Index | Thread Index | Old Index