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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 __ movq(rsp, rbp); | 109 __ movq(rsp, rbp); |
110 __ pop(rbx); | 110 __ pop(rbx); |
111 __ pop(rcx); | 111 __ pop(rcx); |
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 = Heap::CreateCode(desc, |
120 Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB), NULL); | 120 NULL, |
| 121 Code::ComputeFlags(Code::STUB), |
| 122 Handle<Object>()); |
121 if (!code->IsCode()) return; | 123 if (!code->IsCode()) return; |
122 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, | 124 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, |
123 Code::cast(code), "CpuFeatures::Probe")); | 125 Code::cast(code), "CpuFeatures::Probe")); |
124 typedef uint64_t (*F0)(); | 126 typedef uint64_t (*F0)(); |
125 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); | 127 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); |
126 supported_ = probe(); | 128 supported_ = probe(); |
127 found_by_runtime_probing_ = supported_; | 129 found_by_runtime_probing_ = supported_; |
128 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; | 130 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; |
129 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); | 131 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); |
130 supported_ |= os_guarantees; | 132 supported_ |= os_guarantees; |
(...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 written_position_ = current_position_; | 2663 written_position_ = current_position_; |
2662 } | 2664 } |
2663 } | 2665 } |
2664 | 2666 |
2665 | 2667 |
2666 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2668 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
2667 1 << RelocInfo::INTERNAL_REFERENCE | | 2669 1 << RelocInfo::INTERNAL_REFERENCE | |
2668 1 << RelocInfo::JS_RETURN; | 2670 1 << RelocInfo::JS_RETURN; |
2669 | 2671 |
2670 } } // namespace v8::internal | 2672 } } // namespace v8::internal |
OLD | NEW |