6888-FU! Smart optimizer for FPU code

GFA, ASM, STOS, ...

Moderators: Zorro 2, Moderator Team

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

6888-FU! Smart optimizer for FPU code

Post by dml »

I have decided to link the FPU code optimizer I wrote while working on the Q2 project.
6888fu.zip
It is targeted specifically at 68882 (not 68881 or 68040 or 68060, which have completely different performance characteristics). It automatically reorders and register-renames sequences of code to minimize pipeline stalls, sometimes saving quite a lot of cycles. Resulting code will of course still work on other FPUs but it's only _optimizing_ cycles for the 68882 pipeline.

It does not modify instructions, or use peephole or other replacement-style optimizations. It is a pure scheduler/renamer. It can however end up using more (or fewer) registers than the original code, due to the renaming process, if it permits better ordering. It will try to optimize existing use of registers.

I'm considering doing one of these for the full 68030+FPU instruction set but that will be quite a bit of work, so it won't appear very soon :)

Instructions are in the .txt file.

It is Windows-only, but should be usable with WINE on Linux/OSX if you feel the need.

Can't imagine many people coding for 68882 these days - but if you need to do that, this tool is very handy! It works!

Bugs, suggestions etc. to the usual place.
You do not have the required permissions to view the files attached to this post.
User avatar
shoggoth
Nature
Nature
Posts: 1447
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden

Re: 6888-FU! Smart optimizer for FPU code

Post by shoggoth »

Nice! I like the idea of a post-compiler optimization thingy; I usually check the GCC assembly output - which means I have a permanent palm-print in my forehead nowadays.
Ain't no space like PeP-space.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3988
Joined: Sat Jun 30, 2012 9:33 am

Re: 6888-FU! Smart optimizer for FPU code

Post by dml »

shoggoth wrote:Nice! I like the idea of a post-compiler optimization thingy; I usually check the GCC assembly output - which means I have a permanent palm-print in my forehead nowadays.
Haha! :)

Return to “Coding”