diff options
Diffstat (limited to 'libunwindstack/RegsMips.cpp')
| -rw-r--r-- | libunwindstack/RegsMips.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/libunwindstack/RegsMips.cpp b/libunwindstack/RegsMips.cpp index 6751f52dd..5d20bef4a 100644 --- a/libunwindstack/RegsMips.cpp +++ b/libunwindstack/RegsMips.cpp @@ -35,16 +35,12 @@ ArchEnum RegsMips::Arch() { return ARCH_MIPS; } -uint64_t RegsMips::GetAdjustedPc(uint64_t rel_pc, Elf* elf) { - if (!elf->valid()) { - return rel_pc; +uint64_t RegsMips::GetPcAdjustment(uint64_t rel_pc, Elf* elf) { + if (!elf->valid() || rel_pc < 8) { + return 0; } - - // For now, just assuming no compact branches - if (rel_pc < 8) { - return rel_pc; - } - return rel_pc - 8; + // For now, just assume no compact branches + return 8; } void RegsMips::SetFromRaw() { |
