[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48657524.4020307@kernel.org>
Date: Fri, 27 Jun 2008 16:17:56 -0700
From: "H. Peter Anvin" <hpa@...nel.org>
To: Glauber Costa <gcosta@...hat.com>
CC: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...e.hu,
x86@...nel.org
Subject: Re: [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@...hat.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
--
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