User`s guide
PALcode Violation Checker 12–7
Labels
pvc$x$2000.2:
20$: subq r4, r6, r7
pvc$x$2002:
ret r31, (r0)
Note that the returns are treated just like the initial jsr subroutines.
12.3.2.2 Subroutine Branches
To specify a label for a branch to subroutine (BSR), set the <num> field value to
4000 or higher. To associate all BSRs that go to the same subroutine as well as the
RET at the end of that subroutine, assign the same integer to this field. Use the
<destination> field to specify a RET. For example:
pvc$osf11$5000 00004298
pvc$osf28$5000.1 00004430
pvc$osf29$5000.2 000044B8
Every time PVC finds a BSR marked this way, PVC pushes PC + 4 onto a stack.
Then, when PVC hits a RET that also has a label, it checks the stack to make sure the
top entry matches where it is and goes to that address. For example:
pvc$r$4000:
bsr r10, subr
bis r31,r31,r31
bis r31,r31,r31
bis r31,r31,r31
pvc$s$4000:
bsr r10, subr
halt
subr:
mulq r1,#256,r2
pvc$t$4000.1:
ret r31, (r10)
This RET goes back to the correct address both times.
12.3.2.3 Ignoring a Branch
To tell PVC not to follow a certain branch, put a label with the <num> field set to
1008 at the appropriate address. For example, if all the CALL_PAL slots jump to a
routine that checks for OPCDEC, and then branch to other flows, and so on, you are
repeatedly checking OPCDEC. Skipping this branch could improve execution time;
however, because of the reduced checking, this feature should only be used if it
dramatically improves PVC execution time.