summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-04-17 14:56:23 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-04-17 15:16:00 +0100
commita747a392fb5f88d2ecc4c6021edf9f1f6615ba16 (patch)
treefc5f08b127f3cf6bfb933504070109d46a455bb9 /compiler/optimizing/code_generator.h
parentc2b2bbf1bbdf6273298b79d6006611593ed9f3a0 (diff)
downloadart-a747a392fb5f88d2ecc4c6021edf9f1f6615ba16.zip
art-a747a392fb5f88d2ecc4c6021edf9f1f6615ba16.tar.gz
art-a747a392fb5f88d2ecc4c6021edf9f1f6615ba16.tar.bz2
Code cleanup in preparation for x64 backend.
- Use InvokeDexCallingConventionVisitor for setting up HParameterValues - Use kVregSize instead of kX86WordSize when dealing with virtual registers. Change-Id: Ia520223010194c70a3ff0ed659077f55cec4e7d8
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h
index d459dd5..5c7cac1 100644
--- a/compiler/optimizing/code_generator.h
+++ b/compiler/optimizing/code_generator.h
@@ -26,6 +26,8 @@
namespace art {
+static size_t constexpr kVRegSize = 4;
+
class DexCompilationUnit;
class CodeAllocator {
@@ -323,10 +325,10 @@ class CallingConvention {
return registers_[index];
}
- uint8_t GetStackOffsetOf(size_t index) const {
+ uint8_t GetStackOffsetOf(size_t index, size_t word_size) const {
// We still reserve the space for parameters passed by registers.
- // Add kWordSize for the method pointer.
- return index * kWordSize + kWordSize;
+ // Add word_size for the method pointer.
+ return index * kVRegSize + word_size;
}
private: