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

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

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
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 25 matching lines...) Expand all
36 36
37 #include "v8.h" 37 #include "v8.h"
38 38
39 #include "arm/assembler-arm-inl.h" 39 #include "arm/assembler-arm-inl.h"
40 #include "serialize.h" 40 #include "serialize.h"
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 // Safe default is no features. 45 // Safe default is no features.
46 uint64_t CpuFeatures::supported_ = 0; 46 unsigned CpuFeatures::supported_ = 0;
47 uint64_t CpuFeatures::enabled_ = 0; 47 unsigned CpuFeatures::enabled_ = 0;
48 48
49 void CpuFeatures::Probe() { 49 void CpuFeatures::Probe() {
50 // Perform runtime detection of VFP. 50 // If the compiler is allowed to use vfp then we can use vfp too in our
51 static const char* descriptive_file_linux = "/proc/cpuinfo"; 51 // code generation.
52
53 #if !defined(__arm__) || (defined(__VFP_FP__) && !defined(__SOFTFP__)) 52 #if !defined(__arm__) || (defined(__VFP_FP__) && !defined(__SOFTFP__))
54 // The supported & enabled flags for VFP are set to true for the following 53 // The supported flags for VFP are set to true for the following
55 // conditions, even without runtime detection of VFP: 54 // conditions, even without runtime detection of VFP:
56 // (1) For the simulator=arm build, always use VFP since 55 // (1) For the simulator=arm build, always use VFP since
57 // the arm simulator has VFP support. 56 // the arm simulator has VFP support.
58 // (2) If V8 is being compiled with GCC with the vfp option turned on, 57 // (2) If V8 is being compiled with GCC with the vfp option turned on,
59 // always use VFP since the build system assumes that V8 will run on 58 // always use VFP since the build system assumes that V8 will run on
60 // a platform that has VFP hardware. 59 // a platform that has VFP hardware.
61 supported_ |= static_cast<uint64_t>(1) << VFP3; 60 supported_ |= 1u << VFP3;
62 enabled_ |= static_cast<uint64_t>(1) << VFP3; 61 enabled_ |= 1u << VFP3;
63 #endif 62 #endif
64 63
65 if (OS::fgrep_vfp(descriptive_file_linux, "vfp")) { 64 if (Serializer::enabled()) return; // No features if we might serialize.
65
66 if (OS::ArmCpuHasFeature(OS::VFP)) {
66 // This implementation also sets the VFP flags if 67 // This implementation also sets the VFP flags if
67 // runtime detection of VFP returns true. 68 // runtime detection of VFP returns true.
68 supported_ |= static_cast<uint64_t>(1) << VFP3; 69 supported_ |= 1u << VFP3;
69 enabled_ |= static_cast<uint64_t>(1) << VFP3;
70 } 70 }
71 } 71 }
72 72
73 // ----------------------------------------------------------------------------- 73 // -----------------------------------------------------------------------------
74 // Implementation of Register and CRegister 74 // Implementation of Register and CRegister
75 75
76 Register no_reg = { -1 }; 76 Register no_reg = { -1 };
77 77
78 Register r0 = { 0 }; 78 Register r0 = { 0 };
79 Register r1 = { 1 }; 79 Register r1 = { 1 };
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 bind(&after_pool); 1811 bind(&after_pool);
1812 } 1812 }
1813 1813
1814 // Since a constant pool was just emitted, move the check offset forward by 1814 // Since a constant pool was just emitted, move the check offset forward by
1815 // the standard interval. 1815 // the standard interval.
1816 next_buffer_check_ = pc_offset() + kCheckConstInterval; 1816 next_buffer_check_ = pc_offset() + kCheckConstInterval;
1817 } 1817 }
1818 1818
1819 1819
1820 } } // namespace v8::internal 1820 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698