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
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 @@
     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: