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

Side by Side Diff: src/arm/assembler-arm.h

Issue 385069: Fix some style issues in the ARM code.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/codegen-arm.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 class CpuFeatures : public AllStatic { 428 class CpuFeatures : public AllStatic {
429 public: 429 public:
430 enum Feature { VFP3 = 1 }; 430 enum Feature { VFP3 = 1 };
431 // Detect features of the target CPU. Set safe defaults if the serializer 431 // Detect features of the target CPU. Set safe defaults if the serializer
432 // is enabled (snapshots must be portable). 432 // is enabled (snapshots must be portable).
433 static void Probe(); 433 static void Probe();
434 // Check whether a feature is supported by the target CPU. 434 // Check whether a feature is supported by the target CPU.
435 static bool IsSupported(Feature f) { 435 static bool IsSupported(Feature f) {
436 if (f == VFP3 && !FLAG_enable_vfp3) return false; 436 if (f == VFP3 && !FLAG_enable_vfp3) return false;
437 437
438 return (supported_ & (static_cast<uint64_t>(1) << f)) != 0; 438 return (supported_ & (1u << f)) != 0;
439 } 439 }
440 // Check whether a feature is currently enabled. 440 // Check whether a feature is currently enabled.
441 static bool IsEnabled(Feature f) { 441 static bool IsEnabled(Feature f) {
442 return (enabled_ & (static_cast<uint64_t>(1) << f)) != 0; 442 return (enabled_ & (1u << f)) != 0;
443 } 443 }
444 class Scope BASE_EMBEDDED {
Mads Ager (chromium) 2009/11/12 13:25:24 Could you add the // Enable a specified feature w
Erik Corry 2009/11/12 13:42:37 Done.
445 #ifdef DEBUG
446 public:
447 explicit Scope(Feature f) {
448 ASSERT(CpuFeatures::IsSupported(f));
449 old_enabled_ = CpuFeatures::enabled_;
450 CpuFeatures::enabled_ |= 1u << f;
451 }
452 ~Scope() { CpuFeatures::enabled_ = old_enabled_; }
453 private:
454 unsigned old_enabled_;
455 #else
456 public:
457 explicit Scope(Feature f) {}
458 #endif
459 };
444 460
445 private: 461 private:
446 static uint64_t supported_; 462 static unsigned supported_;
447 static uint64_t enabled_; 463 static unsigned enabled_;
448 }; 464 };
449 465
450 466
451 typedef int32_t Instr; 467 typedef int32_t Instr;
452 468
453 469
454 extern const Instr kMovLrPc; 470 extern const Instr kMovLrPc;
455 extern const Instr kLdrPCPattern; 471 extern const Instr kLdrPCPattern;
456 472
457 473
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); 984 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0);
969 985
970 friend class RegExpMacroAssemblerARM; 986 friend class RegExpMacroAssemblerARM;
971 friend class RelocInfo; 987 friend class RelocInfo;
972 friend class CodePatcher; 988 friend class CodePatcher;
973 }; 989 };
974 990
975 } } // namespace v8::internal 991 } } // namespace v8::internal
976 992
977 #endif // V8_ARM_ASSEMBLER_ARM_H_ 993 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | src/arm/codegen-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698