Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: src/arm64/assembler-arm64.cc

Issue 268673003: ARM64: Optimize generated code for gaps (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: use new includes norm Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/arm64/assembler-arm64.cc
diff --git a/src/arm64/assembler-arm64.cc b/src/arm64/assembler-arm64.cc
index c45910c7bc799895c3175f092625d71277659851..70c44dd4b39cf084918f237e1dcd43a1c06d062a 100644
--- a/src/arm64/assembler-arm64.cc
+++ b/src/arm64/assembler-arm64.cc
@@ -294,6 +294,34 @@ bool Operand::NeedsRelocation(const Assembler* assembler) const {
}
+MemOperand::PairResult MemOperand::AreConsistentForPair(
+ const MemOperand& operandA,
ulan 2014/06/04 09:28:19 Nit: indent to four spaces
vincent.belliard 2014/06/09 10:31:15 Done.
+ const MemOperand& operandB,
+ int access_size_log2) {
+ ASSERT(access_size_log2 >= 0);
+ ASSERT(access_size_log2 <= 3);
+ // Step one: check that they share the same base, that the mode is Offset
+ // and that the offset is a multiple of 8.
+ if (!operandA.base().Is(operandB.base()) ||
+ (operandA.addrmode() != Offset) ||
+ (operandB.addrmode() != Offset) ||
+ ((operandA.offset() & 0x7) != 0)) {
ulan 2014/06/04 09:28:19 Is the offset required to be multiple of 8 or mult
vincent.belliard 2014/06/09 10:31:15 Fixed: offset multiple of access size. The follow
+ return kNotPair;
+ }
+ // Step two: check that the offsets are contiguous and that the range
+ // is OK for ldp/stp.
+ if ((operandB.offset() == operandA.offset() + (1 << access_size_log2)) &&
+ is_int7(operandA.offset() >> access_size_log2)) {
+ return kPairAB;
+ }
+ if ((operandA.offset() == operandB.offset() + (1 << access_size_log2)) &&
+ is_int7(operandB.offset() >> access_size_log2)) {
+ return kPairBA;
+ }
+ return kNotPair;
+}
+
+
// Assembler
Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size)

Powered by Google App Engine
This is Rietveld 408576698