Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
constants_arm.h
Go to the documentation of this 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
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_CONSTANTS_ARM_H_
6#define RUNTIME_VM_CONSTANTS_ARM_H_
7
8#ifndef RUNTIME_VM_CONSTANTS_H_
9#error Do not include constants_arm.h directly; use constants.h instead.
10#endif
11
12#include "platform/assert.h"
13#include "platform/globals.h"
14#include "platform/utils.h"
15
16#include "vm/constants_base.h"
17
18namespace dart {
19
20// LR register should not be used directly in handwritten assembly patterns,
21// because it might contain return address. Instead use macross CLOBBERS_LR,
22// SPILLS_RETURN_ADDRESS_FROM_LR_TO_REGISTER,
23// RESTORES_RETURN_ADDRESS_FROM_REGISTER_TO_LR, SPILLS_LR_TO_FRAME,
24// RESTORES_LR_FROM_FRAME, READS_RETURN_ADDRESS_FROM_LR,
25// WRITES_RETURN_ADDRESS_TO_LR to get access to LR constant in a checked way.
26//
27// To prevent accidental use of LR constant we rename it to
28// LR_DO_NOT_USE_DIRECTLY (while keeping the code in this file and other files
29// which are permitted to access LR constant the same by defining LR as
30// LR_DO_NOT_USE_DIRECTLY). You can also use LINK_REGISTER if you need
31// to compare LR register code.
32#define LR LR_DO_NOT_USE_DIRECTLY
33
34#define R(reg) (static_cast<RegList>(1) << (reg))
35
36// We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at
37// a time.
38#if defined(DART_TARGET_OS_ANDROID) || defined(DART_TARGET_OS_LINUX)
39#define VFPv3_D16
40#elif defined(DART_TARGET_OS_MACOS_IOS) || defined(DART_TARGET_OS_WINDOWS)
41#define VFPv3_D32
42#else
43#error Which VFP?
44#endif
45
46// The Linux/Android ABI and the iOS ABI differ in their choice of frame
47// pointer, their treatment of R9, and the interprocedural stack alignment.
48
49// EABI (Linux, Android, Windows)
50// See "Procedure Call Standard for the ARM Architecture".
51// R0-R1: Argument / result / volatile
52// R2-R3: Argument / volatile
53// R4-R10: Preserved
54// R11: Frame pointer
55// R12: Volatile
56// R13: Stack pointer
57// R14: Link register
58// R15: Program counter
59// Stack alignment: 4 bytes always, 8 bytes at public interfaces
60
61// Linux (Debian armhf), Windows and Android also differ in whether floating
62// point arguments are passed in floating point registers. Linux and Windows
63// use hardfp and Android uses softfp. See
64// TargetCPUFeatures::hardfp_supported().
65
66// iOS ABI
67// See "iOS ABI Function Call Guide"
68// R0-R1: Argument / result / volatile
69// R2-R3: Argument / volatile
70// R4-R6: Preserved
71// R7: Frame pointer
72// R8-R11: Preserved
73// R12: Volatile
74// R13: Stack pointer
75// R14: Link register
76// R15: Program counter
77// Stack alignment: 4 bytes always, 4 bytes at public interfaces
78
79// iOS passes floating point arguments in integer registers (softfp)
80
82 R0 = 0,
83 R1 = 1,
84 R2 = 2,
85 R3 = 3,
86 R4 = 4,
87 R5 = 5, // PP
88 R6 = 6, // CODE_REG
89 R7 = 7, // FP on iOS, DISPATCH_TABLE_REG on non-iOS (AOT only)
90 R8 = 8,
91 R9 = 9,
92 R10 = 10, // THR
93 R11 = 11, // FP on non-iOS, DISPATCH_TABLE_REG on iOS (AOT only)
94 R12 = 12, // IP aka TMP
95 R13 = 13, // SP
96 R14 = 14, // LR
97 R15 = 15, // PC
99 kNoRegister = -1, // Signals an illegal register.
100
101// Aliases.
102#if defined(DART_TARGET_OS_MACOS) || defined(DART_TARGET_OS_MACOS_IOS)
103 FP = R7,
104 NOTFP = R11,
105#else
108#endif
111 LR = R14, // Note: direct access to this constant is not allowed. See above.
113};
114
115// Values for single-precision floating point registers.
118 S0 = 0,
119 S1 = 1,
120 S2 = 2,
121 S3 = 3,
122 S4 = 4,
123 S5 = 5,
124 S6 = 6,
125 S7 = 7,
126 S8 = 8,
127 S9 = 9,
128 S10 = 10,
129 S11 = 11,
130 S12 = 12,
131 S13 = 13,
132 S14 = 14,
133 S15 = 15,
134 S16 = 16,
135 S17 = 17,
136 S18 = 18,
137 S19 = 19,
138 S20 = 20,
139 S21 = 21,
140 S22 = 22,
141 S23 = 23,
142 S24 = 24,
143 S25 = 25,
144 S26 = 26,
145 S27 = 27,
146 S28 = 28,
147 S29 = 29,
148 S30 = 30,
149 S31 = 31,
151};
152
153// Values for double-precision floating point registers.
156 D0 = 0,
157 D1 = 1,
158 D2 = 2,
159 D3 = 3,
160 D4 = 4,
161 D5 = 5,
162 D6 = 6,
163 D7 = 7,
164 D8 = 8,
165 D9 = 9,
166 D10 = 10,
167 D11 = 11,
168 D12 = 12,
169 D13 = 13,
170 D14 = 14,
171 D15 = 15,
172#if defined(VFPv3_D16)
174 // Leaving these defined, but marking them as kNoDRegister to avoid polluting
175 // other parts of the code with #ifdef's. Instead, query kNumberOfDRegisters
176 // to see which registers are valid.
193#else
194 D16 = 16,
195 D17 = 17,
196 D18 = 18,
197 D19 = 19,
198 D20 = 20,
199 D21 = 21,
200 D22 = 22,
201 D23 = 23,
202 D24 = 24,
203 D25 = 25,
204 D26 = 26,
205 D27 = 27,
206 D28 = 28,
207 D29 = 29,
208 D30 = 30,
209 D31 = 31,
211#endif
212 // Number of D registers that overlap S registers.
213 // One D register overlaps two S registers, so regardless of the numbers of D
214 // registers, there are only 32 S registers that are overlapped.
216};
217
220 Q0 = 0,
221 Q1 = 1,
222 Q2 = 2,
223 Q3 = 3,
224 Q4 = 4,
225 Q5 = 5,
226 Q6 = 6,
227 Q7 = 7,
228#if defined(VFPv3_D16)
238#else
239 Q8 = 8,
240 Q9 = 9,
241 Q10 = 10,
242 Q11 = 11,
243 Q12 = 12,
244 Q13 = 13,
245 Q14 = 14,
246 Q15 = 15,
248#endif
249 // Number of Q registers that overlap S registers.
250 // One Q register overlaps four S registers, so regardless of the numbers of Q
251 // registers, there are only 32 S registers that are overlapped.
253};
254
256 return static_cast<DRegister>(q * 2);
257}
258
260 return static_cast<DRegister>((q * 2) + 1);
261}
262
264#if defined(VFPv3_D32)
265 // When we have 32 D registers, the S registers only overlap the first 16.
266 // That is, there are only ever 32 S registers in any extension.
267 ASSERT(d < D16);
268#endif
269 return static_cast<SRegister>(d * 2);
270}
271
273#if defined(VFPv3_D32)
274 ASSERT(d < D16);
275#endif
276 return static_cast<SRegister>((d * 2) + 1);
277}
278
280 return static_cast<QRegister>(d / 2);
281}
283 return static_cast<QRegister>(s / 4);
284}
286 return static_cast<DRegister>(s / 2);
287}
288
289// Register aliases for floating point scratch registers.
290const QRegister QTMP = Q7; // Overlaps with DTMP, STMP.
291const DRegister DTMP = EvenDRegisterOf(QTMP); // Overlaps with STMP.
293
294// Architecture independent aliases.
296
298const int kFpuRegisterSize = 16;
302
303extern const char* const cpu_reg_names[kNumberOfCpuRegisters];
304extern const char* const cpu_reg_abi_names[kNumberOfCpuRegisters];
305extern const char* const fpu_reg_names[kNumberOfFpuRegisters];
306extern const char* const fpu_s_reg_names[kNumberOfSRegisters];
307extern const char* const fpu_d_reg_names[kNumberOfDRegisters];
308
309// Register aliases.
310const Register TMP = IP; // Used as scratch register by assembler.
311const Register TMP2 = kNoRegister; // There is no second assembler temporary.
312const Register PP = R5; // Caches object pool pointer in generated code.
313const Register DISPATCH_TABLE_REG = NOTFP; // Dispatch table register.
314const Register SPREG = SP; // Stack pointer register.
315const Register FPREG = FP; // Frame pointer register.
316const Register IC_DATA_REG = R9; // ICData/MegamorphicCache register.
319// Set when calling Dart functions in JIT mode, used by LazyCompileStub.
321const Register THR = R10; // Caches current thread in generated code.
323
324// R15 encodes APSR in the vmrs instruction.
326
327// ABI for catch-clause entry point.
330
331// ABI for write barrier stub.
335
336// Common ABI for shared slow path stubs.
338 static constexpr Register kResultReg = R0;
339};
340
341// ABI for instantiation stubs.
350
351// Registers in addition to those listed in InstantiationABI used inside the
352// implementation of the InstantiateTypeArguments stubs.
354 // The set of registers that must be pushed/popped when probing a hash-based
355 // cache due to overlap with the registers in InstantiationABI.
356 static constexpr intptr_t kSavedRegisters =
357#if defined(DART_PRECOMPILER)
358 (1 << DISPATCH_TABLE_REG) |
359#endif
361
362 // Additional registers used to probe hash-based caches.
363 static constexpr Register kEntryStartReg = R9;
364 static constexpr Register kProbeMaskReg = R4;
368};
369
370// Registers in addition to those listed in TypeTestABI used inside the
371// implementation of type testing stubs that are _not_ preserved.
374 static constexpr Register kScratchReg = R9;
375 static constexpr Register kSubTypeArgumentReg = R3;
377
378 // Must be pushed/popped whenever generic type arguments are being checked as
379 // they overlap with registers in TypeTestABI.
380 static constexpr intptr_t kSavedTypeArgumentRegisters =
382
383 static constexpr intptr_t kInternalRegisters =
384 ((1 << kInstanceTypeArgumentsReg) | (1 << kScratchReg) |
387};
388
389// Registers in addition to those listed in TypeTestABI used inside the
390// implementation of subtype test cache stubs that are _not_ preserved.
393
394 static constexpr intptr_t kInternalRegisters =
396};
397
398// Calling convention when calling TypeTestingStub and SubtypeTestCacheStub.
400 static constexpr Register kInstanceReg = R0;
401 static constexpr Register kDstTypeReg = R8;
404 static constexpr Register kSubtypeTestCacheReg = R3;
405 static constexpr Register kScratchReg = R4;
406
407 // For calls to SubtypeNTestCacheStub. Must not be the same as any non-scratch
408 // register above.
410 // For calls to InstanceOfStub.
412
413 static constexpr intptr_t kPreservedAbiRegisters =
414 (1 << kInstanceReg) | (1 << kDstTypeReg) |
416
417 static constexpr intptr_t kNonPreservedAbiRegisters =
420 (1 << kScratchReg) | (1 << kSubtypeTestCacheResultReg) | (1 << CODE_REG);
421
422 static constexpr intptr_t kAbiRegisters =
424};
425
426// Calling convention when calling AssertSubtypeStub.
428 static constexpr Register kSubTypeReg = R0;
429 static constexpr Register kSuperTypeReg = R8;
432 static constexpr Register kDstNameReg = R3;
433
434 static constexpr intptr_t kAbiRegisters =
435 (1 << kSubTypeReg) | (1 << kSuperTypeReg) |
437 (1 << kDstNameReg);
438
439 // No result register, as AssertSubtype is only run for side effect
440 // (throws if the subtype check fails).
441};
442
443// ABI for InitStaticFieldStub.
445 static constexpr Register kFieldReg = R2;
446 static constexpr Register kResultReg = R0;
447};
448
449// Registers used inside the implementation of InitLateStaticFieldStub.
451 static constexpr Register kAddressReg = R3;
452 static constexpr Register kScratchReg = R4;
453};
454
455// ABI for InitInstanceFieldStub.
457 static constexpr Register kInstanceReg = R1;
458 static constexpr Register kFieldReg = R2;
459 static constexpr Register kResultReg = R0;
460};
461
462// Registers used inside the implementation of InitLateInstanceFieldStub.
464 static constexpr Register kAddressReg = R3;
465 static constexpr Register kScratchReg = R4;
466};
467
468// ABI for LateInitializationError stubs.
470 static constexpr Register kFieldReg = R9;
471};
472
473// ABI for ThrowStub.
474struct ThrowABI {
475 static constexpr Register kExceptionReg = R0;
476};
477
478// ABI for ReThrowStub.
480 static constexpr Register kExceptionReg = R0;
481 static constexpr Register kStackTraceReg = R1;
482};
483
484// ABI for AssertBooleanStub.
486 static constexpr Register kObjectReg = R0;
487};
488
489// ABI for RangeErrorStub.
491 static constexpr Register kLengthReg = R0;
492 static constexpr Register kIndexReg = R1;
493};
494
495// ABI for AllocateObjectStub.
497 static constexpr Register kResultReg = R0;
498 static constexpr Register kTypeArgumentsReg = R3;
499 static constexpr Register kTagsReg = R2;
500};
501
502// ABI for AllocateClosureStub.
505 static constexpr Register kFunctionReg = R1;
506 static constexpr Register kContextReg = R2;
508 static constexpr Register kScratchReg = R4;
509};
510
511// ABI for AllocateMintShared*Stub.
514 static constexpr Register kTempReg = R1;
515};
516
517// ABI for Allocate{Mint,Double,Float32x4,Float64x2}Stub.
520 static constexpr Register kTempReg = R1;
521};
522
523// ABI for AllocateArrayStub.
526 static constexpr Register kLengthReg = R2;
527 static constexpr Register kTypeArgumentsReg = R1;
528};
529
530// ABI for AllocateRecordStub.
533 static constexpr Register kShapeReg = R1;
534 static constexpr Register kTemp1Reg = R2;
535 static constexpr Register kTemp2Reg = R3;
536};
537
538// ABI for AllocateSmallRecordStub (AllocateRecord2, AllocateRecord2Named,
539// AllocateRecord3, AllocateRecord3Named).
542 static constexpr Register kShapeReg = R1;
543 static constexpr Register kValue0Reg = R2;
544 static constexpr Register kValue1Reg = R3;
545 static constexpr Register kValue2Reg = R4;
546 static constexpr Register kTempReg = R9;
547};
548
549// ABI for AllocateTypedDataArrayStub.
554
555// ABI for BoxDoubleStub.
557 static constexpr FpuRegister kValueReg = Q0;
558 static constexpr Register kTempReg = R1;
559 static constexpr Register kResultReg = R0;
560};
561
562// ABI for DoubleToIntegerStub.
564 static constexpr FpuRegister kInputReg = Q0;
565 static constexpr Register kRecognizedKindReg = R0;
566 static constexpr Register kResultReg = R0;
567};
568
569// ABI for SuspendStub (AwaitStub, AwaitWithTypeCheckStub, YieldAsyncStarStub,
570// SuspendSyncStarAtStartStub, SuspendSyncStarAtYieldStub).
572 static constexpr Register kArgumentReg = R0;
573 static constexpr Register kTypeArgsReg = R1; // Can be the same as kTempReg
574 static constexpr Register kTempReg = R1;
575 static constexpr Register kFrameSizeReg = R2;
576 static constexpr Register kSuspendStateReg = R3;
577 static constexpr Register kFunctionDataReg = R4;
578 static constexpr Register kSrcFrameReg = R8;
579 static constexpr Register kDstFrameReg = R9;
580};
581
582// ABI for InitSuspendableFunctionStub (InitAsyncStub, InitAsyncStarStub,
583// InitSyncStarStub).
587
588// ABI for ResumeStub
590 static constexpr Register kSuspendStateReg = R2;
591 static constexpr Register kTempReg = R0;
592 // Registers for the frame copying (the 1st part).
593 static constexpr Register kFrameSizeReg = R1;
594 static constexpr Register kSrcFrameReg = R3;
595 static constexpr Register kDstFrameReg = R4;
596 // Registers for control transfer.
597 // (the 2nd part, can reuse registers from the 1st part)
598 static constexpr Register kResumePcReg = R1;
599 // Can also reuse kSuspendStateReg but should not conflict with CODE_REG/PP.
600 static constexpr Register kExceptionReg = R3;
601 static constexpr Register kStackTraceReg = R4;
602};
603
604// ABI for ReturnStub (ReturnAsyncStub, ReturnAsyncNotFutureStub,
605// ReturnAsyncStarStub).
607 static constexpr Register kSuspendStateReg = R2;
608};
609
610// ABI for AsyncExceptionHandlerStub.
614
615// ABI for CloneSuspendStateStub.
617 static constexpr Register kSourceReg = R0;
618 static constexpr Register kDestinationReg = R1;
619 static constexpr Register kTempReg = R2;
620 static constexpr Register kFrameSizeReg = R3;
621 static constexpr Register kSrcFrameReg = R4;
622 static constexpr Register kDstFrameReg = R8;
623};
624
625// ABI for FfiAsyncCallbackSendStub.
627 static constexpr Register kArgsReg = R0;
628};
629
630// ABI for DispatchTableNullErrorStub and consequently for all dispatch
631// table calls (though normal functions will not expect or use this
632// register). This ABI is added to distinguish memory corruption errors from
633// null errors.
635 static constexpr Register kClassIdReg = R0;
636};
637
638// TODO(regis): Add ABIs for type testing stubs and is-type test stubs instead
639// of reusing the constants of the instantiation stubs ABI.
640
641// List of registers used in load/store multiple.
642typedef uint16_t RegList;
645
646// C++ ABI call registers.
648 (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3);
650#if defined(DART_TARGET_OS_MACOS) || defined(DART_TARGET_OS_MACOS_IOS)
652 (1 << R4) | (1 << R5) | (1 << R6) | (1 << R8) | (1 << R10) | (1 << R11);
653const int kAbiPreservedCpuRegCount = 6;
654#else
655const RegList kAbiPreservedCpuRegs = (1 << R4) | (1 << R5) | (1 << R6) |
656 (1 << R7) | (1 << R8) | (1 << R9) |
657 (1 << R10);
659#endif
663
664const RegList kReservedCpuRegisters = (1 << SPREG) | (1 << FPREG) | (1 << TMP) |
665 (1 << PP) | (1 << THR) | (1 << LR) |
666 (1 << PC) | (1 << NOTFP);
669// CPU registers available to Dart allocator.
671 kAllCpuRegistersList & ~kReservedCpuRegisters;
674// No reason to prefer certain registers on ARM.
675constexpr int kRegisterAllocationBias = 0;
676const intptr_t kStoreBufferWrapperSize = 24;
677// Registers available to Dart that are not preserved by runtime calls.
679 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs;
680#if defined(DART_TARGET_OS_MACOS) || defined(DART_TARGET_OS_MACOS_IOS)
681const int kDartVolatileCpuRegCount = 6;
682#else
684#endif
685
686const RegList kAbiVolatileFpuRegs = R(Q0) | R(Q1) | R(Q2) | R(Q3);
687
691
693 public:
694 static constexpr intptr_t kArgumentRegisters = kAbiArgumentCpuRegs;
696 static constexpr intptr_t kNumArgRegs = 4;
698
699 static constexpr intptr_t kFpuArgumentRegisters = 0;
700
702 static constexpr intptr_t kNumFpuArgRegs = 4;
704 static constexpr intptr_t kNumDFpuArgRegs = 8;
706 static constexpr intptr_t kNumSFpuArgRegs = 16;
707
708 static constexpr bool kArgumentIntRegXorFpuReg = false;
709
711
712 // Whether larger than wordsize arguments are aligned to even registers.
717
718 // How stack arguments are aligned.
723
724 // How fields in compounds are aligned.
725#if defined(DART_TARGET_OS_MACOS_IOS)
726 static constexpr AlignmentStrategy kFieldAlignment =
728#else
730#endif
731
732 // Whether 1 or 2 byte-sized arguments or return values are passed extended
733 // to 4 bytes.
737
738 static constexpr Register kReturnReg = R0;
739 static constexpr Register kSecondReturnReg = R1;
740 static constexpr FpuRegister kReturnFpuReg = Q0;
742
743 // We choose these to avoid overlap between themselves and reserved registers.
748
752};
753
754// Register based calling convention used for Dart functions.
755//
756// See |compiler::ComputeCallingConvention| for more details.
758 static constexpr Register kCpuRegistersForArgs[] = {R1, R2, R3, R8};
759 static constexpr FpuRegister kFpuRegistersForArgs[] = {Q0, Q1, Q2, Q3};
760};
761
762#undef R
763
764// Values for the condition field as defined in section A3.2.
767 EQ = 0, // equal
768 NE = 1, // not equal
769 CS = 2, // carry set/unsigned higher or same
770 CC = 3, // carry clear/unsigned lower
771 MI = 4, // minus/negative
772 PL = 5, // plus/positive or zero
773 VS = 6, // overflow
774 VC = 7, // no overflow
775 HI = 8, // unsigned higher
776 LS = 9, // unsigned lower or same
777 GE = 10, // signed greater than or equal
778 LT = 11, // signed less than
779 GT = 12, // signed greater than
780 LE = 13, // signed less than or equal
781 AL = 14, // always (unconditional)
782 kSpecialCondition = 15, // special condition (refer to section A3.2.1)
784
785 // Platform-independent variants declared for all platforms
800
803
805 COMPILE_ASSERT((EQ ^ NE) == 1);
806 COMPILE_ASSERT((CS ^ CC) == 1);
807 COMPILE_ASSERT((MI ^ PL) == 1);
808 COMPILE_ASSERT((VS ^ VC) == 1);
809 COMPILE_ASSERT((HI ^ LS) == 1);
810 COMPILE_ASSERT((GE ^ LT) == 1);
811 COMPILE_ASSERT((GT ^ LE) == 1);
812 ASSERT(c != AL);
815 return static_cast<Condition>(c ^ 1);
816}
817
818// Opcodes for Data-processing instructions (instructions with a type 0 and 1)
819// as defined in section A3.4
820enum Opcode {
822 AND = 0, // Logical AND
823 EOR = 1, // Logical Exclusive OR
824 SUB = 2, // Subtract
825 RSB = 3, // Reverse Subtract
826 ADD = 4, // Add
827 ADC = 5, // Add with Carry
828 SBC = 6, // Subtract with Carry
829 RSC = 7, // Reverse Subtract with Carry
830 TST = 8, // Test
831 TEQ = 9, // Test Equivalence
832 CMP = 10, // Compare
833 CMN = 11, // Compare Negated
834 ORR = 12, // Logical (inclusive) OR
835 MOV = 13, // Move
836 BIC = 14, // Bit Clear
837 MVN = 15, // Move Not
838 kMaxOperand = 16
840
841// Shifter types for Data-processing operands as defined in section A5.1.2.
842enum Shift {
844 LSL = 0, // Logical shift left
845 LSR = 1, // Logical shift right
846 ASR = 2, // Arithmetic shift right
847 ROR = 3, // Rotate right
848 kMaxShift = 4
850
851// Constants used for the decoding or encoding of the individual fields of
852// instructions. Based on the "Figure 3-1 ARM instruction set summary".
874
875 // Immediate instruction fields encoding.
880
881 // Shift instruction register fields encodings.
887
888 // Load/store instruction offset field encoding.
891 kOffset12Mask = 0x00000fff,
892
893 // Mul instruction register field encodings.
898
899 // ldrex/strex register field encodings.
905
906 // Media operation field encodings.
911
912 // udiv/sdiv instruction register field encodings.
919
920 // sbfx/ubfx instruction register and immediate field encodings.
927
928 // MRC instruction offset field encoding.
939
940 kBranchOffsetMask = 0x00ffffff
942
949// Don't use (dart::)kWordSizeLog2, as this needs to work for crossword as
950// well. If this is included, we know the target is 32 bit.
951#if defined(TARGET_ARCH_IS_32_BIT)
952 // Used for Smi-boxed indices.
953 TIMES_HALF_WORD_SIZE = kInt32SizeLog2 - 1,
954 // Used for unboxed indices.
955 TIMES_WORD_SIZE = kInt32SizeLog2,
956#else
957#error "Unexpected word size"
958#endif
959#if !defined(DART_COMPRESSED_POINTERS)
960 TIMES_COMPRESSED_WORD_SIZE = TIMES_WORD_SIZE,
961#else
962#error Cannot compress ARM32
963#endif
964 // Used for Smi-boxed indices.
966};
967
968// The class Instr enables access to individual fields defined in the ARM
969// architecture instruction set encoding as described in figure A3-1.
970//
971// Example: Test whether the instruction at ptr sets the condition code bits.
972//
973// bool InstructionSetsConditionCodes(byte* ptr) {
974// Instr* instr = Instr::At(ptr);
975// int type = instr->TypeField();
976// return ((type == 0) || (type == 1)) && instr->HasS();
977// }
978//
979class Instr {
980 public:
982
983 static constexpr int32_t kNopInstruction = // nop
984 ((AL << kConditionShift) | (0x32 << 20) | (0xf << 12));
985
986 static constexpr int32_t kBreakPointCode = 0xdeb0; // For breakpoint.
987 static constexpr int32_t kSimulatorBreakCode =
988 0xdeb2; // For breakpoint in sim.
989 static constexpr int32_t kSimulatorRedirectCode = 0xca11; // For redirection.
990
991 // Breakpoint instruction filling assembler code buffers in debug mode.
992 static constexpr int32_t kBreakPointInstruction = // bkpt(0xdeb0)
993 ((AL << kConditionShift) | (0x12 << 20) | (0xdeb << 8) | (0x7 << 4));
994
995 // Breakpoint instruction used by the simulator.
996 // Should be distinct from kBreakPointInstruction and from a typical user
997 // breakpoint inserted in generated code for debugging, e.g. bkpt(0).
998 static constexpr int32_t kSimulatorBreakpointInstruction =
999 // svc #kBreakpointSvcCode
1000 ((AL << kConditionShift) | (0xf << 24) | kSimulatorBreakCode);
1001
1002 // Runtime call redirection instruction used by the simulator.
1003 static constexpr int32_t kSimulatorRedirectInstruction =
1004 ((AL << kConditionShift) | (0xf << 24) | kSimulatorRedirectCode);
1005
1006 // Get the raw instruction bits.
1007 inline int32_t InstructionBits() const {
1008 return *reinterpret_cast<const int32_t*>(this);
1009 }
1010
1011 // Set the raw instruction bits to value.
1012 inline void SetInstructionBits(int32_t value) {
1013 *reinterpret_cast<int32_t*>(this) = value;
1014 }
1015
1016 // Read one particular bit out of the instruction bits.
1017 inline int Bit(int nr) const { return (InstructionBits() >> nr) & 1; }
1018
1019 // Read a bit field out of the instruction bits.
1020 inline int Bits(int shift, int count) const {
1021 return (InstructionBits() >> shift) & ((1 << count) - 1);
1022 }
1023
1024 // Accessors for the different named fields used in the ARM encoding.
1025 // The naming of these accessor corresponds to figure A3-1.
1026 // Generally applicable fields
1027 inline Condition ConditionField() const {
1028 return static_cast<Condition>(Bits(kConditionShift, kConditionBits));
1029 }
1030 inline int TypeField() const { return Bits(kTypeShift, kTypeBits); }
1031 inline int SubtypeField() const { return Bit(4); }
1032
1033 inline Register RnField() const {
1034 return static_cast<Register>(Bits(kRnShift, kRnBits));
1035 }
1036 inline Register RdField() const {
1037 return static_cast<Register>(Bits(kRdShift, kRdBits));
1038 }
1039
1040 // Fields used in Data processing instructions
1041 inline Opcode OpcodeField() const {
1042 return static_cast<Opcode>(Bits(kOpcodeShift, kOpcodeBits));
1043 }
1044 inline int SField() const { return Bits(kSShift, kSBits); }
1045 // with register
1046 inline Register RmField() const {
1047 return static_cast<Register>(Bits(kRmShift, kRmBits));
1048 }
1049 inline Shift ShiftField() const {
1050 return static_cast<Shift>(Bits(kShiftShift, kShiftBits));
1051 }
1052 inline int RegShiftField() const { return Bit(4); }
1053 inline Register RsField() const {
1054 return static_cast<Register>(Bits(kRsShift, kRsBits));
1055 }
1056 inline int ShiftAmountField() const {
1058 }
1059 // with immediate
1060 inline int RotateField() const { return Bits(kRotateShift, kRotateBits); }
1061 inline int Immed8Field() const { return Bits(kImmed8Shift, kImmed8Bits); }
1062
1063 // Fields used in Load/Store instructions
1064 inline int PUField() const { return Bits(23, 2); }
1065 inline int BField() const { return Bit(22); }
1066 inline int WField() const { return Bit(21); }
1067 inline int LField() const { return Bit(20); }
1068 // with register uses same fields as Data processing instructions above
1069 // with immediate
1070 inline int Offset12Field() const {
1072 }
1073 // multiple
1074 inline int RlistField() const { return Bits(0, 16); }
1075 // extra loads and stores
1076 inline int SignField() const { return Bit(6); }
1077 inline int HField() const { return Bit(5); }
1078 inline int ImmedHField() const { return Bits(8, 4); }
1079 inline int ImmedLField() const { return Bits(0, 4); }
1080
1081 // Fields used in Branch instructions
1082 inline int LinkField() const { return Bits(kLinkShift, kLinkBits); }
1083 inline int32_t SImmed24Field() const {
1084 uint32_t bits = InstructionBits();
1085 return static_cast<int32_t>(bits << 8) >> 8;
1086 }
1087
1088 // Fields used in Supervisor Call instructions
1089 inline uint32_t SvcField() const { return Bits(0, 24); }
1090
1091 // Field used in Breakpoint instruction
1092 inline uint16_t BkptField() const {
1093 return ((Bits(8, 12) << 4) | Bits(0, 4));
1094 }
1095
1096 // Field used in 16-bit immediate move instructions
1097 inline uint16_t MovwField() const {
1098 return ((Bits(16, 4) << 12) | Bits(0, 12));
1099 }
1100
1101 // Field used in VFP float immediate move instruction
1102 inline float ImmFloatField() const {
1103 uint32_t imm32 = (Bit(19) << 31) | (((1 << 5) - Bit(18)) << 25) |
1104 (Bits(16, 2) << 23) | (Bits(0, 4) << 19);
1105 return bit_cast<float, uint32_t>(imm32);
1106 }
1107
1108 // Field used in VFP double immediate move instruction
1109 inline double ImmDoubleField() const {
1110 uint64_t imm64 = (Bit(19) * (1LL << 63)) | (((1LL << 8) - Bit(18)) << 54) |
1111 (Bits(16, 2) * (1LL << 52)) | (Bits(0, 4) * (1LL << 48));
1112 return bit_cast<double, uint64_t>(imm64);
1113 }
1114
1115 // Shared fields used in media instructions.
1116 inline int MediaOp1Field() const {
1117 return static_cast<Register>(Bits(kMediaOp1Shift, kMediaOp1Bits));
1118 }
1119 inline int MediaOp2Field() const {
1120 return static_cast<Register>(Bits(kMediaOp2Shift, kMediaOp2Bits));
1121 }
1122
1123 // Fields used in division instructions.
1124 inline bool IsDivUnsigned() const { return Bit(21) == 0b1; }
1125 inline Register DivRdField() const {
1126 return static_cast<Register>(Bits(kDivRdShift, kDivRdBits));
1127 }
1128 inline Register DivRmField() const {
1129 return static_cast<Register>(Bits(kDivRmShift, kDivRmBits));
1130 }
1131 inline Register DivRnField() const {
1132 return static_cast<Register>(Bits(kDivRnShift, kDivRnBits));
1133 }
1134
1135 // Fields used in bit field extract instructions.
1136 inline bool IsBitFieldExtractSignExtended() const { return Bit(22) == 0; }
1144 return static_cast<Register>(
1146 }
1147
1148 // Test for data processing instructions of type 0 or 1.
1149 // See "ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition",
1150 // section A5.1 "ARM instruction set encoding".
1151 inline bool IsDataProcessing() const {
1153 ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
1154 return ((Bits(20, 5) & 0x19) != 0x10) &&
1155 ((Bit(25) == 1) || // Data processing immediate.
1156 (Bit(4) == 0) || // Data processing register.
1157 (Bit(7) == 0)); // Data processing register-shifted register.
1158 }
1159
1160 // Tests for special encodings of type 0 instructions (extra loads and stores,
1161 // as well as multiplications, synchronization primitives, and miscellaneous).
1162 // Can only be called for a type 0 or 1 instruction.
1163 inline bool IsMiscellaneous() const {
1164 ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
1165 return ((Bit(25) == 0) && ((Bits(20, 5) & 0x19) == 0x10) && (Bit(7) == 0));
1166 }
1167 inline bool IsMultiplyOrSyncPrimitive() const {
1168 ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
1169 return ((Bit(25) == 0) && (Bits(4, 4) == 9));
1170 }
1171
1172 // Test for Supervisor Call instruction.
1173 inline bool IsSvc() const {
1174 return ((InstructionBits() & 0x0f000000) == 0x0f000000);
1175 }
1176
1177 // Test for Breakpoint instruction.
1178 inline bool IsBkpt() const {
1179 return ((InstructionBits() & 0x0ff000f0) == 0x01200070);
1180 }
1181
1182 // VFP register fields.
1183 inline SRegister SnField() const {
1184 return static_cast<SRegister>((Bits(kRnShift, kRnBits) << 1) + Bit(7));
1185 }
1186 inline SRegister SdField() const {
1187 return static_cast<SRegister>((Bits(kRdShift, kRdBits) << 1) + Bit(22));
1188 }
1189 inline SRegister SmField() const {
1190 return static_cast<SRegister>((Bits(kRmShift, kRmBits) << 1) + Bit(5));
1191 }
1192 inline DRegister DnField() const {
1193 return static_cast<DRegister>(Bits(kRnShift, kRnBits) + (Bit(7) << 4));
1194 }
1195 inline DRegister DdField() const {
1196 return static_cast<DRegister>(Bits(kRdShift, kRdBits) + (Bit(22) << 4));
1197 }
1198 inline DRegister DmField() const {
1199 return static_cast<DRegister>(Bits(kRmShift, kRmBits) + (Bit(5) << 4));
1200 }
1201 inline QRegister QnField() const {
1202 const intptr_t bits = Bits(kRnShift, kRnBits) + (Bit(7) << 4);
1203 return static_cast<QRegister>(bits >> 1);
1204 }
1205 inline QRegister QdField() const {
1206 const intptr_t bits = Bits(kRdShift, kRdBits) + (Bit(22) << 4);
1207 return static_cast<QRegister>(bits >> 1);
1208 }
1209 inline QRegister QmField() const {
1210 const intptr_t bits = Bits(kRmShift, kRmBits) + (Bit(5) << 4);
1211 return static_cast<QRegister>(bits >> 1);
1212 }
1213
1214 // Test for VFP data processing or single transfer instructions of type 7.
1217 ASSERT(TypeField() == 7);
1218 return ((Bit(24) == 0) && (Bits(9, 3) == 5));
1219 // Bit(4) == 0: Data Processing
1220 // Bit(4) == 1: 8, 16, or 32-bit Transfer between ARM Core and VFP
1221 }
1222
1223 // Test for VFP 64-bit transfer instructions of type 6.
1224 inline bool IsVFPDoubleTransfer() const {
1226 ASSERT(TypeField() == 6);
1227 return ((Bits(21, 4) == 2) && (Bits(9, 3) == 5) &&
1228 ((Bits(4, 4) & 0xd) == 1));
1229 }
1230
1231 // Test for VFP load and store instructions of type 6.
1232 inline bool IsVFPLoadStore() const {
1234 ASSERT(TypeField() == 6);
1235 return ((Bits(20, 5) & 0x12) == 0x10) && (Bits(9, 3) == 5);
1236 }
1237
1238 // Test for VFP multiple load and store instructions of type 6.
1239 inline bool IsVFPMultipleLoadStore() const {
1241 ASSERT(TypeField() == 6);
1242 int32_t puw = (PUField() << 1) | Bit(21); // don't care about D bit
1243 return (Bits(9, 3) == 5) && ((puw == 2) || (puw == 3) || (puw == 5));
1244 }
1245
1246 inline bool IsSIMDDataProcessing() const {
1248 return (Bits(25, 3) == 1);
1249 }
1250
1251 inline bool IsSIMDLoadStore() const {
1253 return (Bits(24, 4) == 4) && (Bit(20) == 0);
1254 }
1255
1256 // Tests for media instructions of type 3.
1257 inline bool IsMedia() const {
1258 ASSERT_EQUAL(TypeField(), 3);
1259 return SubtypeField() == 1;
1260 }
1261
1262 inline bool IsDivision() const {
1264 ASSERT(IsMedia());
1265 // B21 determines whether the division is signed or unsigned.
1266 return (((MediaOp1Field() & 0b11101) == 0b10001) &&
1267 (MediaOp2Field() == 0b000));
1268 }
1269
1270 inline bool IsRbit() const {
1272 ASSERT(IsMedia());
1273 // B19-B16 and B11-B8 are always set for rbit.
1274 return ((MediaOp1Field() == 0b01111) && (MediaOp2Field() == 0b001) &&
1275 (Bits(8, 4) == 0b1111) && (Bits(16, 4) == 0b1111));
1276 }
1277
1278 inline bool IsBitFieldExtract() const {
1280 ASSERT(IsMedia());
1281 // B22 determines whether extracted value is sign extended or not, and
1282 // op bits B20 and B7 are part of the width and LSB fields, respectively.
1283 return ((MediaOp1Field() & 0b11010) == 0b11010) &&
1284 ((MediaOp2Field() & 0b011) == 0b10);
1285 }
1286
1287 // Special accessors that test for existence of a value.
1288 inline bool HasS() const { return SField() == 1; }
1289 inline bool HasB() const { return BField() == 1; }
1290 inline bool HasW() const { return WField() == 1; }
1291 inline bool HasL() const { return LField() == 1; }
1292 inline bool HasSign() const { return SignField() == 1; }
1293 inline bool HasH() const { return HField() == 1; }
1294 inline bool HasLink() const { return LinkField() == 1; }
1295
1296 // Instructions are read out of a code stream. The only way to get a
1297 // reference to an instruction is to convert a pointer. There is no way
1298 // to allocate or create instances of class Instr.
1299 // Use the At(pc) function to create references to Instr.
1300 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
1301
1302 private:
1303 DISALLOW_ALLOCATION();
1305};
1306
1307// Floating-point reciprocal estimate and step (see pages A2-85 and A2-86 of
1308// ARM Architecture Reference Manual ARMv7-A edition).
1309float ReciprocalEstimate(float op);
1310float ReciprocalStep(float op1, float op2);
1311
1312// Floating-point reciprocal square root estimate and step (see pages A2-87 to
1313// A2-90 of ARM Architecture Reference Manual ARMv7-A edition).
1315float ReciprocalSqrtStep(float op1, float op2);
1316
1317constexpr uword kBreakInstructionFiller = 0xE1200070; // bkpt #0
1318constexpr uword kDataMemoryBarrier = 0xf57ff050 | 0xb; // dmb ish
1319
1321 const int32_t code = LR;
1322};
1323
1325 return r == LR;
1326}
1327
1328constexpr bool operator!=(Register r, LinkRegister lr) {
1329 return !(r == lr);
1330}
1331
1333 return LR;
1334}
1335
1336#undef LR
1337
1338#define LINK_REGISTER (LinkRegister())
1339
1340// Prioritize code size over performance.
1341const intptr_t kPreferredLoopAlignment = 1;
1342
1343} // namespace dart
1344
1345#endif // RUNTIME_VM_CONSTANTS_ARM_H_
int count
#define ASSERT_EQUAL(expected, actual)
Definition assert.h:309
#define COMPILE_ASSERT(expr)
Definition assert.h:339
static constexpr ExtensionStrategy kArgumentStackExtension
static constexpr Register kSecondReturnReg
static constexpr intptr_t kCalleeSaveCpuRegisters
static constexpr AlignmentStrategy kArgumentRegisterAlignmentVarArgs
static constexpr AlignmentStrategy kFieldAlignment
static const FpuRegister FpuArgumentRegisters[]
static const Register ArgumentRegisters[]
static constexpr bool kArgumentIntRegXorFpuReg
static constexpr intptr_t kNumDFpuArgRegs
static const DRegister FpuDArgumentRegisters[]
static constexpr intptr_t kFpuArgumentRegisters
static constexpr intptr_t kNumSFpuArgRegs
static const SRegister FpuSArgumentRegisters[]
static constexpr FpuRegister kReturnFpuReg
static constexpr intptr_t kNumFpuArgRegs
static constexpr Register kPointerToReturnStructRegisterCall
static constexpr Register kFirstNonArgumentRegister
static constexpr Register kFfiAnyNonAbiRegister
static constexpr AlignmentStrategy kArgumentStackAlignmentVarArgs
static constexpr Register kPointerToReturnStructRegisterReturn
static constexpr AlignmentStrategy kArgumentRegisterAlignment
static constexpr ExtensionStrategy kReturnRegisterExtension
COMPILE_ASSERT(((R(kFirstNonArgumentRegister)|R(kSecondNonArgumentRegister)) &(kArgumentRegisters|R(kPointerToReturnStructRegisterCall)))==0)
static constexpr Register kStackPointerRegister
static constexpr Register kReturnReg
static constexpr intptr_t kArgumentRegisters
static constexpr Register kSecondNonArgumentRegister
static constexpr ExtensionStrategy kArgumentRegisterExtension
static constexpr intptr_t kNumArgRegs
static constexpr AlignmentStrategy kArgumentStackAlignment
static Instr * At(uword pc)
Register RnField() const
bool IsMedia() const
Register BitFieldExtractRnField() const
bool IsDataProcessing() const
bool HasS() const
static constexpr int32_t kSimulatorBreakCode
int WField() const
Opcode OpcodeField() const
float ImmFloatField() const
int ShiftAmountField() const
bool IsSIMDLoadStore() const
bool HasSign() const
SRegister SmField() const
bool IsBkpt() const
int RotateField() const
bool IsBitFieldExtractSignExtended() const
SRegister SnField() const
uint8_t BitFieldExtractWidthField() const
QRegister QmField() const
int HField() const
Register DivRdField() const
Register DivRnField() const
int LField() const
static constexpr int32_t kSimulatorBreakpointInstruction
Register RmField() const
bool IsVFPDataProcessingOrSingleTransfer() const
Register RsField() const
uint16_t MovwField() const
int RlistField() const
void SetInstructionBits(int32_t value)
bool HasLink() const
static constexpr int32_t kBreakPointInstruction
bool HasB() const
int Bit(int nr) const
bool HasH() const
int ImmedHField() const
int32_t InstructionBits() const
int MediaOp1Field() const
int ImmedLField() const
bool IsBitFieldExtract() const
uint16_t BkptField() const
int BField() const
bool IsMultiplyOrSyncPrimitive() const
int Immed8Field() const
int RegShiftField() const
int Offset12Field() const
int PUField() const
double ImmDoubleField() const
QRegister QnField() const
bool IsDivision() const
bool IsRbit() const
bool IsMiscellaneous() const
bool IsSIMDDataProcessing() const
Condition ConditionField() const
Register DivRmField() const
bool IsVFPDoubleTransfer() const
bool IsVFPMultipleLoadStore() const
bool HasL() const
DRegister DmField() const
int SignField() const
static constexpr int32_t kNopInstruction
SRegister SdField() const
Register RdField() const
int TypeField() const
bool HasW() const
uint32_t SvcField() const
QRegister QdField() const
static constexpr int32_t kSimulatorRedirectCode
bool IsVFPLoadStore() const
DRegister DnField() const
int SubtypeField() const
bool IsSvc() const
bool IsDivUnsigned() const
static constexpr int32_t kBreakPointCode
Shift ShiftField() const
int LinkField() const
DRegister DdField() const
static constexpr int32_t kSimulatorRedirectInstruction
uint8_t BitFieldExtractLSBField() const
int SField() const
int MediaOp2Field() const
int Bits(int shift, int count) const
int32_t SImmed24Field() const
static constexpr int CountOneBits32(uint32_t x)
Definition utils.h:145
#define ASSERT(E)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition main.cc:19
struct MyStruct s
uint8_t value
#define R(r)
V< 8, uint16_t > Q15
ExtensionStrategy
@ kExtendedTo4
const QRegister kAbiLastPreservedFpuReg
const FpuRegister kNoFpuRegister
float ReciprocalSqrtEstimate(float op)
const Register kWriteBarrierSlotReg
constexpr bool operator!=(Register r, LinkRegister lr)
@ TIMES_COMPRESSED_HALF_WORD_SIZE
@ TIMES_COMPRESSED_WORD_SIZE
const Register THR
const int kDartVolatileCpuRegCount
static DRegister EvenDRegisterOf(QRegister q)
static Condition InvertCondition(Condition c)
const RegList kAbiVolatileCpuRegs
const Register kExceptionObjectReg
static DRegister OddDRegisterOf(QRegister q)
const DRegister DTMP
const RegList kReservedCpuRegisters
const Register kWriteBarrierObjectReg
const RegList kAllFpuRegistersList
float ReciprocalStep(float op1, float op2)
const Register kWriteBarrierValueReg
@ kMaxOperand
uint16_t RegList
const char *const fpu_reg_names[kNumberOfFpuRegisters]
constexpr intptr_t kInt32SizeLog2
Definition globals.h:449
Register ConcreteRegister(LinkRegister)
const FpuRegister FpuTMP
const Register CALLEE_SAVED_TEMP
uintptr_t uword
Definition globals.h:501
const SRegister STMP DART_USED
const Register CODE_REG
static SRegister OddSRegisterOf(DRegister d)
static DRegister DRegisterOf(SRegister s)
constexpr uword kBreakInstructionFiller
@ kNoCondition
@ GREATER_EQUAL
@ UNSIGNED_GREATER
@ kInvalidCondition
@ UNSIGNED_GREATER_EQUAL
@ kSpecialCondition
@ NO_OVERFLOW
@ UNSIGNED_LESS
@ kNumberOfConditions
@ UNSIGNED_LESS_EQUAL
const Register TMP2
const Register ARGS_DESC_REG
const Register DISPATCH_TABLE_REG
@ kNumberOfCpuRegisters
@ kNoRegister
const int kNumberOfFpuRegisters
const RegList kAbiPreservedCpuRegs
constexpr uword kDataMemoryBarrier
constexpr bool operator==(Register r, LinkRegister)
constexpr RegList kDartAvailableCpuRegs
const Register TMP
const int kAbiPreservedCpuRegCount
const RegList kDartVolatileCpuRegs
const Register FPREG
InstructionFields
@ kBitFieldExtractLSBBits
@ kShiftImmShift
@ kConditionShift
@ kConditionBits
@ kMediaOp1Shift
@ kOffset12Bits
@ kBranchOffsetMask
@ kRotateBits
@ kDivRmShift
@ kShiftImmBits
@ kMulRnShift
@ kBitFieldExtractWidthBits
@ kMediaOp2Shift
@ kLdrExRnShift
@ kLdrExRtShift
@ kBitFieldExtractLSBShift
@ kStrExRnShift
@ kImmed8Shift
@ kMediaOp1Bits
@ kImmed8Bits
@ kCoprocShift
@ kStrExRtShift
@ kOffset12Mask
@ kMediaOp2Bits
@ kStrExRdShift
@ kDivRnShift
@ kBitFieldExtractWidthShift
@ kOpcodeBits
@ kRotateShift
@ kBitFieldExtractRnShift
@ kOffset12Shift
@ kMulRdShift
@ kDivRdShift
@ kShiftRegisterShift
@ kCoprocBits
@ kShiftShift
@ kOpcodeShift
@ kBitFieldExtractRnBits
const RegList kFpuRegistersWithoutSOverlap
const intptr_t kStoreBufferWrapperSize
const int kAbiPreservedFpuRegCount
constexpr int kRegisterAllocationBias
static QRegister QRegisterOf(DRegister d)
const QRegister QTMP
const char *const fpu_d_reg_names[kNumberOfDRegisters]
const Register FUNCTION_REG
@ kNoSRegister
@ kNumberOfSRegisters
constexpr intptr_t kNumberOfReservedCpuRegisters
const Register IC_DATA_REG
const char *const cpu_reg_names[kNumberOfCpuRegisters]
float ReciprocalSqrtStep(float op1, float op2)
const Register PP
const RegList kAbiArgumentCpuRegs
QRegister FpuRegister
@ kNoQRegister
@ kNumberOfQRegisters
@ kNumberOfOverlappingQRegisters
@ kNumberOfDRegisters
@ kNoDRegister
@ kNumberOfOverlappingDRegisters
const Register APSR
const Register kStackTraceObjectReg
const RegList kAllCpuRegistersList
const intptr_t kPreferredLoopAlignment
simd128_value_t fpu_register_t
float ReciprocalEstimate(float op)
const char *const fpu_s_reg_names[kNumberOfSRegisters]
const RegList kAbiVolatileFpuRegs
const Register SPREG
AlignmentStrategy
@ kAlignedToWordSizeAndValueSize
@ kAlignedToValueSizeBut8AlignedTo4
@ kAlignedToValueSize
const char *const cpu_reg_abi_names[kNumberOfCpuRegisters]
const int kFpuRegisterSize
static SRegister EvenSRegisterOf(DRegister d)
constexpr int kNumberOfDartAvailableCpuRegs
const QRegister kAbiFirstPreservedFpuReg
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
Definition globals.h:593
static constexpr Register kResultReg
static constexpr Register kLengthReg
static constexpr Register kTypeArgumentsReg
static constexpr Register kResultReg
static constexpr Register kTempReg
static constexpr Register kFunctionReg
static constexpr Register kContextReg
static constexpr Register kResultReg
static constexpr Register kInstantiatorTypeArgsReg
static constexpr Register kScratchReg
static constexpr Register kResultReg
static constexpr Register kTempReg
static constexpr Register kTypeArgumentsReg
static constexpr Register kResultReg
static constexpr Register kTagsReg
static constexpr Register kShapeReg
static constexpr Register kResultReg
static constexpr Register kTemp1Reg
static constexpr Register kTemp2Reg
static constexpr Register kResultReg
static constexpr Register kShapeReg
static constexpr Register kValue2Reg
static constexpr Register kValue0Reg
static constexpr Register kTempReg
static constexpr Register kValue1Reg
static constexpr Register kLengthReg
static constexpr Register kResultReg
static constexpr Register kObjectReg
static constexpr Register kSubTypeReg
static constexpr Register kSuperTypeReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr intptr_t kAbiRegisters
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr Register kDstNameReg
static constexpr Register kSuspendStateReg
static constexpr Register kTempReg
static constexpr Register kResultReg
static constexpr FpuRegister kValueReg
static constexpr Register kDestinationReg
static constexpr Register kSrcFrameReg
static constexpr Register kFrameSizeReg
static constexpr Register kSourceReg
static constexpr Register kTempReg
static constexpr Register kDstFrameReg
static constexpr Register kCpuRegistersForArgs[]
static constexpr FpuRegister kFpuRegistersForArgs[]
static constexpr Register kClassIdReg
static constexpr Register kResultReg
static constexpr Register kRecognizedKindReg
static constexpr FpuRegister kInputReg
static constexpr Register kArgsReg
static constexpr Register kFieldReg
static constexpr Register kResultReg
static constexpr Register kInstanceReg
static constexpr Register kAddressReg
static constexpr Register kScratchReg
static constexpr Register kAddressReg
static constexpr Register kScratchReg
static constexpr Register kResultReg
static constexpr Register kFieldReg
static constexpr Register kTypeArgsReg
static constexpr Register kEntryStartReg
static constexpr intptr_t kSavedRegisters
static constexpr Register kCurrentEntryIndexReg
static constexpr Register kProbeMaskReg
static constexpr Register kProbeDistanceReg
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr Register kScratchReg
static constexpr Register kResultTypeReg
static constexpr Register kUninstantiatedTypeArgumentsReg
static constexpr Register kResultTypeArgumentsReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr Register kFieldReg
static constexpr Register kLengthReg
static constexpr Register kIndexReg
static constexpr Register kStackTraceReg
static constexpr Register kExceptionReg
static constexpr Register kSrcFrameReg
static constexpr Register kDstFrameReg
static constexpr Register kFrameSizeReg
static constexpr Register kSuspendStateReg
static constexpr Register kExceptionReg
static constexpr Register kTempReg
static constexpr Register kResumePcReg
static constexpr Register kStackTraceReg
static constexpr Register kSuspendStateReg
static constexpr intptr_t kInternalRegisters
static constexpr Register kInstanceCidOrSignatureReg
static constexpr Register kResultReg
static constexpr Register kSrcFrameReg
static constexpr Register kFunctionDataReg
static constexpr Register kSuspendStateReg
static constexpr Register kTempReg
static constexpr Register kArgumentReg
static constexpr Register kDstFrameReg
static constexpr Register kTypeArgsReg
static constexpr Register kFrameSizeReg
static constexpr intptr_t kInternalRegisters
static constexpr intptr_t kSavedTypeArgumentRegisters
static constexpr Register kSuperTypeArgumentReg
static constexpr Register kSubTypeArgumentReg
static constexpr Register kInstanceTypeArgumentsReg
static constexpr Register kScratchReg
static constexpr Register kExceptionReg
static constexpr Register kSubtypeTestCacheReg
static constexpr Register kDstTypeReg
static constexpr Register kInstanceReg
static constexpr Register kFunctionTypeArgumentsReg
static constexpr Register kInstantiatorTypeArgumentsReg
static constexpr intptr_t kNonPreservedAbiRegisters
static constexpr Register kSubtypeTestCacheResultReg
static constexpr intptr_t kPreservedAbiRegisters
static constexpr Register kScratchReg
static constexpr intptr_t kAbiRegisters
static constexpr Register kInstanceOfResultReg