[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1199036395.6323.41.camel@brick>
Date: Sun, 30 Dec 2007 09:39:55 -0800
From: Harvey Harrison <harvey.harrison@...il.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Masami Hiramatsu <mhiramat@...hat.com>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ibm.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86: Introduce REX prefix helper for kprobes
On Sat, 2007-12-29 at 23:04 -0800, H. Peter Anvin wrote:
> Masami Hiramatsu wrote:
> > Hi Harvey,
> >
> > Harvey Harrison wrote:
> >> Fold some small ifdefs into a helper function.
> >>
> >> Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
> >> ---
> >> Masami, Ingo, I had this left in some unsent kprobes unification
> >> work. Depends on your tastes, but does reduce ifdefs and is a bit
> >> better about self-documenting the REX prefix on X86_64.
> >
> > Basically, I think it is good idea.
> > Could you use a macro same as the stack_addr() macro, like as below?
> >
> > #defile is_REX_prefix(insn) ((insn & 0xf0) == 0x40))
> >
> > This is just a bit checker, so I think a macro is better to do that.
> >
>
> Why is a macro better than an inline, and why the odd mIXed case?
>
I was emulating existing practice I saw in kprobes, see is_IF_modifier.
Harvey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists