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

Side by Side Diff: runtime/vm/constants_arm.h

Issue 19493004: Adds more SIMD instructions for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/disassembler_arm.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_CONSTANTS_ARM_H_ 5 #ifndef VM_CONSTANTS_ARM_H_
6 #define VM_CONSTANTS_ARM_H_ 6 #define VM_CONSTANTS_ARM_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at 12 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at
13 // a time. 13 // a time.
14 // TODO(zra): Detect number of registers at runtime by querying /proc/cpuinfo. 14 // TODO(zra): Detect number of registers at runtime by querying /proc/cpuinfo.
15 #define VFPv3_D32 15 #define VFPv3_D16
16 #if defined(VFPv3_D16) == defined(VFPv3_D32) 16 #if defined(VFPv3_D16) == defined(VFPv3_D32)
17 #error "Exactly one of VFPv3_D16 or VFPv3_D32 can be defined at a time." 17 #error "Exactly one of VFPv3_D16 or VFPv3_D32 can be defined at a time."
18 #endif 18 #endif
19 19
20 20
21 enum Register { 21 enum Register {
22 kFirstFreeCpuRegister = 0, 22 kFirstFreeCpuRegister = 0,
23 R0 = 0, 23 R0 = 0,
24 R1 = 1, 24 R1 = 1,
25 R2 = 2, 25 R2 = 2,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 static inline DRegister EvenDRegisterOf(QRegister q) { 159 static inline DRegister EvenDRegisterOf(QRegister q) {
160 return static_cast<DRegister>(q * 2); 160 return static_cast<DRegister>(q * 2);
161 } 161 }
162 162
163 static inline DRegister OddDRegisterOf(QRegister q) { 163 static inline DRegister OddDRegisterOf(QRegister q) {
164 return static_cast<DRegister>((q * 2) + 1); 164 return static_cast<DRegister>((q * 2) + 1);
165 } 165 }
166 166
167 167
168 static inline SRegister EvenSRegisterOf(DRegister d) { 168 static inline SRegister EvenSRegisterOf(DRegister d) {
169 #ifdef VFPv3_D32
170 ASSERT(d < D16);
171 #endif
169 return static_cast<SRegister>(d * 2); 172 return static_cast<SRegister>(d * 2);
170 } 173 }
171 174
172 static inline SRegister OddSRegisterOf(DRegister d) { 175 static inline SRegister OddSRegisterOf(DRegister d) {
176 #ifdef VFPv3_D32
177 ASSERT(d < D16);
178 #endif
173 return static_cast<SRegister>((d * 2) + 1); 179 return static_cast<SRegister>((d * 2) + 1);
174 } 180 }
175 181
176 182
177 // Register aliases for floating point scratch registers. 183 // Register aliases for floating point scratch registers.
178 const QRegister QTMP = Q7; // Overlaps with DTMP, STMP. 184 const QRegister QTMP = Q7; // Overlaps with DTMP, STMP.
179 const DRegister DTMP = EvenDRegisterOf(QTMP); // Overlaps with STMP. 185 const DRegister DTMP = EvenDRegisterOf(QTMP); // Overlaps with STMP.
180 const SRegister STMP = EvenSRegisterOf(DTMP); 186 const SRegister STMP = EvenSRegisterOf(DTMP);
181 187
182 // Architecture independent aliases. 188 // Architecture independent aliases.
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 656 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
651 657
652 private: 658 private:
653 DISALLOW_ALLOCATION(); 659 DISALLOW_ALLOCATION();
654 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 660 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
655 }; 661 };
656 662
657 } // namespace dart 663 } // namespace dart
658 664
659 #endif // VM_CONSTANTS_ARM_H_ 665 #endif // VM_CONSTANTS_ARM_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698