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

Unified Diff: src/a64/instructions-a64.cc

Issue 169893002: A64: Let the MacroAssembler resolve branches to distant targets. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Ulan's comments. Created 6 years, 10 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/a64/instructions-a64.cc
diff --git a/src/a64/instructions-a64.cc b/src/a64/instructions-a64.cc
index ebd6c26bb32452bd7bc8b7bccd9e89f636a15876..4496d56753634eb4a40d7a53c486cef892d4c629 100644
--- a/src/a64/instructions-a64.cc
+++ b/src/a64/instructions-a64.cc
@@ -230,6 +230,18 @@ Instruction* Instruction::ImmPCOffsetTarget() {
}
+bool Instruction::IsValidImmPCOffset(ImmBranchType branch_type,
+ int32_t offset) {
+ return is_intn(offset, ImmBranchRangeBitwidth(branch_type));
+}
+
+
+bool Instruction::IsTargetInImmPCOffsetRange(Instruction* target) {
+ int offset = target - this;
+ return IsValidImmPCOffset(BranchType(), offset);
+}
+
+
void Instruction::SetImmPCOffsetTarget(Instruction* target) {
if (IsPCRelAddressing()) {
SetPCRelImmTarget(target);

Powered by Google App Engine
This is Rietveld 408576698