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

Side by Side 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, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * NaCl service run-time, non-platform specific system call helper routines. 8 * NaCl service run-time, non-platform specific system call helper routines.
9 */ 9 */
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm 884 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_arm
885 /* 885 /*
886 * Put some interesting bits into the VFP registers. 886 * Put some interesting bits into the VFP registers.
887 */ 887 */
888 888
889 static const char manybytes[64] = 889 static const char manybytes[64] =
890 "Sensitive information must not be leaked to untrusted code!!!!\n"; 890 "Sensitive information must not be leaked to untrusted code!!!!\n";
891 891
892 __asm__ volatile("vldm %0, {d0-d7}" :: "r" (manybytes) : 892 __asm__ volatile("vldm %0, {d0-d7}" :: "r" (manybytes) :
893 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"); 893 "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7");
894
895 /*
896 * __builtin_arm_set_fpscr is not available yet in gcc (not even in 4.8)
897 * and clang doesn't know about the "vfpcc" register.
898 * TODO(sbc): Always use __builtin_arm_set_fpscr once we are using a
899 * version of gcc that supports it.
900 */
901 #ifdef __clang__
902 __builtin_arm_set_fpscr(0xdeadbeef);
903 #else
894 __asm__ volatile("fmxr fpscr, %0" :: "r" (0xdeadbeef) : "vfpcc"); 904 __asm__ volatile("fmxr fpscr, %0" :: "r" (0xdeadbeef) : "vfpcc");
905 #endif
895 906
896 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips 907 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips
897 908
898 static const char manybytes[128] = 909 static const char manybytes[128] =
899 "Sensitive information must not be leaked to untrusted code!!!\n" 910 "Sensitive information must not be leaked to untrusted code!!!\n"
900 "Where is Maletoth?\n"; 911 "Where is Maletoth?\n";
901 912
902 __asm__ volatile("ldc1 $f0, 0(%0)\n" 913 __asm__ volatile("ldc1 $f0, 0(%0)\n"
903 "ldc1 $f2, 8(%0)\n" 914 "ldc1 $f2, 8(%0)\n"
904 "ldc1 $f4, 16(%0)\n" 915 "ldc1 $f4, 16(%0)\n"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, 1053 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp,
1043 NaClClockGetRes, 1); 1054 NaClClockGetRes, 1);
1044 } 1055 }
1045 1056
1046 int32_t NaClSysClockGetTime(struct NaClAppThread *natp, 1057 int32_t NaClSysClockGetTime(struct NaClAppThread *natp,
1047 int clk_id, 1058 int clk_id,
1048 uint32_t tsp) { 1059 uint32_t tsp) {
1049 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, 1060 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp,
1050 NaClClockGetTime, 0); 1061 NaClClockGetTime, 0);
1051 } 1062 }
OLDNEW
« 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