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

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

Issue 6825037: ARM: Always enable ARMv7 when VFPv3 is enabled. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added missing file Created 9 years, 8 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 | « no previous file | src/flag-definitions.h » ('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) 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 53
54 #ifdef __arm__ 54 #ifdef __arm__
55 static uint64_t CpuFeaturesImpliedByCompiler() { 55 static uint64_t CpuFeaturesImpliedByCompiler() {
56 uint64_t answer = 0; 56 uint64_t answer = 0;
57 #ifdef CAN_USE_ARMV7_INSTRUCTIONS 57 #ifdef CAN_USE_ARMV7_INSTRUCTIONS
58 answer |= 1u << ARMv7; 58 answer |= 1u << ARMv7;
59 #endif // def CAN_USE_ARMV7_INSTRUCTIONS 59 #endif // def CAN_USE_ARMV7_INSTRUCTIONS
60 // If the compiler is allowed to use VFP then we can use VFP too in our code 60 // If the compiler is allowed to use VFP then we can use VFP too in our code
61 // generation even when generating snapshots. This won't work for cross 61 // generation even when generating snapshots. This won't work for cross
62 // compilation. 62 // compilation. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6.
63 #if defined(__VFP_FP__) && !defined(__SOFTFP__) 63 #if defined(__VFP_FP__) && !defined(__SOFTFP__)
64 answer |= 1u << VFP3; 64 answer |= 1u << VFP3 | 1u << ARMv7;
65 #endif // defined(__VFP_FP__) && !defined(__SOFTFP__) 65 #endif // defined(__VFP_FP__) && !defined(__SOFTFP__)
66 #ifdef CAN_USE_VFP_INSTRUCTIONS 66 #ifdef CAN_USE_VFP_INSTRUCTIONS
67 answer |= 1u << VFP3; 67 answer |= 1u << VFP3 | 1u << ARMv7;
68 #endif // def CAN_USE_VFP_INSTRUCTIONS 68 #endif // def CAN_USE_VFP_INSTRUCTIONS
69 return answer; 69 return answer;
70 } 70 }
71 #endif // def __arm__ 71 #endif // def __arm__
72 72
73 73
74 void CpuFeatures::Probe() { 74 void CpuFeatures::Probe() {
75 ASSERT(!initialized_); 75 ASSERT(!initialized_);
76 #ifdef DEBUG 76 #ifdef DEBUG
77 initialized_ = true; 77 initialized_ = true;
78 #endif 78 #endif
79 #ifndef __arm__ 79 #ifndef __arm__
80 // For the simulator=arm build, use VFP when FLAG_enable_vfp3 is enabled. 80 // For the simulator=arm build, use VFP when FLAG_enable_vfp3 is
81 // enabled. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6.
81 if (FLAG_enable_vfp3) { 82 if (FLAG_enable_vfp3) {
82 supported_ |= 1u << VFP3; 83 supported_ |= 1u << VFP3 | 1u << ARMv7;
83 } 84 }
84 // For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled 85 // For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled
85 if (FLAG_enable_armv7) { 86 if (FLAG_enable_armv7) {
86 supported_ |= 1u << ARMv7; 87 supported_ |= 1u << ARMv7;
87 } 88 }
88 #else // def __arm__ 89 #else // def __arm__
89 if (Serializer::enabled()) { 90 if (Serializer::enabled()) {
90 supported_ |= OS::CpuFeaturesImpliedByPlatform(); 91 supported_ |= OS::CpuFeaturesImpliedByPlatform();
91 supported_ |= CpuFeaturesImpliedByCompiler(); 92 supported_ |= CpuFeaturesImpliedByCompiler();
92 return; // No features if we might serialize. 93 return; // No features if we might serialize.
93 } 94 }
94 95
95 if (OS::ArmCpuHasFeature(VFP3)) { 96 if (OS::ArmCpuHasFeature(VFP3)) {
96 // This implementation also sets the VFP flags if 97 // This implementation also sets the VFP flags if runtime
97 // runtime detection of VFP returns true. 98 // detection of VFP returns true. VFPv3 implies ARMv7, see ARM DDI
98 supported_ |= 1u << VFP3; 99 // 0406B, page A1-6.
99 found_by_runtime_probing_ |= 1u << VFP3; 100 supported_ |= 1u << VFP3 | 1u << ARMv7;
101 found_by_runtime_probing_ |= 1u << VFP3 | 1u << ARMv7;
100 } 102 }
101 103
102 if (OS::ArmCpuHasFeature(ARMv7)) { 104 if (OS::ArmCpuHasFeature(ARMv7)) {
103 supported_ |= 1u << ARMv7; 105 supported_ |= 1u << ARMv7;
104 found_by_runtime_probing_ |= 1u << ARMv7; 106 found_by_runtime_probing_ |= 1u << ARMv7;
105 } 107 }
106 #endif 108 #endif
107 } 109 }
108 110
109 111
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after
2829 2831
2830 // Since a constant pool was just emitted, move the check offset forward by 2832 // Since a constant pool was just emitted, move the check offset forward by
2831 // the standard interval. 2833 // the standard interval.
2832 next_buffer_check_ = pc_offset() + kCheckConstInterval; 2834 next_buffer_check_ = pc_offset() + kCheckConstInterval;
2833 } 2835 }
2834 2836
2835 2837
2836 } } // namespace v8::internal 2838 } } // namespace v8::internal
2837 2839
2838 #endif // V8_TARGET_ARCH_ARM 2840 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698