| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 __ popfq(); | 112 __ popfq(); |
| 113 __ pop(rbp); | 113 __ pop(rbp); |
| 114 __ ret(0); | 114 __ ret(0); |
| 115 #undef __ | 115 #undef __ |
| 116 | 116 |
| 117 CodeDesc desc; | 117 CodeDesc desc; |
| 118 assm.GetCode(&desc); | 118 assm.GetCode(&desc); |
| 119 Object* code = | 119 Object* code = |
| 120 Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB), NULL); | 120 Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB), NULL); |
| 121 if (!code->IsCode()) return; | 121 if (!code->IsCode()) return; |
| 122 LOG(CodeCreateEvent(Logger::BUILTIN_TAG, | 122 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, |
| 123 Code::cast(code), "CpuFeatures::Probe")); | 123 Code::cast(code), "CpuFeatures::Probe")); |
| 124 typedef uint64_t (*F0)(); | 124 typedef uint64_t (*F0)(); |
| 125 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); | 125 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); |
| 126 supported_ = probe(); | 126 supported_ = probe(); |
| 127 found_by_runtime_probing_ = supported_; | 127 found_by_runtime_probing_ = supported_; |
| 128 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; | 128 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; |
| 129 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); | 129 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); |
| 130 supported_ |= os_guarantees; | 130 supported_ |= os_guarantees; |
| 131 found_by_runtime_probing_ &= ~os_guarantees; | 131 found_by_runtime_probing_ &= ~os_guarantees; |
| 132 // SSE2 and CMOV must be available on an X64 CPU. | 132 // SSE2 and CMOV must be available on an X64 CPU. |
| 133 ASSERT(IsSupported(CPUID)); | 133 ASSERT(IsSupported(CPUID)); |
| (...skipping 2492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2626 written_position_ = current_position_; | 2626 written_position_ = current_position_; |
| 2627 } | 2627 } |
| 2628 } | 2628 } |
| 2629 | 2629 |
| 2630 | 2630 |
| 2631 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2631 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
| 2632 1 << RelocInfo::INTERNAL_REFERENCE | | 2632 1 << RelocInfo::INTERNAL_REFERENCE | |
| 2633 1 << RelocInfo::JS_RETURN; | 2633 1 << RelocInfo::JS_RETURN; |
| 2634 | 2634 |
| 2635 } } // namespace v8::internal | 2635 } } // namespace v8::internal |
| OLD | NEW |