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 __ 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 Object* code = Heap::CreateCode(desc, |
122 NULL, | |
123 Code::ComputeFlags(Code::STUB), | 122 Code::ComputeFlags(Code::STUB), |
124 Handle<Object>()); | 123 Handle<Object>()); |
125 if (!code->IsCode()) return; | 124 if (!code->IsCode()) return; |
126 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, | 125 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, |
127 Code::cast(code), "CpuFeatures::Probe")); | 126 Code::cast(code), "CpuFeatures::Probe")); |
128 typedef uint64_t (*F0)(); | 127 typedef uint64_t (*F0)(); |
129 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); | 128 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); |
130 supported_ = probe(); | 129 supported_ = probe(); |
131 found_by_runtime_probing_ = supported_; | 130 found_by_runtime_probing_ = supported_; |
132 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; | 131 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; |
(...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2955 // specially coded on x64 means that it is a relative 32 bit address, as used | 2954 // specially coded on x64 means that it is a relative 32 bit address, as used |
2956 // by branch instructions. | 2955 // by branch instructions. |
2957 return (1 << rmode_) & kApplyMask; | 2956 return (1 << rmode_) & kApplyMask; |
2958 } | 2957 } |
2959 | 2958 |
2960 | 2959 |
2961 | 2960 |
2962 } } // namespace v8::internal | 2961 } } // namespace v8::internal |
2963 | 2962 |
2964 #endif // V8_TARGET_ARCH_X64 | 2963 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |