[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assembler problems



> 1) FPU instructions like FMOVE (and several other 68882 instructions as
>    well) aren't recognized by the compiler, while some of them are being
>    bought successfully. Will the 'new' gas solve it?

It sounds strange that your gas wouldn't handle FMOVE. That is after all
a necessary instruction when you want to use the FPU. Perhaps it's some
'040 specific version of FMOVE?

Anyway, there is a version of gas around that has worked fine with all
floating point stuff I've thrown at it (admittedly not that much, but
including '040 instructions). I'm not sure where I got it from, though.

> 2) The assembler module contains two functions, those need to be called
>    with register parameters. These are six pointers located in registers
>    A0-A5 and a short int value passed in the register D0. How to force
>    the compiler to load them to the appropriate registers before function

Standard gcc can't do register parameters at all.

As someone else suggested, use a wrapper or some inline assembly code.
You might find some examples of the latter in the standard headers and I
guess someone around here can probably show you how it's done. It's been
a long time since I did it myself, but I might be able to dig up something,
if necessary.

> The program I am talking about is not a Unix source, its from Amiga SAS C.
> 
> Thanks for any help (the program is *deadly* worth porting).

Any chance that it might be ShapeShifter?
Now _that_'s a program that should have been ported years ago!

-- 
  Chalmers University   | Why are these |  e-mail:   rand@cd.chalmers.se
     of Technology      |  .signatures  |            johan@rand.thn.htu.se
                        | so hard to do |  WWW/ftp:  rand.thn.htu.se
   Gothenburg, Sweden   |     well?     |            (MGIFv5, QLem, BAD MOOD)