Richard Henderson wrote: > On Tue, Nov 02, 1999 at 08:41:15PM +0000, Peter Rival wrote: > > mb > > .section .text2,"ax" > > 6: > > .previous > > addl $1,$31,$1 <-- Line 655 > > This fixes it. I do wonder what exactly you're doing with > labels in sections with no code attached to them... > I wonder myself sometimes...;) Basically I was trying to do something like "try to grab the read lock once, and if you fail, bail out". I was just trying to modify read_lock to do something like that. I suppose it would have been better to write it more like this: static __inline__ int _read_try_lock_(void *lock) { long temp,result=0; __asm__ __volatile__( "1: ldl_l %1,%0\n" " blbs %1,6f\n" " subl %1,2,%1\n" " stl_c %1,%0\n" " beq %1,6f\n" " mb\n" ".section .text2,\"ax\"\n" "6: mov %1,%2\n" ".previous" : "=m" (__dummy_lock(lock)), "=&r" (temp), "=&r" (result) : "m" (__dummy_lock(lock)) ); return (result != 1); /* Was the lock grabbed? */ } But that looks kinda ugly. I really don't want to unconditionally copy lock into the result, as I've already set the result to zero. Hmmm...any assembly experts have a better take on it? BTW, which tree is this against - 2.95.2 or egcs 1.1.2? Thanks for looking into it! - Pete > > * config/tc-alpha.c (alpha_align): Check, don't assert, that > the previous label was in the current section before playing > with auto-alignment. > > Index: gas/config/tc-alpha.c > =================================================================== > RCS file: /cvs/binutils/binutils/gas/config/tc-alpha.c,v > retrieving revision 1.6 > diff -c -p -d -r1.6 tc-alpha.c > *** tc-alpha.c 1999/10/18 22:29:14 1.6 > --- tc-alpha.c 1999/11/08 00:42:40 > *************** alpha_align (n, pfill, label, force) > *** 4756,4769 **** > > alpha_current_align = n; > > ! if (label != NULL) > { > - assert (S_GET_SEGMENT (label) == now_seg); > symbol_set_frag (label, frag_now); > S_SET_VALUE (label, (valueT) frag_now_fix ()); > } > > ! record_alignment(now_seg, n); > > /* ??? if alpha_flag_relax && force && elf, record the requested alignment > in a reloc for the linker to see. */ > --- 4756,4768 ---- > > alpha_current_align = n; > > ! if (label != NULL && S_GET_SEGMENT (label) == now_seg) > { > symbol_set_frag (label, frag_now); > S_SET_VALUE (label, (valueT) frag_now_fix ()); > } > > ! record_alignment (now_seg, n); > > /* ??? if alpha_flag_relax && force && elf, record the requested alignment > in a reloc for the linker to see. */ > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com