This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: testsuite/37074: gcc.dg/torture/stackalign/builtin-apply-4.c failed with SSE2
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: "Ye, Joey" <joey dot ye at intel dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, "Andrew Pinski" <pinskia at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Aug 2008 12:24:27 +0200
- Subject: Re: PATCH: testsuite/37074: gcc.dg/torture/stackalign/builtin-apply-4.c failed with SSE2
- References: <BB577BF501703042AD7E08EADD8E514F019108CF@pdsmsx415.ccr.corp.intel.com>
On Wed, Aug 13, 2008 at 10:53 AM, Ye, Joey <joey.ye@intel.com> wrote:
> Unless someone think it worthwhile to continue exploring and post a
> patch that is applicable (my previous patch wasn't even close to there),
> I somewhat believe that avoid mixing MMX and x87 in builtin_apply and
> mention it in user manual is a good idea.
>
> How about this patch to doc?
Please note that we can add __attribute__ ((__option__ ("no-mmx"))) to
calling function ("bar" in case of
gcc.target/i386/builtin-apply-mmx.c) to suppress generation of MMX
moves for __builtin_apply and __builtin_apply_args. I think that this
new functionality should be mention in your doc patch.
>
> Thanks - Joey
>
> Index: gcc/doc/extend.texi
> ===================================================================
> --- gcc/doc/extend.texi (revision 138935)
> +++ gcc/doc/extend.texi (working copy)
> @@ -527,6 +527,24 @@ sophisticated features or other extensio
> is, therefore, not recommended to use them outside very simple
> functions acting as mere forwarders for their arguments.
>
> +In x86 (not x86_64) platform, these built-in function won't work
> +properly if both MMX and x87 floating point are supported (either
> +in application code or in library). Following rules can be applied
> +to avoid malfunction while using these functions:
> +@itemize @bullet
> +@item When floating point data types are used, don't enable MMX
> +via -mmmx, -msse or -msseX options.
> +@end itemize
> +@itemize @bullet
> +@item When floating point data types are used and it is required to
> +enable SSE, use -mno-mmx to disable MMX.
> +@end itemize
> +@itemize @bullet
> +@item When MMX instruction or data type are used, avoid using floating
> +point data type and calling libraries that may involve floating
> +point.
> +@end itemize
> +
> @deftypefn {Built-in Function} {void *} __builtin_apply_args ()
> This built-in function returns a pointer to data
> describing how to perform a call with the same arguments as were passed
>
Uros.