UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #116 The MMX=YES always emits SSE code
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Engine
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    1. Very low
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (1)
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/116 Item 116] imported from sourceforge.net tracker on 2013-01-28 18:11:52

Checked out revision 1661.

Compilation fails with BUILD_WITH_MMX=YES.

Makefile:
BUILD_SDLUFO=YES # use SDL for cdrom, sound and
maybe renderer (selectabl
e)
BUILD_GLX=NO # X11 GLX driver
BUILD_DEDICATED=YES # build a dedicated ufo server
BUILD_ALSA=YES # build with alsa-support
BUILD_WITH_SHADER=YES # build with shader support
HAVE_IPV6=NO # Compile with IPv6 (protocol
independent API). Tested o
n FreeBSD
HAVE_GETTEXT=NO # Compile with
multilanguage-support?
BUILD_WITH_DGA=NO # dga support compiled in
BUILD_WITH_VIDMODE=YES # vidmode support
BUILD_WITH_MMX=YES # MMX support
BUILD_PARANOID=NO # paranoid mode for debug
BUILD_FOR_PROFILING=NO # build with -pg option for
profiling via gprof
BUILD_COMPILETOOLS=YES # build ufo2map bsp compile tool

~/waste/ufoai/src$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) XP 2600+
stepping : 0
cpu MHz : 2067.484
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8
apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
syscall mmxext 3dnowext 3dnow ts
bogomips : 4139.01

~/waste/ufoai/src$ make release

* [UFO] ../releasei386/client/cl_actor.o

* [UFO] ../releasei386/client/cl_basemanagement.o

* [UFO] ../releasei386/client/cl_research.o

* [UFO] ../releasei386/client/cl_market.o

client/cl_market.c: In function
'AIR_GetStorageSupplyCount':

client/cl_market.c:88: warning: value computed is not used

* [UFO] ../releasei386/client/cl_campaign.o

client/cl_campaign.c: In function 'CL_GameSave':

client/cl_campaign.c:1584: warning: unused variable
'message'

client/cl_campaign.c: At top level:

client/cl_campaign.c:1022: warning:
'CP_ListUfosOnGeoscape' defined but not used

* [UFO] ../releasei386/client/cl_fx.o

* [UFO] ../releasei386/client/cl_input.o

* [UFO] ../releasei386/client/cl_le.o

* [UFO] ../releasei386/client/cl_main.o

* [UFO] ../releasei386/client/cl_menu.o

* [UFO] ../releasei386/client/cl_parse.o

* [UFO] ../releasei386/client/cl_particle.o

* [UFO] ../releasei386/client/cl_shader.o

* [UFO] ../releasei386/client/cl_scrn.o

* [UFO] ../releasei386/client/cl_sequence.o

* [UFO] ../releasei386/client/cl_team.o

* [UFO] ../releasei386/client/cl_inventory.o

* [UFO] ../releasei386/client/cl_ufopedia.o

client/cl_ufopedia.c: In function 'MN_UpPrev_f':

client/cl_ufopedia.c:300: warning: 'upc' is used
uninitialized in this function

* [UFO] ../releasei386/client/cl_view.o

* [UFO] ../releasei386/client/console.o

* [UFO] ../releasei386/client/keys.o

* [UFO] ../releasei386/client/snd_dma.o

* [UFO] ../releasei386/client/snd_mem.o

* [UFO] ../releasei386/client/snd_mix.o

* [UFO] ../releasei386/client/cmd.o

* [UFO] ../releasei386/client/cmodel.o

* [UFO] ../releasei386/client/common.o

* [UFO] ../releasei386/client/crc.o

* [UFO] ../releasei386/client/cvar.o

* [UFO] ../releasei386/client/files.o

* [UFO] ../releasei386/client/md4.o

* [UFO] ../releasei386/client/net_chan.o

* [UFO] ../releasei386/client/scripts.o

* [UFO] ../releasei386/client/sv_ccmds.o

* [UFO] ../releasei386/client/sv_game.o

* [UFO] ../releasei386/client/sv_init.o

* [UFO] ../releasei386/client/sv_main.o

* [UFO] ../releasei386/client/sv_send.o

* [UFO] ../releasei386/client/sv_user.o

* [UFO] ../releasei386/client/sv_world.o

* [UFO] ../releasei386/client/q_shared.o

In file included from game/q_shared.c:25:

/usr/lib/gcc/i486-linux-gnu/4.1.2/include/xmmintrin.h:34:3:
error: #error "SSE instruction set not enabled"

game/q_shared.c: In function '_VectorSubtract':

game/q_shared.c:886: error: '__m128' undeclared (first
use in this function)

