Messages in this thread | | | Date | Sat, 29 Dec 2007 23:04:52 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH] x86: Introduce REX prefix helper for kprobes |
| |
Masami Hiramatsu wrote: > Hi Harvey, > > Harvey Harrison wrote: >> Fold some small ifdefs into a helper function. >> >> Signed-off-by: Harvey Harrison <harvey.harrison@gmail.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?
-hpa
| |