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


Joseph S. Myers wrote:
> You need to use @option to mark up option names in text.
done
> And @code for literal code in text.
done

OK for trunk?

Thanks - Joey

ChangeLog:

        * doc/extend.texi (Constructing Calls): Avoid conflict between
        MMX and x87 FP.

Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi (revision 138935)
+++ gcc/doc/extend.texi (working copy)
@@ -527,6 +527,35 @@ 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 @option{-mmmx}, @option{-msse} or @option{-msseX} options.
+@end itemize
+@itemize @bullet
+@item When floating point data types are used and it is required to
+enable SSE, use @option{-mno-mmx} to disable MMX.
+@end itemize
+@itemize @bullet
+@item When floating point data types are used and it is required to
+enable SIMD, apply @code{__attribute__ ((__option__ ("no-mmx")))} to
the
+calling functions of these intrinsic functions. For example:
+@smallexample
+void __attribute__ ((__option__ ("no-mmx"))) bar ()
+@{
+  __builtin_apply (foo,__builtin_apply_args(), 16);
+@}
+@end smallexample
+@end itemize
+@itemize @bullet
+@item When MMX instructions or data types 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


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