diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-03-17 12:50:52 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-03-17 05:50:52 -0700 |
commit | 435a61d30a253600992c6a613ccbc00c7c47584e (patch) | |
tree | 87d661932320ce8959cb7a4597ff373e3f91ff01 /gcc | |
parent | 1cb3c37c534eff3d75813c54b8eefbc52a8da4d8 (diff) | |
download | gcc-435a61d30a253600992c6a613ccbc00c7c47584e.zip gcc-435a61d30a253600992c6a613ccbc00c7c47584e.tar.gz gcc-435a61d30a253600992c6a613ccbc00c7c47584e.tar.bz2 |
re PR target/39473 (Typo in untyped_call in i386.md)
2009-03-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/39473
* config/i386/i386.c (ix86_expand_call): Check extra clobbers
for ms->sysv ABI calls only in 64bit mode.
* config/i386/i386.md (untyped_call): Support 32bit.
From-SVN: r144901
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 12 |
3 files changed, 22 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6edb3a6..be2837f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2009-03-16 H.J. Lu <hongjiu.lu@intel.com> + PR target/39473 + * config/i386/i386.c (ix86_expand_call): Check extra clobbers + for ms->sysv ABI calls only in 64bit mode. + + * config/i386/i386.md (untyped_call): Support 32bit. + +2009-03-16 H.J. Lu <hongjiu.lu@intel.com> + * doc/extend.texi: Replace x86_65 with x86_64. 2009-03-16 Jakub Jelinek <jakub@redhat.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index e993dce..bc912b6 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18617,12 +18617,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1, rtx pop, int sibcall) { rtx use = NULL, call; - enum calling_abi function_call_abi; - if (callarg2 && INTVAL (callarg2) == -2) - function_call_abi = MS_ABI; - else - function_call_abi = SYSV_ABI; if (pop == const0_rtx) pop = NULL; gcc_assert (!TARGET_64BIT || !pop); @@ -18678,12 +18673,13 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1, pop = gen_rtx_PLUS (Pmode, stack_pointer_rtx, pop); pop = gen_rtx_SET (VOIDmode, stack_pointer_rtx, pop); call = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, call, pop)); - gcc_assert (ix86_cfun_abi () != MS_ABI || function_call_abi != SYSV_ABI); } - /* We need to represent that SI and DI registers are clobbered - by SYSV calls. */ - if (ix86_cfun_abi () == MS_ABI && function_call_abi == SYSV_ABI) + if (TARGET_64BIT + && ix86_cfun_abi () == MS_ABI + && (!callarg2 || INTVAL (callarg2) != -2)) { + /* We need to represent that SI and DI registers are clobbered + by SYSV calls. */ static int clobbered_registers[] = { XMM6_REG, XMM7_REG, XMM8_REG, XMM9_REG, XMM10_REG, XMM11_REG, diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index d68d0c8..023f2e1 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -15159,13 +15159,19 @@ /* In order to give reg-stack an easier job in validating two coprocessor registers as containing a possible return value, simply pretend the untyped call returns a complex long double - value. */ + value. + + We can't use SSE_REGPARM_MAX here since callee is unprototyped + and should have the default ABI. */ ix86_expand_call ((TARGET_FLOAT_RETURNS_IN_80387 ? gen_rtx_REG (XCmode, FIRST_FLOAT_REG) : NULL), operands[0], const0_rtx, - GEN_INT ((DEFAULT_ABI == SYSV_ABI ? X86_64_SSE_REGPARM_MAX - : X64_SSE_REGPARM_MAX) + GEN_INT ((TARGET_64BIT + ? (DEFAULT_ABI == SYSV_ABI + ? X86_64_SSE_REGPARM_MAX + : X64_SSE_REGPARM_MAX) + : X86_32_SSE_REGPARM_MAX) - 1), NULL, 0); |