diff options
| author | 2015-07-07 10:48:12 +0000 | |
|---|---|---|
| committer | 2015-07-07 10:48:13 +0000 | |
| commit | ee35ff809616324cbada38cbc0610eb09da09b35 (patch) | |
| tree | 5271ee1feba1a86905fede5b9d9c1cba444ba01c /compiler/optimizing/common_arm64.h | |
| parent | 00dec6a9506364806227f21f6a053176a6723fe9 (diff) | |
| parent | 82000b0cf9bb32fc55cdb125bf37c884d44a8671 (diff) | |
Merge "Improve code generation for ARM64 VisitArrayGet/Set."
Diffstat (limited to 'compiler/optimizing/common_arm64.h')
| -rw-r--r-- | compiler/optimizing/common_arm64.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/common_arm64.h b/compiler/optimizing/common_arm64.h index 246fff99ac..f54547534f 100644 --- a/compiler/optimizing/common_arm64.h +++ b/compiler/optimizing/common_arm64.h @@ -151,6 +151,15 @@ static inline vixl::MemOperand HeapOperand(const vixl::Register& base, size_t of return vixl::MemOperand(base.X(), offset); } +static inline vixl::MemOperand HeapOperand(const vixl::Register& base, + const vixl::Register& regoffset, + vixl::Shift shift = vixl::LSL, + unsigned shift_amount = 0) { + // A heap reference must be 32bit, so fit in a W register. + DCHECK(base.IsW()); + return vixl::MemOperand(base.X(), regoffset, shift, shift_amount); +} + static inline vixl::MemOperand HeapOperand(const vixl::Register& base, Offset offset) { return HeapOperand(base, offset.SizeValue()); } |