lkml.org 
[lkml]   [1999]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] smp-2.3.29-B2, spinlocks, reboot
Robert Redelmeier wrote:
> My understanding is that you don't have a chance of atomicity unless
> the address is aligned [so it won't cross cache lines]. I've observed
> gcc being very poor at alignment, inserting .align 2 when .align 4 would
> have been better. And gas using the last given .align when there are
> multiples. So movb is a good idea. Or is there something else?

The movb is a smaller instruction, that's all.
There is no alignment problem -- spinlocks are always properly aligned.

If gcc is inserting .align 2 in ELF output, that should be because the
object/structure only requires 2 byte alignment. I.e., the largest
element is a short. .align 2 is perfectly normal in a.out output, where
it means "align to 1<<2".

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.042 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site