Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178329014
D62433.1796503437.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D62433.1796503437.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
@@ -43,6 +43,7 @@
#define OP_RS(x) (((x) & 0x03E00000) >> 21)
#define OP_RA(x) (((x) & 0x001F0000) >> 16)
#define OP_RB(x) (((x) & 0x0000F800) >> 11)
+#define BR_LK 0x00000001
int
fasttrap_tracepoint_install(proc_t *p, fasttrap_tracepoint_t *tp)
@@ -473,18 +474,24 @@
break;
case FASTTRAP_T_BC:
if (!fasttrap_branch_taken(tp->ftt_bo, tp->ftt_bi, rp)) {
+ /* LR is set whether or not the branch is taken. */
+ if (tp->ftt_instr & BR_LK)
+ rp->lr = rp->pc + 4;
new_pc = rp->pc + 4;
break;
}
/* FALLTHROUGH */
case FASTTRAP_T_B:
- if (tp->ftt_instr & 0x01)
+ if (tp->ftt_instr & BR_LK)
rp->lr = rp->pc + 4;
new_pc = tp->ftt_dest;
break;
case FASTTRAP_T_BLR:
case FASTTRAP_T_BCTR:
if (!fasttrap_branch_taken(tp->ftt_bo, tp->ftt_bi, rp)) {
+ /* See above. */
+ if (tp->ftt_instr & BR_LK)
+ rp->lr = rp->pc + 4;
new_pc = rp->pc + 4;
break;
}
@@ -493,7 +500,7 @@
new_pc = rp->ctr;
else
new_pc = rp->lr;
- if (tp->ftt_instr & 0x01)
+ if (tp->ftt_instr & BR_LK)
rp->lr = rp->pc + 4;
break;
case FASTTRAP_T_COMMON:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 5, 8:43 PM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42240682
Default Alt Text
D62433.1796503437.diff (1 KB)
Attached To
Mode
D62433: dtrace/powerpc: set LR for a branch and link that isn't taken
Attached
Detach File
Event Timeline