Re: naked functions on x86 architecture

2009-06-12 Thread Andrew Haley
Zachary Turner wrote: > I guess the same reason people would want any asm functions in C > source code. Sometimes it's just the best way to express something. > Like in the example I mentioned, I could write 4 different functions > in assembly, one for each size suffix, wrap them all up in a sepa

Re: naked functions on x86 architecture

2009-06-12 Thread Zachary Turner
On Fri, Jun 12, 2009 at 12:39 PM, Andrew Haley wrote: > Zachary Turner wrote: >> On Fri, Jun 12, 2009 at 11:32 AM, Paolo Bonzini >> wrote: This is one example, but it illustrates a general concept that I think is really useful and I personally have used numerous times for lots of ot

Re: naked functions on x86 architecture

2009-06-12 Thread Andrew Haley
Zachary Turner wrote: > On Fri, Jun 12, 2009 at 11:32 AM, Paolo Bonzini > wrote: >>> This is one example, but it illustrates a general concept that I think >>> is really useful and I personally have used numerous times for lots of >>> other instructions than SCAS. If there is a way to achieve thi

Re: naked functions on x86 architecture

2009-06-12 Thread Zachary Turner
On Fri, Jun 12, 2009 at 11:32 AM, Paolo Bonzini wrote: >> This is one example, but it illustrates a general concept that I think >> is really useful and I personally have used numerous times for lots of >> other instructions than SCAS.  If there is a way to achieve this >> without using a naked fun

Re: naked functions on x86 architecture

2009-06-12 Thread Paolo Bonzini
This is one example, but it illustrates a general concept that I think is really useful and I personally have used numerous times for lots of other instructions than SCAS. If there is a way to achieve this without using a naked function then please advise. Keeping the __asm syntax, I'd be surpr

naked functions on x86 architecture

2009-06-12 Thread Zachary Turner
Hi, I know this has been discussed before, I have read through some of the archives and read about some of the rationale.  I want to raise it again however, because I don't think anyone has ever presented a good example of where it is really really useful on x86 architectures. In general, it is v