| 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);
|
|
|