Opened 8 years ago

Last modified 2 years ago

#433 new task

Sort out FP rounding modes

Reported by: Philip Taylor Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:


SpiderMonkey likes to change the FPU rounding mode (see "Rounding difference between JIT and interpreter") to guarantee consistency. We need to guarantee consistency in SpiderMonkey for the synchronised simulation to work (though we might not use the JIT; not sure yet). So we need to be careful about these modes and make sure they're correct before we call into any SpiderMonkey code.

It's hard to know when the mode will be changed (platform default, our init code, SpiderMonkey init code, other code, drivers, etc); probably it would be good to add run-time checks to make sure it sticks with what SpiderMonkey requires. Might need to worry about SSE FTZ/DAZ flags too.

Also need to test it across OSes and 32/64-bit and compilers. And, just to be certain, the game itself should probably run some JS test code on startup to check the results are consistent rather than getting mysterious OOS errors in a network game.

Change History (3)

comment:1 Changed 7 years ago by (none)

Milestone: Unclassified

Milestone Unclassified deleted

comment:2 Changed 7 years ago by Andrew

Milestone: Backlog

comment:3 Changed 2 years ago by stanislas69

Is it still relevant with the latest version ?

Note: See TracTickets for help on using tickets.