aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@gcc.gnu.org>2009-02-17 22:17:52 -0800
committerH.J. Lu <hjl@gcc.gnu.org>2009-02-17 22:17:52 -0800
commit0705d3f487d2b8c709c25051f55079a6e22cb3d0 (patch)
tree268117c0a63379417b939a66045d1dbf33c0ac2d
parentbce08d5003e0cb1f63cbe92895be8cbcc5c48547 (diff)
downloadgcc-0705d3f487d2b8c709c25051f55079a6e22cb3d0.zip
gcc-0705d3f487d2b8c709c25051f55079a6e22cb3d0.tar.gz
gcc-0705d3f487d2b8c709c25051f55079a6e22cb3d0.tar.bz2
re PR target/38891 (using ms_abi function attribute with -mno-sse generates an internal compiler error)
gcc/ 2009-02-17 Xuepeng Guo <xuepeng.guo@intel.com> PR target/38891 * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Move the hunk of initialization for MS_ABI prior to the hunk of !TARGET_MMX. gcc/testsuite 2009-02-17 Xuepeng Guo <xuepeng.guo@intel.com> PR target/38891 * gcc.dg/callabi/pr38891.c: New. 2009-02-17 H.J. Lu <hongjiu.lu@intel.com> * gcc.dg/callabi/callabi.exp: New. From-SVN: r144258
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.h22
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.dg/callabi/callabi.exp31
-rw-r--r--gcc/testsuite/gcc.dg/callabi/pr38891.c10
5 files changed, 67 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 780468f..ac325e0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-17 Xuepeng Guo <xuepeng.guo@intel.com>
+
+ PR target/38891
+ * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Move the hunk of
+ initialization for MS_ABI prior to the hunk of !TARGET_MMX.
+
2009-02-17 H.J. Lu <hongjiu.lu@intel.com>
PR target/39082
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 14e7438..a8b97d3 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -937,6 +937,17 @@ do { \
fixed_regs[j] = 1; \
call_used_regs[j] = 1; \
} \
+ if (TARGET_64BIT \
+ && ((cfun && cfun->machine->call_abi == MS_ABI) \
+ || (!cfun && DEFAULT_ABI == MS_ABI))) \
+ { \
+ int i; \
+ call_used_regs[4 /*RSI*/] = 0; \
+ call_used_regs[5 /*RDI*/] = 0; \
+ for (i = 0; i < 8; i++) \
+ call_used_regs[45+i] = 0; \
+ call_used_regs[27] = call_used_regs[28] = 0; \
+ } \
if (! TARGET_MMX) \
{ \
int i; \
@@ -968,17 +979,6 @@ do { \
for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++) \
reg_names[i] = ""; \
} \
- if (TARGET_64BIT \
- && ((cfun && cfun->machine->call_abi == MS_ABI) \
- || (!cfun && DEFAULT_ABI == MS_ABI))) \
- { \
- int i; \
- call_used_regs[4 /*RSI*/] = 0; \
- call_used_regs[5 /*RDI*/] = 0; \
- for (i = 0; i < 8; i++) \
- call_used_regs[45+i] = 0; \
- call_used_regs[27] = call_used_regs[28] = 0; \
- } \
} while (0)
/* Return number of consecutive hard regs needed starting at reg REGNO
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ca72b02..9b8b8a9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2009-02-17 Xuepeng Guo <xuepeng.guo@intel.com>
+
+ PR target/38891
+ * gcc.dg/callabi/pr38891.c: New.
+
+2009-02-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.dg/callabi/callabi.exp: New.
+
2009-02-17 H.J. Lu <hongjiu.lu@intel.com>
PR target/39082
diff --git a/gcc/testsuite/gcc.dg/callabi/callabi.exp b/gcc/testsuite/gcc.dg/callabi/callabi.exp
new file mode 100644
index 0000000..1c11ecc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/callabi/callabi.exp
@@ -0,0 +1,31 @@
+# Copyright (C) 2009 Free Software Foundation, Inc.
+
+# 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+dg-init
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/callabi/pr38891.c b/gcc/testsuite/gcc.dg/callabi/pr38891.c
new file mode 100644
index 0000000..586e99f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/callabi/pr38891.c
@@ -0,0 +1,10 @@
+/* Test for cross x86_64<->w64 abi standard calls.
+*/
+/* { dg-do compile { target { x86_64-*-* } } } */
+/* { dg-options "-mno-sse" } */
+#include "callabi.h"
+
+long double
+CALLABI_CROSS func_cross ()
+{
+}