summaryrefslogtreecommitdiffstats
path: root/runtime/stack.h
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2015-01-20 16:06:43 +0100
committerNicolas Geoffray <ngeoffray@google.com>2015-03-03 11:22:00 +0000
commit7cde48c56df5b57aed524cce44c902bc720f2d6c (patch)
treeb9b9e33b29f46bfe0c2da89c7e3e87c8ee419ccc /runtime/stack.h
parent4b39eeea67b0fecf21588d7b00e92eb844014c24 (diff)
downloadart-7cde48c56df5b57aed524cce44c902bc720f2d6c.zip
art-7cde48c56df5b57aed524cce44c902bc720f2d6c.tar.gz
art-7cde48c56df5b57aed524cce44c902bc720f2d6c.tar.bz2
Stack support for Optimizing compiler
Allows to read/write DEX registers from physical register or stack location when the method is compiled with the Optimizing compiler. Required fixing arm and arm64 JNI compiler by saving floating point registers. Bug: 18547544 Change-Id: I401579f251d1c0a130f6cf4a93a960cdcd7518f5
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index 5a86ca1..b495f03 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -492,7 +492,8 @@ class StackVisitor {
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
uint32_t val;
bool success = GetVReg(m, vreg, kind, &val);
- CHECK(success) << "Failed to read vreg " << vreg << " of kind " << kind;
+ CHECK(success) << "Failed to read v" << vreg << " of kind " << kind << " in method "
+ << PrettyMethod(m);
return val;
}
@@ -505,7 +506,8 @@ class StackVisitor {
uint64_t val;
bool success = GetVRegPair(m, vreg, kind_lo, kind_hi, &val);
CHECK(success) << "Failed to read vreg pair " << vreg
- << " of kind [" << kind_lo << "," << kind_hi << "]";
+ << " of kind [" << kind_lo << "," << kind_hi << "] in method "
+ << PrettyMethod(m);
return val;
}
@@ -673,6 +675,45 @@ class StackVisitor {
uintptr_t GetFPR(uint32_t reg) const;
void SetFPR(uint32_t reg, uintptr_t value);
+ bool GetVRegFromQuickCode(mirror::ArtMethod* m, uint16_t vreg, VRegKind kind,
+ uint32_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool GetVRegFromOptimizedCode(mirror::ArtMethod* m, uint16_t vreg, VRegKind kind,
+ uint32_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool GetRegisterIfAccessible(uint32_t reg, VRegKind kind, uint32_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ bool GetVRegPairFromQuickCode(mirror::ArtMethod* m, uint16_t vreg, VRegKind kind_lo,
+ VRegKind kind_hi, uint64_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool GetVRegPairFromOptimizedCode(mirror::ArtMethod* m, uint16_t vreg,
+ VRegKind kind_lo, VRegKind kind_hi,
+ uint64_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool GetRegisterPairIfAccessible(uint32_t reg_lo, uint32_t reg_hi, VRegKind kind_lo,
+ uint64_t* val) const
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ bool SetVRegFromQuickCode(mirror::ArtMethod* m, uint16_t vreg, uint32_t new_value,
+ VRegKind kind)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool SetVRegFromOptimizedCode(mirror::ArtMethod* m, uint16_t vreg, uint32_t new_value,
+ VRegKind kind)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool SetRegisterIfAccessible(uint32_t reg, uint32_t new_value, VRegKind kind)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
+ bool SetVRegPairFromQuickCode(mirror::ArtMethod* m, uint16_t vreg, uint64_t new_value,
+ VRegKind kind_lo, VRegKind kind_hi)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool SetVRegPairFromOptimizedCode(mirror::ArtMethod* m, uint16_t vreg, uint64_t new_value,
+ VRegKind kind_lo, VRegKind kind_hi)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool SetRegisterPairIfAccessible(uint32_t reg_lo, uint32_t reg_hi, uint64_t new_value,
+ bool is_float)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+
void SanityCheckFrame() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
Thread* const thread_;