Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: runtime/vm/assembler_ia32.h

Issue 136303012: Updates refactoring of CPU feature detection (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ASSEMBLER_IA32_H_ 5 #ifndef VM_ASSEMBLER_IA32_H_
6 #define VM_ASSEMBLER_IA32_H_ 6 #define VM_ASSEMBLER_IA32_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_ia32.h directly; use assembler.h instead. 9 #error Do not include assembler_ia32.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 intptr_t position_; 280 intptr_t position_;
281 intptr_t unresolved_; 281 intptr_t unresolved_;
282 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches]; 282 intptr_t unresolved_near_positions_[kMaxUnresolvedBranches];
283 283
284 friend class Assembler; 284 friend class Assembler;
285 DISALLOW_COPY_AND_ASSIGN(Label); 285 DISALLOW_COPY_AND_ASSIGN(Label);
286 }; 286 };
287 287
288 288
289 class CPUFeatures : public AllStatic {
290 public:
291 static void InitOnce();
292 static bool sse2_supported();
293 static bool sse4_1_supported();
294 static bool double_truncate_round_supported() { return sse4_1_supported(); }
295
296 private:
297 static const uint64_t kSSE2BitMask = static_cast<uint64_t>(1) << 26;
298 static const uint64_t kSSE4_1BitMask = static_cast<uint64_t>(1) << 51;
299
300 static bool sse2_supported_;
301 static bool sse4_1_supported_;
302 #ifdef DEBUG
303 static bool initialized_;
304 #endif
305 };
306
307
308 class Assembler : public ValueObject { 289 class Assembler : public ValueObject {
309 public: 290 public:
310 explicit Assembler(bool use_far_branches = false) 291 explicit Assembler(bool use_far_branches = false)
311 : buffer_(), 292 : buffer_(),
312 object_pool_(GrowableObjectArray::Handle()), 293 object_pool_(GrowableObjectArray::Handle()),
313 prologue_offset_(-1), 294 prologue_offset_(-1),
314 jit_cookie_(0), 295 jit_cookie_(0),
315 comments_() { 296 comments_() {
316 // This mode is only needed and implemented for MIPS and ARM. 297 // This mode is only needed and implemented for MIPS and ARM.
317 ASSERT(!use_far_branches); 298 ASSERT(!use_far_branches);
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 887 }
907 888
908 889
909 inline void Assembler::EmitOperandSizeOverride() { 890 inline void Assembler::EmitOperandSizeOverride() {
910 EmitUint8(0x66); 891 EmitUint8(0x66);
911 } 892 }
912 893
913 } // namespace dart 894 } // namespace dart
914 895
915 #endif // VM_ASSEMBLER_IA32_H_ 896 #endif // VM_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698