x86_64: Deduplicate load from memory for non-reference types.
Deduplicate common code in HandleFieldGet, VisitArrayGet and
GenerateVarHandleGet. Reference types are handled individually in each
case because these functions have subtle differences.
Bug: 65872996
Test: art/test.py --host -r --optimizing --64
Change-Id: Ia2abcd7f6607edb2e35eb20a65cef7bfca380d3c
diff --git a/compiler/optimizing/code_generator_x86_64.h b/compiler/optimizing/code_generator_x86_64.h
index c566edf..f5d8da5 100644
--- a/compiler/optimizing/code_generator_x86_64.h
+++ b/compiler/optimizing/code_generator_x86_64.h
@@ -424,6 +424,8 @@
// Helper method to move a value between two locations.
void Move(Location destination, Location source);
+ // Helper method to load a value of non-reference type from memory.
+ void LoadFromMemoryNoReference(DataType::Type type, Location dst, Address src);
Label* GetLabelOf(HBasicBlock* block) const {
return CommonGetLabelOf<Label>(block_labels_, block);