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

Unified Diff: src/trusted/service_runtime/nacl_syscall_common.c

Issue 411803002: Fix for building ARM/linux using clang. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 5 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: src/trusted/service_runtime/nacl_syscall_common.c
diff --git a/src/trusted/service_runtime/nacl_syscall_common.c b/src/trusted/service_runtime/nacl_syscall_common.c
index 38f291232e5f137bae8f54b2508ab07add41ae72..bbb24266802438896b63dfa6e2fd5e6b29430766 100644
--- a/src/trusted/service_runtime/nacl_syscall_common.c
+++ b/src/trusted/service_runtime/nacl_syscall_common.c
@@ -891,7 +891,18 @@ int32_t NaClSysTestInfoLeak(struct NaClAppThread *natp) {
__asm__ volatile("vldm %0, {d0-d7}" :: "r" (manybytes) :
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7");
+
+ /*
+ * __builtin_arm_set_fpscr is not available yet in gcc (not even in 4.8)
+ * and clang doesn't know about the "vfpcc" register.
+ * TODO(sbc): Always use __builtin_arm_set_fpscr once we are using a
+ * version of gcc that supports it.
+ */
+#ifdef __clang__
+ __builtin_arm_set_fpscr(0xdeadbeef);
+#else
__asm__ volatile("fmxr fpscr, %0" :: "r" (0xdeadbeef) : "vfpcc");
+#endif
#elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips
« 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