[A89] Re: Quiet in here... let's discuss something!


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

[A89] Re: Quiet in here... let's discuss something!




Hmm the download wasnt really a problem, took about 13 seconds :).
But it is kinda difficult what you're asking. I know a bit C, but i don't
know how to optimize well. And it's hard to optimize the S (ASM) files,
since its not human typed, labels are called L1 L2 L3 etc. C compiled code
is differs from code in ASM. In ASM paramaters are passed trough registers,
in this routine i see the stack is used. I compile with a68k, not with GNU,
the code is a bit different. I like ASM because it can be perfectly
optimized. A C programmer who doesnt know ASM and a C compiler don't know
that 30*y is not optimized when it's compiled to mulu #30,y (see my prev
post). I don't think optimizing a compiled C routine is good, rewriting is
better. But there are already some ASM sprite routines, aren't they? Or
can't they be used in TIGCC I don't know much about that I only use a68k,
m-link and the MS-DOS Editor:P

Good luck,

Cheiz


>
> Well, I can't really say anything about your optimizations, other than
"you
> seem to know what you're doing."  I know hardly any assembly.  Anyway, I'm
> in a kind of practical mood today, and you gave me an idea: Would you or
> anyone else like to optimize the three sprite functions from the TIGCC
> Library?  They are currently written in C (created by Zeljko Juric) and
> compiled to assembly using "gcc -Os".  The sources can be found at
> http://tigcc.ticalc.org/beta/tigccsrc.zip (sorry, large file; I'll post
the
> code here if needed).  Relevant files are sprite8.c, sprite16.c, and
> sprite32.c.  spritexx.s files (GNU assembly) are generated from them by
the
> compiler.
>
> The conventions are that d0-d2 and a0-a1 may be destroyed.  Also, if you
> decide to do this, please stay with GNU rather than A68k.  I don't know if
> optimizing for size or speed would be better in this case; probably for
> speed.
>
> Thanks in advance.
>
> Sebastian Reichelt
>
>
>
>



Follow-Ups: References: