Messages in this thread | | | Date | Fri, 26 Nov 1999 12:53:51 +0100 | From | Jamie Lokier <> | Subject | Re: [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/
| |