OLD | NEW |
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 Loading... |
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 __asm__ volatile("fmxr fpscr, %0" :: "r" (0xdeadbeef) : "vfpcc"); | 894 /* Clang doesn't seem to recognis vfpcc: |
| 895 * error: unknown register name 'vfpcc' in asm |
| 896 */ |
| 897 /*__asm__ volatile("fmxr fpscr, %0" :: "r" (0xdeadbeef) : "vfpcc");*/ |
895 | 898 |
896 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips | 899 #elif NACL_ARCH(NACL_BUILD_ARCH) == NACL_mips |
897 | 900 |
898 static const char manybytes[128] = | 901 static const char manybytes[128] = |
899 "Sensitive information must not be leaked to untrusted code!!!\n" | 902 "Sensitive information must not be leaked to untrusted code!!!\n" |
900 "Where is Maletoth?\n"; | 903 "Where is Maletoth?\n"; |
901 | 904 |
902 __asm__ volatile("ldc1 $f0, 0(%0)\n" | 905 __asm__ volatile("ldc1 $f0, 0(%0)\n" |
903 "ldc1 $f2, 8(%0)\n" | 906 "ldc1 $f2, 8(%0)\n" |
904 "ldc1 $f4, 16(%0)\n" | 907 "ldc1 $f4, 16(%0)\n" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, | 1045 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, |
1043 NaClClockGetRes, 1); | 1046 NaClClockGetRes, 1); |
1044 } | 1047 } |
1045 | 1048 |
1046 int32_t NaClSysClockGetTime(struct NaClAppThread *natp, | 1049 int32_t NaClSysClockGetTime(struct NaClAppThread *natp, |
1047 int clk_id, | 1050 int clk_id, |
1048 uint32_t tsp) { | 1051 uint32_t tsp) { |
1049 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, | 1052 return NaClSysClockGetCommon(natp, clk_id, (uintptr_t) tsp, |
1050 NaClClockGetTime, 0); | 1053 NaClClockGetTime, 0); |
1051 } | 1054 } |
OLD | NEW |