X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..0a7de7458d150b5d4dffc935ba399be265ef0a1a:/bsd/dev/i386/instr_size.c diff --git a/bsd/dev/i386/instr_size.c b/bsd/dev/i386/instr_size.c index 2982b8d66..14f7ea974 100644 --- a/bsd/dev/i386/instr_size.c +++ b/bsd/dev/i386/instr_size.c @@ -82,7 +82,7 @@ dtrace_dis_get_byte(void *p) * reported as having no memory impact. */ /* ARGSUSED2 */ -static int +static __attribute__((noinline)) int dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex) { int sz; @@ -120,19 +120,3 @@ dtrace_instr_size(uchar_t *instr) return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, DATAMODEL_NATIVE, NULL)); } - -#if !defined(__APPLE__) -/*ARGSUSED*/ -int -instr_size(struct regs *rp, caddr_t *addrp, enum seg_rw rw) -{ - uchar_t instr[16]; /* maximum size instruction */ - caddr_t pc = (caddr_t)rp->r_pc; - - (void) copyin_nowatch(pc, (caddr_t)instr, sizeof (instr)); - - return (dtrace_dis_isize(instr, - rw == S_EXEC ? DIS_ISIZE_INSTR : DIS_ISIZE_OPERAND, - curproc->p_model, NULL)); -} -#endif /* __APPLE__ */