[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <49F73D96.2090801@garzik.org>
Date: Tue, 28 Apr 2009 13:32:06 -0400
From: Jeff Garzik <jeff@...zik.org>
To: LKML <linux-kernel@...r.kernel.org>
CC: x86@...nel.org
Subject: [x86] Strange 64-bit put_user ?
In arch/x86/include/asm/uaccess.h, if !CONFIG_X86_32, we see
> #define __put_user_x8(x, ptr, __ret_pu) \
> ({ u64 __ret_pu; __put_user_x(8, x, ptr, __ret_pu); (int)__ret_pu; })
which was preceded by
> #define __put_user_x(size, x, ptr, __ret_pu) \
> asm volatile("call __put_user_" #size : "=a" (__ret_pu) \
> :"0" ((typeof(*(ptr)))(x)), "c" (ptr) : "ebx")
My question, from an admitted inline asm newbie:
Why is 32-bit register 'ebx' being used for a 64-bit put_user?
And a dumb-question follow-up, probably easy, for any x86 expert: why
are registers 'bl' and 'bx' not used for 8-bit and 16-bit put_user,
respectively?
Thanks,
Jeff
--
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