This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: testsuite/37074: gcc.dg/torture/stackalign/builtin-apply-4.c failed with SSE2


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]