summaryrefslogtreecommitdiff
path: root/runtime/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index 90a0aee353..5c9614aba4 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -197,6 +197,11 @@ class ShadowFrame {
return *reinterpret_cast<const int32_t*>(vreg);
}
+ // Shorts are extended to Ints in VRegs. Interpreter intrinsics needs them as shorts.
+ int16_t GetVRegShort(size_t i) const {
+ return static_cast<int16_t>(GetVReg(i));
+ }
+
uint32_t* GetVRegAddr(size_t i) {
return &vregs_[i];
}