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

Side by Side Diff: src/x64/codegen-x64.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, 8 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 | « src/v8utils.h ('k') | test/cctest/test-utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 8806 matching lines...) Expand 10 before | Expand all | Expand 10 after
8817 Label clear_exceptions; 8817 Label clear_exceptions;
8818 __ testb(rax, Immediate(0x3f /* Any Exception*/)); 8818 __ testb(rax, Immediate(0x3f /* Any Exception*/));
8819 __ j(not_zero, &clear_exceptions); 8819 __ j(not_zero, &clear_exceptions);
8820 __ ret(0); 8820 __ ret(0);
8821 __ bind(&clear_exceptions); 8821 __ bind(&clear_exceptions);
8822 __ fnclex(); 8822 __ fnclex();
8823 __ ret(0); 8823 __ ret(0);
8824 8824
8825 CodeDesc desc; 8825 CodeDesc desc;
8826 masm.GetCode(&desc); 8826 masm.GetCode(&desc);
8827 // Call the function from C++. 8827 // Make sure that the compiled code is visible to all threads before
8828 // returning the pointer to it.
8829 MemoryBarrier();
8830 // Call the function from C++ through this pointer.
8828 return FUNCTION_CAST<ModuloFunction>(buffer); 8831 return FUNCTION_CAST<ModuloFunction>(buffer);
8829 } 8832 }
8830 8833
8831 #endif 8834 #endif
8832 8835
8833 8836
8834 #undef __ 8837 #undef __
8835 8838
8836 } } // namespace v8::internal 8839 } } // namespace v8::internal
8837 8840
8838 #endif // V8_TARGET_ARCH_X64 8841 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8utils.h ('k') | test/cctest/test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698