Subject: Re: advice on some inline assembler code
To: None <jonb@metronet.com>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: port-pc532
Date: 09/28/1998 13:57:46
Jon Buller <jonb@metronet.com> writes:

  > Ian Dall <Ian.Dall@dsto.defence.gov.au> writes:
  > [ My comment about not knowing quite where to find info about the
  >   __asm__ syntax and options deleted... ]

  >> Well, I assume you have read the gcc info documentation. If not, look
  >> under "C Extensions" and "Extended Asm". I find it is not too bad, although
  >> you need to follow the constraints cross reference to find out what all
  >> the letters mean.

  > OK, I admit that I haven't looked too recently.  I was searching
  > everywhere for anything back when I was trying to add the quad int
  > operations, and didn't find much.  Even in the "Porting GCC"
  > document.
  > [...]

  > work around the bugs that are left".  The best advice I found in
  > the docs was something to the effect of "Find another machine
  > description that is close to the processor you'll be working with
  > and modify that as necessary."  Pretty poor advice for someone who
  > has not ever looked at the innards of big compilers before, but
  > that's about all I found.

Ah well porting is an other issue! There is a lot of valuable
documentation for writing machine descriptions but there is also a lot
of holes and some of it is misleading or even incorrect. Particularly
when you want to call internal gcc functions from the MD parts, UTSL
seems to be unavoidable. If I were advising someone doing porting work
I would say they should definitely read the documentation, but that
they should be slightly skeptical when they do so!

However, the *user* documentation is not too bad and the specific
things relevant to your problem do seem to be there, (the need for "="
on the output constraints, the syntax for multiple input or multiple
output operands etc).

Ian