dimanche 27 avril 2014

fpCR 3dfx [eng]

What a beautiful optimization for 3dfx drivers of Warp3D !

Some explanations are necessary : the old Gcc 2.90.27 was using a 6 instructions slow routine to round some FPU digit before sending them to the GPU :

This routine is present very often in the whole driver, it got the advantage to be a 100% compatible with the 68030/68882, the 68040 and the 68060.

The trouble is that it is very slow... In fact, it is quite possible to replace it with a single statement : fintrz.x !

But there is alas a but : fintrz is not in the transistors of 68040 ! It is emulated by the 68040.library.

Although present in the 68882 of the 68030, engineers at Motorola had the brilliant idea to reinstate it in the 68060 ! And, sigh, for our case here, we will win many cycles !!

So there had to make a choice with this fpCR routine :
  1. Whether kept it as it is for not slow down the 68040
  2. Or replace it by fintrz for favorise in speed the 68030 and 68060

It's the second choice which I made : sorry for the 68040 users... It's better to benefit the 68060. Besides, most accelerator cards for Amiga accepts upgrade to 68060, so everyone has the opportunity to use a 060...

After replacing the whole routine by fintrz, the 3dfx driver now weighs 11.3 Kb less !

Having some problems with Ma Config 1, I'm testing everything, and the beta 5 archive will be available soon in Downloads...

(translated by Squaley)

Aucun commentaire:

Enregistrer un commentaire

Laissez vos commentaires ici :