Message ID | 20101020180242.GA22912@intel.com |
---|---|
State | New |
Headers | show |
On Wed, Oct 20, 2010 at 8:02 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> pushtd1 is missing. This patch adds it. OK for 4.4/4.5/trunk?
Actually, it looks that something is missing, so generic part of gcc
doesn't push the value in TImode. TDmode values are moved as TImode,
so they should also be pushed via equivalent integer mode (TImode).
Looking at the .md files, TImode push (pushti1) is also missing. I
will investigate this a bit more.
Uros.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index ae52746..e3966e2 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1737,6 +1737,14 @@ "TARGET_AVX" "ix86_expand_move (OImode, operands); DONE;") +(define_expand "pushtd1" + [(match_operand:TD 0 "register_operand" "")] + "" +{ + ix86_expand_push (TDmode, operands[0]); + DONE; +}) + (define_expand "movti" [(set (match_operand:TI 0 "nonimmediate_operand" "") (match_operand:TI 1 "nonimmediate_operand" ""))] --- /dev/null 2010-10-13 10:55:58.381855970 -0700 +++ gcc/gcc/testsuite/gcc.target/i386/pr45946.c 2010-10-20 10:49:43.624661301 -0700 @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target dfp } */ +/* { dg-options "-O -std=gnu99 -Os -fno-omit-frame-pointer" } */ + +void +bar (_Decimal128, _Decimal128, _Decimal128, _Decimal128, _Decimal128, + _Decimal128, _Decimal128, _Decimal128, _Decimal128); + +void +foo (void) +{ + bar (0, 0, 0, 0, 0, 0, 0, 0, 0); +}