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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #ifdef CAN_USE_VFP3_INSTRUCTIONS | 74 #ifdef CAN_USE_VFP3_INSTRUCTIONS |
75 if (FLAG_enable_vfp3) { | 75 if (FLAG_enable_vfp3) { |
76 answer |= 1u << VFP3 | 1u << ARMv7; | 76 answer |= 1u << VFP3 | 1u << ARMv7; |
77 } | 77 } |
78 #endif // CAN_USE_VFP3_INSTRUCTIONS | 78 #endif // CAN_USE_VFP3_INSTRUCTIONS |
79 #ifdef CAN_USE_VFP32DREGS | 79 #ifdef CAN_USE_VFP32DREGS |
80 if (FLAG_enable_32dregs) { | 80 if (FLAG_enable_32dregs) { |
81 answer |= 1u << VFP32DREGS; | 81 answer |= 1u << VFP32DREGS; |
82 } | 82 } |
83 #endif // CAN_USE_VFP32DREGS | 83 #endif // CAN_USE_VFP32DREGS |
| 84 #ifdef CAN_USE_NEON |
| 85 if (FLAG_enable_neon) { |
| 86 answer |= 1u << NEON; |
| 87 } |
| 88 #endif // CAN_USE_VFP32DREGS |
84 if ((answer & (1u << ARMv7)) && FLAG_enable_unaligned_accesses) { | 89 if ((answer & (1u << ARMv7)) && FLAG_enable_unaligned_accesses) { |
85 answer |= 1u << UNALIGNED_ACCESSES; | 90 answer |= 1u << UNALIGNED_ACCESSES; |
86 } | 91 } |
87 | 92 |
88 return answer; | 93 return answer; |
89 } | 94 } |
90 | 95 |
91 | 96 |
92 const char* DwVfpRegister::AllocationIndexToString(int index) { | 97 const char* DwVfpRegister::AllocationIndexToString(int index) { |
93 ASSERT(index >= 0 && index < NumAllocatableRegisters()); | 98 ASSERT(index >= 0 && index < NumAllocatableRegisters()); |
(...skipping 19 matching lines...) Expand all Loading... |
113 // minimal set of features which is also alowed for generated code in the | 118 // minimal set of features which is also alowed for generated code in the |
114 // snapshot. | 119 // snapshot. |
115 supported_ |= standard_features; | 120 supported_ |= standard_features; |
116 | 121 |
117 if (serializer_enabled) { | 122 if (serializer_enabled) { |
118 // No probing for features if we might serialize (generate snapshot). | 123 // No probing for features if we might serialize (generate snapshot). |
119 return; | 124 return; |
120 } | 125 } |
121 | 126 |
122 #ifndef __arm__ | 127 #ifndef __arm__ |
123 // For the simulator=arm build, use VFP when FLAG_enable_vfp3 is | |
124 // enabled. VFPv3 implies ARMv7, see ARM DDI 0406B, page A1-6. | |
125 if (FLAG_enable_vfp3) { | |
126 supported_ |= | |
127 static_cast<uint64_t>(1) << VFP3 | | |
128 static_cast<uint64_t>(1) << ARMv7; | |
129 } | |
130 if (FLAG_enable_neon) { | |
131 supported_ |= 1u << NEON; | |
132 } | |
133 // For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled | 128 // For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled |
134 if (FLAG_enable_armv7) { | 129 if (FLAG_enable_armv7) { |
135 supported_ |= static_cast<uint64_t>(1) << ARMv7; | 130 supported_ |= static_cast<uint64_t>(1) << ARMv7; |
| 131 if (FLAG_enable_vfp3) { |
| 132 supported_ |= static_cast<uint64_t>(1) << VFP3; |
| 133 } |
| 134 if (FLAG_enable_neon) { |
| 135 supported_ |= 1u << NEON; |
| 136 supported_ |= static_cast<uint64_t>(1) << VFP32DREGS; |
| 137 } |
| 138 if (FLAG_enable_sudiv) { |
| 139 supported_ |= static_cast<uint64_t>(1) << SUDIV; |
| 140 } |
| 141 if (FLAG_enable_movw_movt) { |
| 142 supported_ |= static_cast<uint64_t>(1) << MOVW_MOVT_IMMEDIATE_LOADS; |
| 143 } |
| 144 if (FLAG_enable_32dregs) { |
| 145 supported_ |= static_cast<uint64_t>(1) << VFP32DREGS; |
| 146 } |
136 } | 147 } |
137 | |
138 if (FLAG_enable_sudiv) { | |
139 supported_ |= static_cast<uint64_t>(1) << SUDIV; | |
140 } | |
141 | |
142 if (FLAG_enable_movw_movt) { | |
143 supported_ |= static_cast<uint64_t>(1) << MOVW_MOVT_IMMEDIATE_LOADS; | |
144 } | |
145 | |
146 if (FLAG_enable_32dregs) { | |
147 supported_ |= static_cast<uint64_t>(1) << VFP32DREGS; | |
148 } | |
149 | |
150 if (FLAG_enable_unaligned_accesses) { | 148 if (FLAG_enable_unaligned_accesses) { |
151 supported_ |= static_cast<uint64_t>(1) << UNALIGNED_ACCESSES; | 149 supported_ |= static_cast<uint64_t>(1) << UNALIGNED_ACCESSES; |
152 } | 150 } |
153 | 151 |
154 #else // __arm__ | 152 #else // __arm__ |
155 // Probe for additional features not already known to be available. | 153 // Probe for additional features not already known to be available. |
156 CPU cpu; | 154 CPU cpu; |
157 if (!IsSupported(VFP3) && FLAG_enable_vfp3 && cpu.has_vfp3()) { | 155 if (!IsSupported(VFP3) && FLAG_enable_vfp3 && cpu.has_vfp3()) { |
158 // This implementation also sets the VFP flags if runtime | 156 // This implementation also sets the VFP flags if runtime |
159 // detection of VFP returns true. VFPv3 implies ARMv7, see ARM DDI | 157 // detection of VFP returns true. VFPv3 implies ARMv7, see ARM DDI |
(...skipping 3563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3723 ASSERT((index_64bit == count_of_64bit_) && | 3721 ASSERT((index_64bit == count_of_64bit_) && |
3724 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && | 3722 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && |
3725 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && | 3723 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && |
3726 (index_32bit == (index_heap_ptr + count_of_32bit_))); | 3724 (index_32bit == (index_heap_ptr + count_of_32bit_))); |
3727 } | 3725 } |
3728 | 3726 |
3729 | 3727 |
3730 } } // namespace v8::internal | 3728 } } // namespace v8::internal |
3731 | 3729 |
3732 #endif // V8_TARGET_ARCH_ARM | 3730 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |