diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2014-01-15 05:19:37 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2014-01-15 05:19:37 +0000 |
commit | b1391adbae9577879c598fce281eb1179d26142f (patch) | |
tree | 4f4aad2d0495e4af20e1796de50d77105fd6f2b6 /sys/cddl/dev/fbt | |
parent | 44cab258a2754ab2d2c9af0fabd9cd6bda591fb9 (diff) | |
download | FreeBSD-src-b1391adbae9577879c598fce281eb1179d26142f.zip FreeBSD-src-b1391adbae9577879c598fce281eb1179d26142f.tar.gz |
MFC r256543,r259245,r259421,r259668,r259674
r256543:
Add fasttrap for PowerPC. This is the last piece of the DTrace/ppc puzzle.
It's incomplete, it doesn't contain full instruction emulation, but it should be
sufficient for most cases.
r259245,r259421: (FBT)
FBT now does work fully on PowerPC.
Save r3 before using it for the trap check, else we end up saving the new r3,
containing the trap instruction encoding (0x7c810808), and restoring it back
with the frame on return. This caused it to panic on my ppc32 machine.
r259668,r259674:
Fix a typo in the FBT code.
Diffstat (limited to 'sys/cddl/dev/fbt')
-rw-r--r-- | sys/cddl/dev/fbt/fbt_powerpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/dev/fbt/fbt_powerpc.c b/sys/cddl/dev/fbt/fbt_powerpc.c index cdaa06a..88b74dd 100644 --- a/sys/cddl/dev/fbt/fbt_powerpc.c +++ b/sys/cddl/dev/fbt/fbt_powerpc.c @@ -219,7 +219,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx, return (0); instr = (u_int32_t *) symval->value; - limit = (u_int32_t *) symval->value + symval->size; + limit = (u_int32_t *) (symval->value + symval->size); for (; instr < limit; instr++) if (*instr == FBT_MFLR_R0) @@ -278,7 +278,7 @@ again: instr++; for (j = 0; j < 12 && instr < limit; j++, instr++) { - if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) | + if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) || FBT_IS_JUMP(*instr)) break; } |