On Tue, Aug 18, 2009 at 01:48:39AM +0400, Maxim Kuvyrkov wrote:
> +/* This syscall gets its arguments in A0 (mem), A1 (oldval) and
> +   D1 (newval).  */
> +asmlinkage int
> +m68k_sys_atomic_cmpxchg_32(unsigned long newval, int d2, int d3, int d4, int 
> d5,
> +                     unsigned long __user *mem, unsigned long oldval)
> +{

Any particular reason for this calling convention? The real CAS instruction
specifically takes two data registers for the two values. It seems more
logical to me to have oldval and newval in data registers and just have
the mem argument in an address register.

For reference, here's the syntax summary from the m68k PRM:

CAS Dc, Du, <ea>

        Brad Boyer
        [email protected]

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to