Faster to convert the M680x0 assembler directly
to PowerPC assembler
conversion to C is a different skill and keeping
fixed registers for the lifetime of the program
whomever wrote that code has created issues for
anyone trying what you want... as registers don't
map properly outside assembler
--- Tony Wyatt <wyattaw(a)optushome.com.au> wrote:
Hi Belxjander,
Maybe I didn't describe it very well. The project is
to convert 68k
assembler into C that can be compiled on the A1 to
native PPC code. But
there are some other implied requirements, for
example, it must run like
greased lightning and be portable code that can be
easily recompiled for the
next platform that AOS is ported to.
I have translated most of the 68k assembler into
ANSI C, and I use SAS/C to
compile it into 68k binary. That binary runs on my
A4000 and on the A1
(emulated) exactly the same way as the original
assembler version. When the
translation and debugging of the C version is
complete, I will use GCC to
compile it for PPC on the A1.
The 68k code depends on a2, a3, a6 always pointing
to particular structures.
That makes it quick to call a function, because
those registers do not have
to be set up before the call. In C, though, I have
to pass the pointers as
function arguments each time. I *could* define a
proto that uses 68k
registers, but that would be useless when I
recompile the C code for the
PPC. Meantime I am stuck with having to load
arguments onto the stack for
the simplest function call, which in the 68k
assembler case, might not have
to load any registers at all. Bloody slow.
So the question is really: is there a
platform-independent way to
allocate some registers as permanent pointers,
persistent over the whole
program? Has this problem come up elsewhere in OS4?
What have other
developers done?
cheers
_______________________________________________
Openoffice-os4 mailing list
Openoffice-os4(a)samfundet.no
https://lists.samfundet.no/mailman/listinfo/openoffice-os4
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com