| 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 8737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8748 | 8748 |
| 8749 #ifdef _WIN64 | 8749 #ifdef _WIN64 |
| 8750 typedef double (*ModuloFunction)(double, double); | 8750 typedef double (*ModuloFunction)(double, double); |
| 8751 // Define custom fmod implementation. | 8751 // Define custom fmod implementation. |
| 8752 ModuloFunction CreateModuloFunction() { | 8752 ModuloFunction CreateModuloFunction() { |
| 8753 size_t actual_size; | 8753 size_t actual_size; |
| 8754 byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize, | 8754 byte* buffer = static_cast<byte*>(OS::Allocate(Assembler::kMinimalBufferSize, |
| 8755 &actual_size, | 8755 &actual_size, |
| 8756 true)); | 8756 true)); |
| 8757 CHECK(buffer); | 8757 CHECK(buffer); |
| 8758 Assembler masm(buffer, static_cast<int>(actual_size)); | 8758 Assembler masm(Isolate::Current(), buffer, static_cast<int>(actual_size)); |
| 8759 // Generated code is put into a fixed, unmovable, buffer, and not into | 8759 // Generated code is put into a fixed, unmovable, buffer, and not into |
| 8760 // the V8 heap. We can't, and don't, refer to any relocatable addresses | 8760 // the V8 heap. We can't, and don't, refer to any relocatable addresses |
| 8761 // (e.g. the JavaScript nan-object). | 8761 // (e.g. the JavaScript nan-object). |
| 8762 | 8762 |
| 8763 // Windows 64 ABI passes double arguments in xmm0, xmm1 and | 8763 // Windows 64 ABI passes double arguments in xmm0, xmm1 and |
| 8764 // returns result in xmm0. | 8764 // returns result in xmm0. |
| 8765 // Argument backing space is allocated on the stack above | 8765 // Argument backing space is allocated on the stack above |
| 8766 // the return address. | 8766 // the return address. |
| 8767 | 8767 |
| 8768 // Compute x mod y. | 8768 // Compute x mod y. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8834 } | 8834 } |
| 8835 | 8835 |
| 8836 #endif | 8836 #endif |
| 8837 | 8837 |
| 8838 | 8838 |
| 8839 #undef __ | 8839 #undef __ |
| 8840 | 8840 |
| 8841 } } // namespace v8::internal | 8841 } } // namespace v8::internal |
| 8842 | 8842 |
| 8843 #endif // V8_TARGET_ARCH_X64 | 8843 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |