Re: RE: __asm help..

2000-12-11 Thread Matt Dillon
: :But if gcc breaks that assumption, that implies it would break :alloca(), and presumably they wouldn't do that. : :Tony. :-- :f.a.n.finch[EMAIL PROTECTED][EMAIL PROTECTED] :"Dead! And yet there he stands!" alloca() is a GCC internal function, not a piece of __asm code.

Re: RE: __asm help..

2000-12-11 Thread Tony Finch
Matt Dillon <[EMAIL PROTECTED]> wrote: >:As long as gcc uses %ebp to address local variables and functoin parameters >:rather than %esp you should be fine. %esp will be preserved, but if %esp is >:for some odd reason used to address a variable during the C code, you are hosed. > >I strongly r

Re: __asm help..

2000-12-08 Thread Matt Dillon
: :foo = save_intr(); disable_intr(); .. restore_intr() :has 4 extra memory accesses. UGh. I put my foot in it. Let me qualify my remark... memory accesses that cause an L1 cache miss are a problem. Memory accesses to locations written to by other cpu's are a problem. Memory acc

Re: __asm help..

2000-12-08 Thread Matt Dillon
: :> :> Since all I WANT to do is :> pushf :> disable intr :> fiddle :> popf (chache hit) :> :> I am annoyed by the fact that I have all those extra bus cycles going on. :> I can live with it for development but it still annoys me. : :You haven't yet explained how you plan to disable interrupt

Re: __asm help..

2000-12-08 Thread Mike Smith
> > Since all I WANT to do is > pushf > disable intr > fiddle > popf (chache hit) > > I am annoyed by the fact that I have all those extra bus cycles going on. > I can live with it for development but it still annoys me. You haven't yet explained how you plan to disable interrupts on the other

Re: __asm help..

2000-12-08 Thread Julian Elischer
Matt Dillon wrote: > > :As long as gcc uses %ebp to address local variables and functoin parameters > :rather than %esp you should be fine. %esp will be preserved, but if %esp is > :for some odd reason used to address a variable during the C code, you are hosed. > > I strongly recommend aga

Re: __asm help..

2000-12-08 Thread Julian Elischer
Mike Smith wrote: > > > I'm trying to write some experimental mutex operations similar to those > > in -current, but to do differnt things (e.g. a read/write lock) > > however, I am having some problems with the __asm stuff. > > Julian; Wheels were invented around 1500BC. We don't need to go

Re: RE: __asm help..

2000-12-08 Thread Matt Dillon
:As long as gcc uses %ebp to address local variables and functoin parameters :rather than %esp you should be fine. %esp will be preserved, but if %esp is :for some odd reason used to address a variable during the C code, you are hosed. I strongly recommend against making assumptions about GC

Re: __asm help..

2000-12-08 Thread Mike Smith
> I'm trying to write some experimental mutex operations similar to those > in -current, but to do differnt things (e.g. a read/write lock) > however, I am having some problems with the __asm stuff. Julian; Wheels were invented around 1500BC. We don't need to go through all that again. -- .

RE: __asm help..

2000-12-08 Thread John Baldwin
On 08-Dec-00 Julian Elischer wrote: > I'm trying to write some experimental mutex operations similar to those > in -current, but to do differnt things (e.g. a read/write lock) > however, I am having some problems with the __asm stuff. > > What I want to do is to define some operations that wil

Re: __asm help..

2000-12-08 Thread Matt Dillon
:I'm trying to write some experimental mutex operations similar to those :in -current, but to do differnt things (e.g. a read/write lock) :however, I am having some problems with the __asm stuff. : :What I want to do is to define some operations that will :assemble down to: : pushfl :