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
This commit is contained in:
H.J. Lu 2009-02-17 22:17:52 -08:00
parent bce08d5003
commit 0705d3f487
5 changed files with 67 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ()
{
}