summaryrefslogtreecommitdiff
path: root/runtime/stack.h
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2017-03-14 15:30:19 -0700
committer buzbee <buzbee@google.com> 2017-03-16 05:31:59 -0700
commit31afbec96e9f9c8e58778694e74aea7ce55e1378 (patch)
tree1ad1633c75fb6c65fbb25d09fb9dcf92c4a81b8c /runtime/stack.h
parentc53528a048e47ef8c51fc5c9667061ebd840adf1 (diff)
ART: Bit intrinsics for Mterp interpreter
Another batch of interpreter intrinisics, mostly around bit manipulation. Also some formatting changes and inclusion of a comprehensive list of recognized intrinisics (to assist with telling what's left to do). Bug: 30933338 Benchmarks: 20% Improvement for Reversi 10% Improvement for Scimark2 3% Improvement for ChessBench Test: ART_TEST_INTERPRETER=true m test-art-host Test: art/tools/run-libcore-tests --host (edited for force -Xint) Note: Added intrinsics have existing test coverage via 082-inline-execute, 123-inline-execute2, 565-checker-rotate, 564-checker-bitcount, 566-checker-signum & 567-checker-compare Change-Id: I29f0386e28eddba37c44f9ced44e7d5f8206bb47
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];
}