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

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

Issue 2120703002: DBC: Enables unboxed doubles (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Rename BoxDouble -> WriteIntoDouble Created 4 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
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/deopt_instructions.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_DEOPT_INSTRUCTIONS_H_ 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_
6 #define VM_DEOPT_INSTRUCTIONS_H_ 6 #define VM_DEOPT_INSTRUCTIONS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // On DBC registers and stack slots are the same. 79 // On DBC registers and stack slots are the same.
80 const intptr_t stack_index = num_args_ + kDartFrameFixedSize + reg; 80 const intptr_t stack_index = num_args_ + kDartFrameFixedSize + reg;
81 return *GetSourceFrameAddressAt(stack_index); 81 return *GetSourceFrameAddressAt(stack_index);
82 #endif // !defined(TARGET_ARCH_DBC) 82 #endif // !defined(TARGET_ARCH_DBC)
83 } 83 }
84 84
85 double FpuRegisterValue(FpuRegister reg) const { 85 double FpuRegisterValue(FpuRegister reg) const {
86 ASSERT(FlowGraphCompiler::SupportsUnboxedDoubles()); 86 ASSERT(FlowGraphCompiler::SupportsUnboxedDoubles());
87 ASSERT(fpu_registers_ != NULL); 87 ASSERT(fpu_registers_ != NULL);
88 ASSERT(reg >= 0); 88 ASSERT(reg >= 0);
89 #if !defined(TARGET_ARCH_DBC)
89 ASSERT(reg < kNumberOfFpuRegisters); 90 ASSERT(reg < kNumberOfFpuRegisters);
90 return *reinterpret_cast<double*>(&fpu_registers_[reg]); 91 return *reinterpret_cast<double*>(&fpu_registers_[reg]);
92 #else
93 // On DBC registers and stack slots are the same.
94 const intptr_t stack_index = num_args_ + kDartFrameFixedSize + reg;
95 return *reinterpret_cast<double*>(GetSourceFrameAddressAt(stack_index));
96 #endif
91 } 97 }
92 98
93 simd128_value_t FpuRegisterValueAsSimd128(FpuRegister reg) const { 99 simd128_value_t FpuRegisterValueAsSimd128(FpuRegister reg) const {
94 ASSERT(FlowGraphCompiler::SupportsUnboxedSimd128()); 100 ASSERT(FlowGraphCompiler::SupportsUnboxedSimd128());
95 ASSERT(fpu_registers_ != NULL); 101 ASSERT(fpu_registers_ != NULL);
96 ASSERT(reg >= 0); 102 ASSERT(reg >= 0);
97 ASSERT(reg < kNumberOfFpuRegisters); 103 ASSERT(reg < kNumberOfFpuRegisters);
98 const float* address = reinterpret_cast<float*>(&fpu_registers_[reg]); 104 const float* address = reinterpret_cast<float*>(&fpu_registers_[reg]);
99 return simd128_value_t().readFrom(address); 105 return simd128_value_t().readFrom(address);
100 } 106 }
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 public BitField<intptr_t, ICData::DeoptReasonId, 0, 8> { }; 599 public BitField<intptr_t, ICData::DeoptReasonId, 0, 8> { };
594 class FlagsField : public BitField<intptr_t, uint32_t, 8, 8> { }; 600 class FlagsField : public BitField<intptr_t, uint32_t, 8, 8> { };
595 601
596 private: 602 private:
597 static const intptr_t kEntrySize = 3; 603 static const intptr_t kEntrySize = 3;
598 }; 604 };
599 605
600 } // namespace dart 606 } // namespace dart
601 607
602 #endif // VM_DEOPT_INSTRUCTIONS_H_ 608 #endif // VM_DEOPT_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/deopt_instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698