This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] sh: Fix gUSA sequence in atomic function


Nobuhiro Iwamatsu <iwamatsu@nigauri.org> wrote:
> 	* sysdeps/unix/sysv/linux/sh/bits/atomic.h (atomic_increment_and_test): Likewise.
> 	* sysdeps/unix/sysv/linux/sh/bits/atomic.h (atomic_decrement_and_test): Likewise.

Looks no changes for these 2 macros were needed and

	* sysdeps/unix/sysv/linux/sh/bits/atomic.h (atomic_bit_test_set):
	Likewise.

was required instead.  atomic_bit_test_set should be fixed
like as

	  mova 1f,r0\n\
	  .align 2\n\
	  mov r15,r1\n\
	  mov #(0f-1f),r15\n\
       0: mov.b @%2,r2\n\
	  mov r2,r3\n\
	  or %1,r2\n\
	  mov.b r2,@%2\n\
       1: mov r1,r15\n\
	  and r3,%0"\
	: "=&r" (__result), "=&r" (__mask) \
	: rNOSP (mem), "0" (__result), "1" (__mask) \
	: "r0", "r1", "r2", "r3", "memory");	\

and so on.

A minor nit, remove spaces around the hyphen in copyright years.

>   Copyright (C) 2003 - 2012 Free Software Foundation, Inc.
                      ^ ^
Please wrap the line

>	* sysdeps/unix/sysv/linux/sh/bits/atomic.h (atomic_add_negative): Likewise.

not to exceed 80 columns.

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]