lkml.org 
[lkml]   [2007]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2007-12-30 08:33    [W:0.465 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site