summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-09-09 13:15:38 -0700
committerAndreas Gampe <agampe@google.com>2015-09-17 14:41:52 -0700
commit85b62f23fc6dfffe2ddd3ddfa74611666c9ff41d (patch)
treec916b01b1608558a7d8c9d100274c4c6b6706386 /compiler/optimizing/code_generator.h
parent6766eae2d91e894b4ceab9f29cc983900e7bc0c7 (diff)
ART: Refactor intrinsics slow-paths
Refactor slow paths so that there is a default implementation for common cases (only arm64 with vixl is special). Write a generic intrinsic slow-path that can be reused for the specific architectures. Move helper functions into CodeGenerator so that they are accessible. Change-Id: Ibd788dce432601c6a9f7e6f13eab31f28dcb8550
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index a54dbf1506..a1c6db0a2c 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -30,6 +30,7 @@
#include "nodes.h"
#include "optimizing_compiler_stats.h"
#include "stack_map_stream.h"
+#include "utils/label.h"
namespace art {
@@ -105,6 +106,9 @@ class SlowPathCode : public ArenaObject<kArenaAllocSlowPaths> {
virtual const char* GetDescription() const = 0;
+ Label* GetEntryLabel() { return &entry_label_; }
+ Label* GetExitLabel() { return &exit_label_; }
+
protected:
static constexpr size_t kMaximumNumberOfExpectedRegisters = 32;
static constexpr uint32_t kRegisterNotSaved = -1;
@@ -112,6 +116,9 @@ class SlowPathCode : public ArenaObject<kArenaAllocSlowPaths> {
uint32_t saved_fpu_stack_offsets_[kMaximumNumberOfExpectedRegisters];
private:
+ Label entry_label_;
+ Label exit_label_;
+
DISALLOW_COPY_AND_ASSIGN(SlowPathCode);
};
@@ -386,6 +393,14 @@ class CodeGenerator {
uint32_t dex_pc,
SlowPathCode* slow_path) = 0;
+ // Generate a call to a static or direct method.
+ virtual void GenerateStaticOrDirectCall(HInvokeStaticOrDirect* invoke, Location temp) = 0;
+ // Generate a call to a virtual method.
+ virtual void GenerateVirtualCall(HInvokeVirtual* invoke, Location temp) = 0;
+
+ // Copy the result of a call into the given target.
+ virtual void MoveFromReturnRegister(Location trg, Primitive::Type type) = 0;
+
protected:
// Method patch info used for recording locations of required linker patches and
// target methods. The target method can be used for various purposes, whether for