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

Unified Diff: src/arm64/instructions-arm64.h

Issue 222433002: ARM64: Introduce a version of ADR handling distant targets. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix loop offset Created 6 years, 9 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/instructions-arm64.h
diff --git a/src/arm64/instructions-arm64.h b/src/arm64/instructions-arm64.h
index ab64cb2bf003cd57313c8883d686b36ef3bd2796..de76b69b6b87120154041d5a7e250569900c4421 100644
--- a/src/arm64/instructions-arm64.h
+++ b/src/arm64/instructions-arm64.h
@@ -160,9 +160,10 @@ class Instruction {
// ImmPCRel is a compound field (not present in INSTRUCTION_FIELDS_LIST),
// formed from ImmPCRelLo and ImmPCRelHi.
int ImmPCRel() const {
+ ASSERT(IsPCRelAddressing());
int const offset = ((ImmPCRelHi() << ImmPCRelLo_width) | ImmPCRelLo());
int const width = ImmPCRelLo_width + ImmPCRelHi_width;
- return signed_bitextract_32(width-1, 0, offset);
+ return signed_bitextract_32(width - 1, 0, offset);
}
uint64_t ImmLogical();
@@ -203,6 +204,10 @@ class Instruction {
return Mask(PCRelAddressingFMask) == PCRelAddressingFixed;
}
+ bool IsAdr() const {
+ return Mask(PCRelAddressingMask) == ADR;
+ }
+
bool IsLogicalImmediate() const {
return Mask(LogicalImmediateFMask) == LogicalImmediateFixed;
}
@@ -211,6 +216,10 @@ class Instruction {
return Mask(AddSubImmediateFMask) == AddSubImmediateFixed;
}
+ bool IsAddSubShifted() const {
+ return Mask(AddSubShiftedFMask) == AddSubShiftedFixed;
+ }
+
bool IsAddSubExtended() const {
return Mask(AddSubExtendedFMask) == AddSubExtendedFixed;
}
@@ -387,6 +396,10 @@ class Instruction {
}
+ static const int ImmPCRelRangeBitwidth = 21;
+ static bool IsValidPCRelOffset(int offset) {
+ return is_int21(offset);
+ }
void SetPCRelImmTarget(Instruction* target);
void SetBranchImmTarget(Instruction* target);
};

Powered by Google App Engine
This is Rietveld 408576698