game/q_shared.c:886: error: (Each undeclared identifier
is reported only once

game/q_shared.c:886: error: for each function it
appears in.)

game/q_shared.c:886: error: expected ';' before 'xmm_veca'

game/q_shared.c:888: error: 'xmm_veca' undeclared
(first use in this function)

game/q_shared.c:888: warning: implicit declaration of
function '_mm_load_ss'

game/q_shared.c:889: error: 'xmm_vecb' undeclared
(first use in this function)

game/q_shared.c:890: error: 'xmm_out' undeclared (first
use in this function)

game/q_shared.c:890: warning: implicit declaration of
function '_mm_sub_ss'

game/q_shared.c:891: warning: implicit declaration of
function '_mm_store_ss'

game/q_shared.c: In function '_VectorAdd':

game/q_shared.c:913: error: '__m128' undeclared (first
use in this function)

game/q_shared.c:913: error: expected ';' before 'xmm_veca'

game/q_shared.c:915: error: 'xmm_veca' undeclared
(first use in this function)

game/q_shared.c:916: error: 'xmm_vecb' undeclared
(first use in this function)

game/q_shared.c:917: error: 'xmm_out' undeclared (first
use in this function)

game/q_shared.c:917: warning: implicit declaration of
function '_mm_add_ss'

game/q_shared.c: In function '_VectorCopy':

game/q_shared.c:940: error: '__m128' undeclared (first
use in this function)

game/q_shared.c:940: error: expected ';' before 'xmm_in'

game/q_shared.c:942: error: 'xmm_in' undeclared (first
use in this function)

game/q_shared.c: In function 'VectorScale':

game/q_shared.c:990: error: '__m128' undeclared (first
use in this function)

game/q_shared.c:990: error: expected ';' before 'xmm_in'

game/q_shared.c:992: error: 'xmm_in' undeclared (first
use in this function)

game/q_shared.c:993: error: 'xmm_scale' undeclared
(first use in this function)

game/q_shared.c:994: error: 'xmm_out' undeclared (first
use in this function)

game/q_shared.c:994: warning: implicit declaration of
function '_mm_mul_ss'

make[1]: *** [../releasei386/client/q_shared.o] Error 1

make: *** [build_release] Error 2

===== Comments Ported from Sourceforge =====

====== screamingwns (2006-06-25 20:02:13) ======

Logged In: YES
user_id=1535905

The title of this report should be more like "Will not
compile under GCC 4.1.2.

The report included seems to indicate an error in GCC or
compile-time options; /usr/lib/gcc/i486-linux-gnu/4.1.2/
include/xmmintrin.h:34:3:
error: #error "SSE instruction set not enabled"

It should be on the architecture involved.
====== mikonmimuw (2006-06-26 17:28:23) ======

Logged In: YES
user_id=1323456

I'm glad you are a Project Coder, screamingwns, we need
those. Now, how does your remark help us? Do you suspect
other versions of GCC should be fine? Non-GCC compilers?

What does it mean:
> It should be on the architecture involved.
My architecture is i386. What can I do to help?

====== screamingwns (2006-06-26 18:12:05) ======

Logged In: YES
user_id=1535905

I am using GCC 4.1.0 and have not encountered this problem.

It is either:

1. A bug particular to GCC 4.1.2.

-or-

2. An error in the options passed to GCC (e.g. enabling MMX,
but not SSE, even though they should be available on your
arch / compiler).

It'll need to be investigated more thoroughly. I'm going to
be working on restructuring the code and re-writing the
Makefiles to make them smaller and easier to maintain. This
problem should hopefully correct itself in the process...

====== screamingwns (2006-07-02 13:47:58) ======

Logged In: YES
user_id=1535905

Added -msse option to makefile in 1765

Should now compile and emit MMX + SSE code (NB, will NOT
run on < P3 or < Athlon XP/MP.

This is a major oversight; the code should detect MMX, SSE,
SSE2 and SSE3 as well as 3D Now! and use seperate code
paths, as appropriate. This should be done purely with
default macros, i.e., those defined by specifying gcc -mmmx.

For archs that do not support SSE, you will be forced to
use BUILD_WITH_MMX=NO for now.

This is really an issue of optimisation, so will be a low
priority for now.
====== mikonmimuw (2006-07-02 15:06:43) ======

Logged In: YES
user_id=1323456

Thanks a lot. Now FPS in the credits screen jumped to 900
with the first guy walking and 500 on average (compared to
below 300 earlier). Though it can be other code changes, too...
====== tlh2000 (2007-04-02 10:14:56) ======

Logged In: YES
user_id=116930
Originator: NO

if this is still in 2.1 - please reopen
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif