lkml.org 
[lkml]   [2008]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 08/39] don't use word-size specifiers
Glauber Costa wrote:
> since the instructions refer to registers, they'll be able
> to figure it out.
>
> Signed-off-by: Glauber Costa <gcosta@redhat.com>

> diff --git a/arch/x86/lib/getuser_32.S b/arch/x86/lib/getuser_32.S
> index 6d84b53..8200fde 100644
> --- a/arch/x86/lib/getuser_32.S
> +++ b/arch/x86/lib/getuser_32.S
> @@ -29,44 +29,44 @@
> ENTRY(__get_user_1)
> CFI_STARTPROC
> GET_THREAD_INFO(%edx)
> - cmpl TI_addr_limit(%edx),%eax
> + cmp TI_addr_limit(%edx),%eax
> jae bad_get_user
> -1: movzbl (%eax),%edx
> - xorl %eax,%eax
> +1: movzb (%eax),%edx
> + xor %eax,%eax
> ret
> CFI_ENDPROC

I hate to say it, but I really think this is a step backwards in
readability. Consistency is a good thing, and with the suffixes in
place we are consistent between instructions that refer to memory and
instructions that refer to registers. We also get one more check on
things, where the assembler can tell the programmer he probably typoed.

So I would prefer if we *didn't* go down this route, except for explicit
unification, but that's not the case here (since the size is still
explicit in the register names.)

-hpa


\
 
 \ /
  Last update: 2008-06-28 01:21    [W:0.199 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site