forked from OSchip/llvm-project
[sancov] Add SPARC support for getPreviousInstructionPc
The SPARC and MIPS branching operations have a branch delay slot, 4 more bytes occupied. Depends on D120381 Reviewed By: ro, MaskRay Differential Revision: https://reviews.llvm.org/D120451
This commit is contained in:
parent
319265328c
commit
f6cb59d35f
|
@ -695,7 +695,7 @@ static uint64_t getPreviousInstructionPc(uint64_t PC,
|
|||
Triple TheTriple) {
|
||||
if (TheTriple.isARM())
|
||||
return (PC - 3) & (~1);
|
||||
if (TheTriple.isMIPS())
|
||||
if (TheTriple.isMIPS() || TheTriple.isSPARC())
|
||||
return PC - 8;
|
||||
if (TheTriple.isRISCV())
|
||||
return PC - 2;
|
||||
|
|
Loading…
Reference in New Issue