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

Side by Side Diff: src/platform-linux.cc

Issue 5638003: Fix ARM build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 return 8; 179 return 8;
180 #elif V8_TARGET_ARCH_MIPS 180 #elif V8_TARGET_ARCH_MIPS
181 return 8; 181 return 8;
182 #endif 182 #endif
183 // With gcc 4.4 the tree vectorization optimizer can generate code 183 // With gcc 4.4 the tree vectorization optimizer can generate code
184 // that requires 16 byte alignment such as movdqa on x86. 184 // that requires 16 byte alignment such as movdqa on x86.
185 return 16; 185 return 16;
186 } 186 }
187 187
188 188
189 #ifdef V8_TARGET_ARCH_ARM
190 // 0xffff0fa0 is the hard coded address of a function provided by
191 // the kernel which implements a memory barrier. On older
192 // ARM architecture revisions (pre-v6) this may be implemented using
193 // a syscall. This address is stable, and in active use (hard coded)
194 // by at least glibc-2.7 and the Android C library.
195 typedef void (*LinuxKernelMemoryBarrierFunc)(void);
196 LinuxKernelMemoryBarrierFunc pLinuxKernelMemoryBarrier __attribute__((weak)) =
197 (LinuxKernelMemoryBarrierFunc) 0xffff0fa0;
198 #endif
199
200 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { 189 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) {
201 #if defined(V8_TARGET_ARCH_ARM) && defined(__arm__) 190 #if defined(V8_TARGET_ARCH_ARM) && defined(__arm__)
202 // Only use on ARM hardware. 191 // Only use on ARM hardware.
203 pLinuxKernelMemoryBarrier(); 192 MemoryBarrier();
204 #else 193 #else
205 __asm__ __volatile__("" : : : "memory"); 194 __asm__ __volatile__("" : : : "memory");
206 // An x86 store acts as a release barrier. 195 // An x86 store acts as a release barrier.
207 #endif 196 #endif
208 *ptr = value; 197 *ptr = value;
209 } 198 }
210 199
211 200
212 const char* OS::LocalTimezone(double time) { 201 const char* OS::LocalTimezone(double time) {
213 if (isnan(time)) return ""; 202 if (isnan(time)) return "";
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 } 945 }
957 946
958 // This sampler is no longer the active sampler. 947 // This sampler is no longer the active sampler.
959 active_sampler_ = NULL; 948 active_sampler_ = NULL;
960 } 949 }
961 950
962 951
963 #endif // ENABLE_LOGGING_AND_PROFILING 952 #endif // ENABLE_LOGGING_AND_PROFILING
964 953
965 } } // namespace v8::internal 954 } } // namespace v8::internal
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