Fpu Test


notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Here is a of FPU demanding game, running on Pandora board:

http://www.youtube.com/watch?v=TGz52EIVN8s

It's running in pure software mode, 320x240 resolution scaled to fit screen.
I had some trouble adjusting my webcam for this video, dark places were too dark and bright too bright to see anything, so the quality is quite bad, unfortunately.
 
Last edited by a moderator:
notaz said:
Here is a of FPU demanding game, running on Pandora board:

http://www.youtube.com/watch?v=TGz52EIVN8s

It's running in pure software mode, 320x240 resolution scaled to fit screen.



Sorry the link doesn't seem to work. It goes to browse instead.
 
Last edited by a moderator:
is it this one http://www.youtube.com/watch?v=8HhIt8A-d34 with tests on psp and gp2x as well? the pandora test appears last in video.

this one as well? http://www.youtube.com/watch?v=ZuLLYzaZaJ4...feature=related
 
Last edited by a moderator:
notaz said:
Uh, it was processing a bit longer then usual, I just posted this thread too early.
Thanks notaz, it looks aaaawwweeeesssoommmmeee!
 
Last edited by a moderator:
Exophase said:
This is compiling to VFP right? Is it using fast mode?
What do you mean by fast mode? -ffast-math?
It's just compiled with hardware floats, i.e. it uses floating point instructions. And I ported it really quickly (one evening's effort), so not everything is optimal, obviously.
 
Last edited by a moderator:
notaz said:
Exophase said:
This is compiling to VFP right? Is it using fast mode?
What do you mean by fast mode? -ffast-math?
It's just compiled with hardware floats, i.e. it uses floating point instructions. And I ported it really quickly (one evening's effort), so not everything is optimal, obviously.


What I mean is that it's possible for Cortex-A8 to use run many single precision VFP opcodes on the NEON unit (so they're pipelined and not so slow). But this only happens when specific conditions are met. It might not yet be possible to do so in GCC. I'd be very curious if you could hack the conditions and see if the FPS change, and how much (if it still works).

Just bear in mind, that without this, and for the instructions that are not supported, VFP is pretty slow. It's more there for compatibility sake than to be highly useful.

From Cortex-A8 TRM:

CODE
13.5.4 RunFast mode
RunFast mode is the combination of the following conditions:
• the VFP coprocessor is in flush-to-zero mode
• the VFP coprocessor is in default NaN mode
• all exception enable bits are cleared to 0.

In RunFast mode the VFP coprocessor:
• processes subnormal input operands as zeros
• processes results that are tiny before rounding, that is, between the positive and
negative minimum normal values for the destination precision, as zeros
• processes input NaNs as default NaNs
• returns the default result specified by the IEEE 754 standard for overflow, division
by zero, invalid operation, or inexact operation conditions fully in hardware and
without additional latency.



And...

CODE

16.7.2 VFP instruction execution in the NFP pipeline
The NFP pipeline can execute a subset of the VFPv3 data-processing instructions more
quickly than the VFP coprocessor. The following constraints define which VFP
instructions are executable by the NFP pipeline:
• single-precision data-processing operations only
• RunFast mode must be enabled
• scalar only or non-short vector instructions

If these constraints are met, the following instructions can execute in the NFP pipeline:
• FADDS, FSUBS
• FABSS, FNEGS
• FMULS, FNMULS
• FMACS, FNMACS
• FMSCS, FNMSCS
• FCMPS, FCMPES
• FCMPZS, FCMPEZS
• FUITOS, FSITOS
• FTOUIS, FTOSIS
• FTOUIZS, FTOSIZS
• FSHTOS, FSLTOS
• FUHTOS,FULTOS
• FTOSHS, FTOSLS
• FTOUHS, FTOULS.

VFP instructions that execute in the NFP pipeline have results that are 32-bit
single-precision writes to the upper or lower half of the 64-bit register value. A
restriction that applies to VFP instructions executing in the NFP pipeline is that
instruction results cannot be forwarded early to subsequent instructions.
 
Last edited by a moderator:
Also note that Q2 uses double constants everywhere in the source and that C standard mandates run-time evaluation, which results in using double operations and double to single conversions. I had to change these constants for my PS2 port (MIPS 5900 was even worse than Cortex-A8 for doubles: they simply don't exist in HW :p). But there is a magic gcc option to force interpretation of double constants as single precision: -fsingle-precision-constant.

Hope this helps :)
 
Back
Top