[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3DNow! and MMX



Felix Kollmann wrote:

> But I want do it the directest way.
> To make it clear... do you know this doesn't work or do you think so?

I don't know for sure - but it sounds like one of those CPU
instructions that might be disallowed in 'user mode'.
 
> I think there is nobody who did something like this. Wherever you ask,
> nobody can say: "No, you have to do that this way...".

That's true (at least as far as my knowledge extends).
 
> Okay. How can I read the information from /proc/cpuinfo ?

Pretend it's an ASCII text file. Just fopen it and read the
text.  You can see what's in it by just typing:

   cat /proc/cpuinfo

It'll say stuff like (for my 450MHz Xeon CPU):

  processor       : 0
  cpu             : 686
  model           : 5
  vendor_id       : GenuineIntel
  stepping        : 3
  fdiv_bug        : no
  hlt_bug         : no
  f00f_bug        : no
  fpu             : yes
  fpu_exception   : yes
  cpuid           : yes
  wp              : yes
  flags           : fpu vme de pse tsc msr pae mce cx8 apic 11
                                        mtrr pge mca cmov 16 17 mmx 24
  bogomips        : 447.28


Notice it says "mmx" on the 'flags' line...I guess that's
what you need.

This isn't a *real* file - it's a device that's being read
that the kernel intercepts and does the necessary hardware
queries. Hence, you can't edit it or anything like that.
But under Linux and UNIX, "a device is a file is a device".

--
Steve Baker                (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-2466 (Fax)
Work: sjbaker@hti.com      http://www.hti.com
Home: sjbaker1@airmail.net http://web2.airmail.net/sjbaker1