OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #ifdef __arm__ | 70 #ifdef __arm__ |
71 // If the compiler is allowed to use VFP then we can use VFP too in our code | 71 // If the compiler is allowed to use VFP then we can use VFP too in our code |
72 // generation even when generating snapshots. ARMv7 and hardware floating | 72 // generation even when generating snapshots. ARMv7 and hardware floating |
73 // point support implies VFPv3, see ARM DDI 0406B, page A1-6. | 73 // point support implies VFPv3, see ARM DDI 0406B, page A1-6. |
74 #if defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__) \ | 74 #if defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__) \ |
75 && !defined(__SOFTFP__) | 75 && !defined(__SOFTFP__) |
76 answer |= 1u << VFP3 | 1u << ARMv7 | 1u << VFP2; | 76 answer |= 1u << VFP3 | 1u << ARMv7 | 1u << VFP2; |
77 #endif // defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__) | 77 #endif // defined(CAN_USE_ARMV7_INSTRUCTIONS) && defined(__VFP_FP__) |
78 // && !defined(__SOFTFP__) | 78 // && !defined(__SOFTFP__) |
79 #endif // _arm__ | 79 #endif // _arm__ |
| 80 if (answer & (1u << ARMv7)) { |
| 81 answer |= 1u << UNALIGNED_ACCESSES; |
| 82 } |
80 | 83 |
81 return answer; | 84 return answer; |
82 } | 85 } |
83 | 86 |
84 | 87 |
85 void CpuFeatures::Probe() { | 88 void CpuFeatures::Probe() { |
86 unsigned standard_features = static_cast<unsigned>( | 89 unsigned standard_features = static_cast<unsigned>( |
87 OS::CpuFeaturesImpliedByPlatform()) | CpuFeaturesImpliedByCompiler(); | 90 OS::CpuFeaturesImpliedByPlatform()) | CpuFeaturesImpliedByCompiler(); |
88 ASSERT(supported_ == 0 || supported_ == standard_features); | 91 ASSERT(supported_ == 0 || supported_ == standard_features); |
89 #ifdef DEBUG | 92 #ifdef DEBUG |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 129 } |
127 | 130 |
128 if (!IsSupported(ARMv7) && OS::ArmCpuHasFeature(ARMv7)) { | 131 if (!IsSupported(ARMv7) && OS::ArmCpuHasFeature(ARMv7)) { |
129 found_by_runtime_probing_ |= 1u << ARMv7; | 132 found_by_runtime_probing_ |= 1u << ARMv7; |
130 } | 133 } |
131 | 134 |
132 if (!IsSupported(SUDIV) && OS::ArmCpuHasFeature(SUDIV)) { | 135 if (!IsSupported(SUDIV) && OS::ArmCpuHasFeature(SUDIV)) { |
133 found_by_runtime_probing_ |= 1u << SUDIV; | 136 found_by_runtime_probing_ |= 1u << SUDIV; |
134 } | 137 } |
135 | 138 |
| 139 if (!IsSupported(UNALIGNED_ACCESSES) && OS::ArmCpuHasFeature(ARMv7)) { |
| 140 found_by_runtime_probing_ |= 1u << UNALIGNED_ACCESSES; |
| 141 } |
| 142 |
136 supported_ |= found_by_runtime_probing_; | 143 supported_ |= found_by_runtime_probing_; |
137 #endif | 144 #endif |
138 | 145 |
139 // Assert that VFP3 implies VFP2 and ARMv7. | 146 // Assert that VFP3 implies VFP2 and ARMv7. |
140 ASSERT(!IsSupported(VFP3) || (IsSupported(VFP2) && IsSupported(ARMv7))); | 147 ASSERT(!IsSupported(VFP3) || (IsSupported(VFP2) && IsSupported(ARMv7))); |
141 } | 148 } |
142 | 149 |
143 | 150 |
144 // ----------------------------------------------------------------------------- | 151 // ----------------------------------------------------------------------------- |
145 // Implementation of RelocInfo | 152 // Implementation of RelocInfo |
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 | 2720 |
2714 // Since a constant pool was just emitted, move the check offset forward by | 2721 // Since a constant pool was just emitted, move the check offset forward by |
2715 // the standard interval. | 2722 // the standard interval. |
2716 next_buffer_check_ = pc_offset() + kCheckPoolInterval; | 2723 next_buffer_check_ = pc_offset() + kCheckPoolInterval; |
2717 } | 2724 } |
2718 | 2725 |
2719 | 2726 |
2720 } } // namespace v8::internal | 2727 } } // namespace v8::internal |
2721 | 2728 |
2722 #endif // V8_TARGET_ARCH_ARM | 2729 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |