Page MenuHomeFreeBSD

D62432.1796508243.diff
No OneTemporary

Authored By
Unknown
Size
879 B
Referenced Files
None
Subscribers
None

D62432.1796508243.diff

diff --git a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
--- a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+++ b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
@@ -315,7 +315,7 @@
static int
fasttrap_branch_taken(int bo, int bi, struct reg *regs)
{
- int crzero = 0;
+ int ctr_ok = 1;
/* Branch always? */
if ((bo & 0x14) == 0x14)
@@ -324,13 +324,12 @@
/* Handle decrementing ctr */
if (!(bo & 0x04)) {
--regs->ctr;
- crzero = (regs->ctr == 0);
- if (bo & 0x10) {
- return (!(crzero ^ (bo >> 1)));
- }
+ ctr_ok = (regs->ctr != 0) ^ ((bo >> 1) & 1);
+ if (bo & 0x10)
+ return (ctr_ok);
}
- return (crzero | (((regs->cr >> (31 - bi)) ^ (bo >> 3)) ^ 1));
+ return (ctr_ok && ((regs->cr >> (31 - bi)) & 1) == ((bo >> 3) & 1));
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 5, 10:04 PM (23 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42233564
Default Alt Text
D62432.1796508243.diff (879 B)

Event Timeline