goshhhy / 486quake

quake but it do a faster
52 stars 6 forks source link

486/r_drawa.s: LTransformAndProject: deinterlace and remove fxch instructions #3

Closed goshhhy closed 3 years ago

goshhhy commented 3 years ago

this function has floating point code interlaced to optimize for the pentium fpu pipeline, with fxch instructions which are free on the pentium and alleviate pipeline stalls resulting in faster operation.

on nearly any other processor this serves no function except to take additional cycles to do the same operation. rewrite this function to avoid the use of fxch instructions - every fxch removed is 4 cycles saved on a 486.