lkml.org 
[lkml]   [1999]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] smp-2.3.30-A1, mb(), wmb(), rmb()
Jes Sorensen wrote:
> Linus> which instead of using a read-modify-write cycle and a long
> Linus> immediate just uses a single write-cycle. It makes gcc allocate
> Linus> a word on the stack, and sometimes that might be unnecessary,
> Linus> but it should be smaller and faster. You might want to check
> Linus> out code generation..
>
> This can actually become a bit expensive if you use mb() a lot in your
> code, ie. if you use __raw_writel() etc.

GCC still doesn't reuse stack slots for non-overlapping variables?
(Quick test later) You're right. GCC 2.95.1 uses different slots.

This should work:

asm volatile ("movl %%ebp,-4(%%esp)" : : : "memory");

-- 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.020 / U:23.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site