Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178274718
D62369.1796397263.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
D62369.1796397263.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
@@ -128,9 +128,8 @@
break;
case 16:
tp->ftt_type = FASTTRAP_T_BC;
- tp->ftt_dest = instr & 0x0000FFFC; /* Extract target address */
- if (instr & 0x00008000)
- tp->ftt_dest |= 0xFFFF0000;
+ /* Sign extend the 16-bit target field to the full width. */
+ tp->ftt_dest = (int16_t)(instr & 0x0000FFFC);
/* Use as offset if not absolute address. */
if (!(instr & 0x02))
tp->ftt_dest += pc;
@@ -139,9 +138,9 @@
break;
case 18:
tp->ftt_type = FASTTRAP_T_B;
- tp->ftt_dest = instr & 0x03FFFFFC; /* Extract target address */
- if (instr & 0x02000000)
- tp->ftt_dest |= 0xFC000000;
+ /* Sign extend the 26-bit target field to the full width. */
+ tp->ftt_dest = (int32_t)((instr & 0x03FFFFFC) |
+ ((instr & 0x02000000) ? 0xFC000000 : 0));
/* Use as offset if not absolute address. */
if (!(instr & 0x02))
tp->ftt_dest += pc;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 4, 3:14 PM (23 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42209388
Default Alt Text
D62369.1796397263.diff (1 KB)
Attached To
Mode
D62369: dtrace/powerpc: sign extend branch displacements in the pid provider
Attached
Detach File
Event Timeline