project-navigation
Personal tools

Author Topic: make modification -> verification  (Read 2998 times)

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
make modification -> verification
« on: May 26, 2010, 02:25:47 pm »
I've made some modification related to mk files (my first time)
configure
defs.mk
tools.mk
platform_specific.mk

Can someone proof this to be working on linux
My focus was to add optimations for ufo2map
configure --enable-release --disable-client --disable-uforadiant --disable-dedicated --disable-tests CFLAGS="-O3 -march=k8 -v -mfpmath=sse -msse3"
will compile maps two times faster than standard settings
This mod should not break standard settings....

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: make modification -> verification
« Reply #1 on: May 26, 2010, 07:43:22 pm »
works - but -ffloat-store is needed for windows, too - even if it's slower it's needed to be able to play with other systems via multiplayer.

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: make modification -> verification
« Reply #2 on: May 27, 2010, 08:55:56 am »
I disable ffloat-store only on ufo2map and ufomodel

I've made a lot of test
The resulting map is exactly the same if you do sse or x87 ffloat-store (my buildscript do use it too)
A paranoia.c test show me that sse is working properly while x87 ffloat-store produce an error
http://ufoai.ninex.info/forum/index.php?topic=3604.msg27273#msg27273

ufo2map and ufomodel
dont relay on exactly 80bit precision
the 128bit from sse dont do any good but we/you/i can relay on the precision

gcc
Code: [Select]
-mfpmath=sse
The resulting code should be considerably faster in the majority of cases and avoid the numerical instability problems of 387 code,
but may break some existing code that expects temporaries to be 80bit.

This is the default choice for the x86-64 compiler.

-ffloat-store
Do not store floating point variables in registers, and inhibit other options that might change whether a floating point value is taken from a register or memory.

This option prevents undesirable excess precision on machines such as the 68000 where the floating registers (of the 68881)
keep more precision than a double is supposed to have. Similarly for the x86 architecture.
For most programs, the excess precision does only good, but a few programs rely on the precise definition of IEEE floating point.
Use -ffloat-store for such programs, after modifying them to store all pertinent intermediate computations into variables.
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html#Optimize-Options