Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: gcc/config/i386/i386.md

Issue 10557041: Patch NaCl gcc to avoid use of fsincos. (Closed) Base URL: http://git.chromium.org/native_client/nacl-gcc.git@master
Patch Set: Don't disable fsincos; replace it with fsin+fcos instead Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/config/i386/i386.md
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 6429360bb9de1ac243ec95f6da95411d58219418..783d13d337163035b8ea198c795d62fc848b4793 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -17500,7 +17500,19 @@
(unspec:XF [(match_dup 2)] UNSPEC_SINCOS_SIN))]
"TARGET_USE_FANCY_MATH_387
&& flag_unsafe_math_optimizations"
- "fsincos"
+{
+ if (TARGET_NACL)
+ {
+ return "fld %%st(0)"
+ "\n\tfsin"
+ "\n\tfxch"
+ "\n\tfcos";
+ }
+ else
+ {
+ return "fsincos";
+ }
+}
[(set_attr "type" "fpspc")
(set_attr "mode" "XF")])
@@ -17538,6 +17550,19 @@
|| TARGET_MIX_SSE_I387)
&& flag_unsafe_math_optimizations"
"fsincos"
+{
+ if (TARGET_NACL)
+ {
+ return "fld %%st(0)"
+ "\n\tfsin"
+ "\n\tfxch"
+ "\n\tfcos";
+ }
+ else
+ {
+ return "fsincos";
+ }
+}
[(set_attr "type" "fpspc")
(set_attr "mode" "XF")])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698