Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178313416
D62432.1796483769.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
879 B
Referenced Files
None
Subscribers
None
D62432.1796483769.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 5, 3:16 PM (16 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42233564
Default Alt Text
D62432.1796483769.diff (879 B)
Attached To
Mode
D62432: dtrace/powerpc: fix the branch condition test in the pid provider
Attached
Detach File
Event Timeline