MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

twistyAdministrator
Space Lord
Reged: 09/18/03
Posts: 15570
Send PM
Architecture flags for MAME
12/24/07 06:46 PM



Quote:


Reminder: MAMEdev strongly recommends using no ARCHOPTS for Intel Core-series processors (and especially 64-bit builds). They are so good that you do not need to optimize especially for them. The stock OPTIMIZE=3 is fine.

-R. Belmont





EDIT by Mr. Do November 9, 2010:

I'll leave this thread here, for posterity, but here are a couple notes regarding ARCHOPTS and current MAME builds (>2010). (Also note, I've removed the ARCHOPTS section from the compiling how-to page):

Quote:


[Aaron Giles]

Remember, ARCHOPTS is not officially supported. No official testing is done with them, and they can be tweaked until the compiler does bad things. Looks like the new tools don't generate good code with some of them.

If you leave it blank, your builds are still optimized. Further, they are optimized in the same way the devs builds are, and thus guaranteed not to fall over.





Quote:


[Aaron Giles]

Stop messing with the ARCHOPTS. It is silly on 64-bit. 64-bit only started showing up with the Core line of chips anyways, so it is by default already optimized for them.





Quote:


[R.Belmont]

FACT: Messing with optimizer flags does not make a single game playable on systems where it wasn't before.
FACT: Messing with optimizer flags is PROVEN to cause bugs (including gameplay logic errors) in games that don't have them on a normal MAME compile.









Quote:


[Biafra Republic]

The way things are with the current toolchain, here's my not-so-definitive list of flags for ARCHOPTS, organized by newer CPU:

Intel Core 2 Solo/Duo/Quad/Extreme:
ARCHOPTS="-march=core2 -mssse3"

Intel Core i3/i5/i7:
ARCHOPTS="-march=core2 -msse4.2"

Intel Atom:
ARCHOPTS="-march=core2 -mtune=generic -mssse3 -mfpmath=sse"

AMD Phenom x4/x3, Phenom II x6/x4/x3/x2, and Phenom-based Athlon X2 and Sempron:
ARCHOPTS="-march=amdfam10 -msse4a"

If all else fails:
ARCHOPTS="-march=native"






Quote:


[Vas Crabb]

As of MAME 0.121u2, architecture flags for each CPU are no longer included in the stock makefile. You can specify them in an environment variable or command-line option to make called ARCHOPTS. Here are some useful options for a variety of IBM, Motorola and Intel CPUs. If you can think of any other options that would be useful to publish, post them in a reply to this thread.

There are two classes of options: "Maximum Tune" and "Just the Features".

"Maximum Tune" will tell the compiler about the features of the CPU, and also cause it to try to schedule instructions in such a way that the CPU pipelines are kept full. The CPUs that benefit most from this are the Intel Pentium 4, Motorola G4 7450 and IBM Cell (I know, there's no "Maximum Tune" option for this CPU yet). However, using "Maximum Tune" optimisation for x86 and x64 chips tends to bring out the bugs in GCC, so it isn't recommended for newer Intel CPUs. (Using "Maximum Tune" for PowerPC CPUs doesn't bring out the bugs - IBM and Apple have done a lot of work in this area.)

"Just the Features" will tell the compiler about optional features the CPU may have (additional FPU capabilities, vector unit, 64-bit, etc.) but won't tell it to perform scheduling optimisation. This may not be quite as fast, but it tends to be more reliable. These options are recommended for confirming bugs.

"Maximum Tune" options (i.e. architecture-specific optimisation and instruction scheduling tuning):

IBM G3 (750):
ARCHOPTS=-mcpu=G3

Motorola G4 (earlier - 7400, 7410, 7447, etc.):
ARCHOPTS=-mcpu=7400

Motorola G4 (later - 7450, etc.)
ARCHOPTS=-mcpu=7450

IBM G5 (970):
ARCHOPTS=-mcpu=G5

Intel Pentium 4 (earlier, no SSE3):
ARCHOPTS=-march=pentium4

Intel Pentium 4 (later, with SSE3):
ARCHOPTS=-march=prescott

Intel Pentium 4 (later, with 64-bit capability):
ARCHOPTS=-march=nocona

Intel Pentium M, Intel Core:
ARCHOPTS=-march=pentium-m

Intel Core 2:
ARCHOPTS="-march=pentium-m -msse3"

"Just the Features" options (take advantage of CPU features, but don't do fancy scheduling tricks):

IBM G3 (750):
ARCHOPTS="-mpowerpc -mpowerpc-gfxopt"

Motorola G4 (7400, 7410, 7447, 7450, etc.):
ARCHOPTS="-mpowerpc -mpowerpc-gfxopt -maltivec"

IBM G5 (970), IBM Cell (PlayStation 3), IBM POWER5:
ARCHOPTS="-mpowerpc64 -mpowerpc-gfxopt -mpowerpc-gpopt -maltivec"

Intel Pentium 4 (earlier, no SSE3), Intel Pentium M, Intel Core:
ARCHOPTS=-msse2

Intel Pentium 4 (later, with SSE3), Intel Core 2:
ARCHOPTS=-msse3






Quote:


[twisty]

MAME's previous options...

Pentium  :     ARCHOPTS = -march=pentium
I686 : ARCHOPTS = -march=pentiumpro
Athlon : ARCHOPTS = -march=athlon
AthlonXP : ARCHOPTS = -march=athlon-xp
P4 : ARCHOPTS = -march=pentium4
AMD64 : ARCHOPTS = -march=athlon64
*PM : ARCHOPTS = -march=pentium3 -msse2

*Only For Older Compiling Tools (mingw-mame-20070617.exe and earlier), Otherwise Use -march=pentium-m







Edited by twisty (11/09/10 09:23 PM)






Entire thread
Subject Posted by Posted on
* Architecture flags for MAME twistyAdministrator 12/24/07 06:46 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 188 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 9569