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

Unified Diff: runtime/vm/deopt_instructions.h

Issue 252333002: Use GPRs for mints (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/deopt_instructions.h
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h
index 551d04302ba0761eea836b5496bb4b16cb785f36..23a5e970c614a6566aa28d6b6d14f4184447b18d 100644
--- a/runtime/vm/deopt_instructions.h
+++ b/runtime/vm/deopt_instructions.h
@@ -58,21 +58,29 @@ class DeoptContext {
intptr_t RegisterValue(Register reg) const {
ASSERT(cpu_registers_ != NULL);
+ ASSERT(reg >= 0);
+ ASSERT(reg < kNumberOfCpuRegisters);
return cpu_registers_[reg];
}
double FpuRegisterValue(FpuRegister reg) const {
ASSERT(fpu_registers_ != NULL);
+ ASSERT(reg >= 0);
+ ASSERT(reg < kNumberOfFpuRegisters);
return *reinterpret_cast<double*>(&fpu_registers_[reg]);
}
int64_t FpuRegisterValueAsInt64(FpuRegister reg) const {
ASSERT(fpu_registers_ != NULL);
+ ASSERT(reg >= 0);
+ ASSERT(reg < kNumberOfFpuRegisters);
return *reinterpret_cast<int64_t*>(&fpu_registers_[reg]);
}
simd128_value_t FpuRegisterValueAsSimd128(FpuRegister reg) const {
ASSERT(fpu_registers_ != NULL);
+ ASSERT(reg >= 0);
+ ASSERT(reg < kNumberOfFpuRegisters);
const float* address = reinterpret_cast<float*>(&fpu_registers_[reg]);
return simd128_value_t().readFrom(address);
}
@@ -216,16 +224,18 @@ class DeoptInstr : public ZoneAllocated {
kConstant,
kRegister,
kFpuRegister,
- kInt64FpuRegister,
+ kInt64RegisterPair,
regis 2014/05/22 17:09:40 Why not kRegisterPair? kInt64RegisterPair sounds l
Cutch 2014/05/23 21:33:54 A kInt64RegisterPair is a mint (64-bit integer) wh
regis 2014/05/23 22:36:59 Do I understand correctly that some of these are f
kFloat32x4FpuRegister,
kFloat64x2FpuRegister,
kInt32x4FpuRegister,
kStackSlot,
kDoubleStackSlot,
kInt64StackSlot,
+ kInt64StackSlotPair,
kFloat32x4StackSlot,
kFloat64x2StackSlot,
kInt32x4StackSlot,
+ kInt64StackSlotRegister,
regis 2014/05/22 17:09:40 Comments would help here. What is the difference b
Cutch 2014/05/23 21:33:54 See above.
kPcMarker,
kPp,
kCallerFp,

Powered by Google App Engine
This is Rietveld 408576698