This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] fix parisc atomic locking builtins for libgomp


> This patch implies a bug in the kernel code.
> 
> Under what condition is lws_errno == 0 and lws_ret != oldval?

The issue is this code:

        /* The load and store could fail */
1:      ldw     0(%sr3,%r26), %r28
	sub,<>  %r28, %r25, %r0
2:      stw     %r24, 0(%sr3,%r26)

The return value is not changed if the store at 2 is not done.
However, I don't think the interface can be changed now.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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