Messages in this thread | | | Date | Fri, 27 Jun 2008 16:17:56 -0700 | From | "H. Peter Anvin" <> | 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@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
| |