Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CPU registers question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
calhoun
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 91
Location: Point Pleasant, NJ

PostPosted: Tue Jan 06, 2004 5:23 pm    Post subject: CPU registers question Reply with quote

I have a Pentium 4 at work and Athlon Tbird / XP at home. What USE flags should I use for each processor type? (ie MMX, SSE, 3Dnow ...)

Pentium 4

Athlon Tbird

Athlon XP

Thanks in advance
:)
Back to top
View user's profile Send private message
Instinct82
n00b
n00b


Joined: 16 Aug 2003
Posts: 42
Location: Trier, Germany

PostPosted: Tue Jan 06, 2004 5:28 pm    Post subject: Reply with quote

Searching the forums will give you many different USE flags for your systems.

Some common "safe" flags can be found here: http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html
_________________
my gentoo boxes
Desktop:
AMD Athlon XP 2000+
512MB DDR
GeForce3 Ti200
Samsung SyncMaster 193T
Laptop:
Asus M6800N 1,5GHz
768MB DDR
Radeon 9600 Mobility
Router:
Intel Pentium 90, 128MB RAM, True Headless
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Jan 06, 2004 6:23 pm    Post subject: Reply with quote

If you have a running Linux on either system (pop in the LiveCD...) this is what you do:

Code:

#cat /proc/cpuinfo | grep flags


This will give you a list of processor flags, including any supported instruction set extensions.
These include mmx, 3dnow, sse and sse2.

All but sse2 can be enabled / used in Gentoo at will, since gcc does not have an sse2 option yet (AFAIK).


Instinct - smart reply, but those are not USE flags - they're C flags.

Still a good idea, of course - they may have a bigger impact on performance than the CPU USE flags (especially -O3).

Note that, while -O3 seems to be quite stable now, the kernel still prohibits using it - it will always compile with -O2.
Back to top
View user's profile Send private message
calhoun
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 91
Location: Point Pleasant, NJ

PostPosted: Tue Jan 06, 2004 6:31 pm    Post subject: Reply with quote

adaptr wrote:
If you have a running Linux on either system (pop in the LiveCD...) this is what you do:

Code:

#cat /proc/cpuinfo | grep flags


This will give you a list of processor flags, including any supported instruction set extensions.
These include mmx, 3dnow, sse and sse2.

All but sse2 can be enabled / used in Gentoo at will, since gcc does not have an sse2 option yet (AFAIK).


Instinct - smart reply, but those are not USE flags - they're C flags.

Still a good idea, of course - they may have a bigger impact on performance than the CPU USE flags (especially -O3).

Note that, while -O3 seems to be quite stable now, the kernel still prohibits using it - it will always compile with -O2.


Thanks for the reply. I was referring to the USE= in make.conf, but I guess they can also be set in the CFLAGS= area too. If I set them in CFLAGS, should I still set them in the USE= line?

Back to the original question, does sse work on both Pentium 4 and Athlon chips? Same question for MMX and 3DNow. I tried finding this info on Intel/AMD pages but I don't think i was searching for the right thing. :D
Back to top
View user's profile Send private message
calhoun
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 91
Location: Point Pleasant, NJ

PostPosted: Tue Jan 06, 2004 6:48 pm    Post subject: Reply with quote

I think I found it at AMD. Instruction sets is what I was looking for.

3DNow and MMX for AMD.

http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/22466.pdf

Still can't find anything on intel. SSE2 is listed. MMX and SSE are probably intel instructions as stated by the use.desc. I'm not sure about 3DNow thou.
Back to top
View user's profile Send private message
Tamerz
Apprentice
Apprentice


Joined: 29 Apr 2003
Posts: 232
Location: Chicago IL, USA

PostPosted: Tue Jan 06, 2004 6:57 pm    Post subject: Re: CPU registers question Reply with quote

Pentium 4 - MMX, SSE, SSE2

Athlon Tbird - Not really sure

Athlon XP - MMX, SSE, 3DNow
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Tue Jan 06, 2004 7:06 pm    Post subject: Reply with quote

3dnow is amd only. There is an enhanced variant, I don't remember what it's called, that is on recent athlons (I think athlon-xp and up)

athlon-xp can handle sse, but not sse2.
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Tue Jan 06, 2004 9:28 pm    Post subject: Reply with quote

calhoun wrote:
Thanks for the reply. I was referring to the USE= in make.conf, but I guess they can also be set in the CFLAGS= area too.

No they can't - where did you get that idea ?

calhoun wrote:
If I set them in CFLAGS, should I still set them in the USE= line?

Yes, of course - if you want to use them.

These two uses are separate from eachother: the compiler settings determine the instruction set the compiler will use to generate the code, but the USE flags will indicate whether you want support for these functions in situations where there are alternatives available, i.e. you want to compile with MMX but it could also be compiled with plain integer instructions.

For more info you will need to read/learn a little about CPU's in general.

calhoun wrote:
Back to the original question, does sse work on both Pentium 4 and Athlon chips? Same question for MMX and 3DNow.

Same answer: run the code. read the result. remember the result.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum