OLD | NEW |
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 Loading... |
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 // 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. | 8827 // Call the function from C++ through this pointer. |
8831 return FUNCTION_CAST<ModuloFunction>(buffer); | 8828 return FUNCTION_CAST<ModuloFunction>(buffer); |
8832 } | 8829 } |
8833 | 8830 |
8834 #endif | 8831 #endif |
8835 | 8832 |
8836 | 8833 |
8837 #undef __ | 8834 #undef __ |
8838 | 8835 |
8839 } } // namespace v8::internal | 8836 } } // namespace v8::internal |
8840 | 8837 |
8841 #endif // V8_TARGET_ARCH_X64 | 8838 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |