On Tue, Feb 04, 2003 at 10:19:54PM +0800, "Watson" wrote:
> I can't find any document that tells how to make
> m68k asm inline with gcc - things like moving variables
> to and from registers before and after the m68k code.
>
> Any pointer to this kind of information?
As others have said, that'd be in the obscure document known as
"the manual". If you can't think where to find it :-), you might
consider typing "GCC manual" into Google, or looking on your hard
drive because prc-tools tries hard to make it available for you.
The relevant section is "Extended asm", and to be sure it is a
reference not a tutorial :-).
And Sean Charles wrote:
> NOTE: I once made the mistake of embedding code in the "g" (), like
> this, "g" (pS->member) and it was *late* and *a good while* before I
> discovered why that is a no no!
I hope you'll explain why that is. I do it all the time. It works
great. Less filling. More control where you want it.
> IIRC the "g" stands for general, as in, use any old general register.
> There's "a" for address register, "d" for data, "f" for floating point
> register and a few more.
You'll also find these register constraints explained in the manual
(the GCC one, since they're GCC syntax not as syntax).
John
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/