| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 __ movq(rsp, rbp); | 111 __ movq(rsp, rbp); |
| 112 __ pop(rbx); | 112 __ pop(rbx); |
| 113 __ pop(rcx); | 113 __ pop(rcx); |
| 114 __ popfq(); | 114 __ popfq(); |
| 115 __ pop(rbp); | 115 __ pop(rbp); |
| 116 __ ret(0); | 116 __ ret(0); |
| 117 #undef __ | 117 #undef __ |
| 118 | 118 |
| 119 CodeDesc desc; | 119 CodeDesc desc; |
| 120 assm.GetCode(&desc); | 120 assm.GetCode(&desc); |
| 121 Object* code = Heap::CreateCode(desc, | 121 MaybeObject* maybe_code = Heap::CreateCode(desc, |
| 122 Code::ComputeFlags(Code::STUB), | 122 Code::ComputeFlags(Code::STUB), |
| 123 Handle<Object>()); | 123 Handle<Object>()); |
| 124 Object* code; |
| 125 if (!maybe_code->ToObject(&code)) return; |
| 124 if (!code->IsCode()) return; | 126 if (!code->IsCode()) return; |
| 125 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, | 127 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, |
| 126 Code::cast(code), "CpuFeatures::Probe")); | 128 Code::cast(code), "CpuFeatures::Probe")); |
| 127 typedef uint64_t (*F0)(); | 129 typedef uint64_t (*F0)(); |
| 128 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); | 130 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); |
| 129 supported_ = probe(); | 131 supported_ = probe(); |
| 130 found_by_runtime_probing_ = supported_; | 132 found_by_runtime_probing_ = supported_; |
| 131 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; | 133 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; |
| 132 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); | 134 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); |
| 133 supported_ |= os_guarantees; | 135 supported_ |= os_guarantees; |
| (...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3004 // specially coded on x64 means that it is a relative 32 bit address, as used | 3006 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 3005 // by branch instructions. | 3007 // by branch instructions. |
| 3006 return (1 << rmode_) & kApplyMask; | 3008 return (1 << rmode_) & kApplyMask; |
| 3007 } | 3009 } |
| 3008 | 3010 |
| 3009 | 3011 |
| 3010 | 3012 |
| 3011 } } // namespace v8::internal | 3013 } } // namespace v8::internal |
| 3012 | 3014 |
| 3013 #endif // V8_TARGET_ARCH_X64 | 3015 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |