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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 6777007: Add thread-safety to creation of MemCopy and modulo functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add Release_Store to change. Created 9 years, 9 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 | « src/api.cc ('k') | src/platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index cf990a00e4ae2ff0476ef75d50f1c31dfd79b2fe..2d17a72df920be30df83ec01e54d41295fb61d3a 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -10174,7 +10174,7 @@ static void MemCopyWrapper(void* dest, const void* src, size_t size) {
}
-MemCopyFunction CreateMemCopyFunction() {
+OS::MemCopyFunction CreateMemCopyFunction() {
HandleScope scope;
MacroAssembler masm(NULL, 1 * KB);
@@ -10198,7 +10198,7 @@ MemCopyFunction CreateMemCopyFunction() {
if (FLAG_debug_code) {
__ cmp(Operand(esp, kSizeOffset + stack_offset),
- Immediate(kMinComplexMemCopy));
+ Immediate(OS::kMinComplexMemCopy));
Label ok;
__ j(greater_equal, &ok);
__ int3();
@@ -10377,7 +10377,8 @@ MemCopyFunction CreateMemCopyFunction() {
if (chunk == NULL) return &MemCopyWrapper;
memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
- return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress());
+ MemoryBarrier();
+ return FUNCTION_CAST<OS::MemCopyFunction>(chunk->GetStartAddress());
}
#undef __
« no previous file with comments | « src/api.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698