Page MenuHomeFreeBSD

D62369.1796398615.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D62369.1796398615.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
@@ -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

Mime Type
text/plain
Expires
Fri, Dec 4, 3:36 PM (23 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42209388
Default Alt Text
D62369.1796398615.diff (1 KB)

Event Timeline