On 15/06/2012, at 8:51 AM, Hans-Peter Nilsson wrote: > On Thu, 14 Jun 2012, Maxim Kuvyrkov wrote: >> On 14/06/2012, at 6:33 AM, Richard Sandiford wrote: >>> Maxim Kuvyrkov <ma...@codesourcery.com> writes: >>>> +/* Subroutines of the mips_process_sync_loop. >>>> + Emit barriers as needed for the memory MODEL. */ >>>> + >>>> +static bool >>>> +mips_emit_pre_atomic_barrier_p (enum memmodel model) >>>> +{ >>> Comment is a bit misleading because we don't emit anything here. >> >> Yeap, forgot to update the comment after stealing the code from Alpha's port. > > All this copy-pasting... :( I ranted the other day exactly > about this copy-pasted function. > > While you're editing in these parts, how about making this > "bool emit_atomic_barrier_p (enum memmodel, bool pre)" and move it to > the middle-end, say emit-rtl.c? > > You don't have to change other ports, but you get the privilege > of taunting them. :]
I've posted a separate patch to unify code for several targets. -- Maxim Kuvyrkov CodeSourcery / Mentor Graphics