Author Topic: CPUID code, need to test on 64 bit AMD hardware.  (Read 1755 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6667
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
CPUID code, need to test on 64 bit AMD hardware.
« on: September 22, 2018, 09:47:50 PM »
The attached test piece uses CPUID to test if instruction sets are available. I have already tested this code on Intel 64 bit hardware and it is producing the correct results but I don't have access at an AMD machine to see if they also handle the current Intel sets as well as a few AMD specific ones.

Could I impose on anyone who is using a 64 bit AMD machine to test the small test piece for me.

This is what I currently get on this Haswell I use.

  Available Instruction Sets

  Vendor String = GenuineIntel

  1 = supported
  0 = not supported

  --------------
  INTEL Original
  --------------
  1 mmx
  1 sse
  1 sse2
  1 sse3
  1 ssse3
  1 sse4.1
  1 sse4.2
  1 avx
  1 avx2

  ------------
  AMD Specific
  ------------
  0 mmx Ext
  0 3Dnow
  0 3Dnow Ext

  Press any key ....
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

AW

  • Member
  • *****
  • Posts: 2328
  • Let's Make ASM Great Again!
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #1 on: September 22, 2018, 10:54:01 PM »
There is a need for more members with AMDs, particularly the most recent ones. I would love to have a ThreadRipper AMD, but would not make sense to fork more 2000 euros when I just purchased a computer a couple of months ago.

Adamanteus

  • Member
  • **
  • Posts: 212
    • LLC "AMS"
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #2 on: September 22, 2018, 11:59:10 PM »

  Available Instruction S

  Vendor String = Authent

  1 = supported
  0 = not supported

  --------------
  INTEL Original
  --------------
  1 mmx
  1 sse
  1 sse2
  1 sse3
  1 ssse3
  1 sse4.1
  1 sse4.2
  1 avx
  0 avx2

  ------------
  AMD Specific
  ------------
  1 mmx Ext
  0 3Dnow
  0 3Dnow Ext

  Press any key ....

 - that's normal desktop AMD, also exists sse5, avx2 - not server, 3Dnow - no builtin AMD video.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6667
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #3 on: September 23, 2018, 03:22:52 PM »
I think I have got what can be got, while the Intel documentation is appalling, the AMD documentation is all over the place like a mad woman's sh*t. In 64 bit there is a lot of old stuff that does not matter and as far as I can tell, any processor able to run 64 bit Windows supports CPUID so the results are something like useful to test if an instruction set is available on any given processor that can run Win 64.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

wjr

  • Member
  • **
  • Posts: 208
    • WJR's website
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #4 on: September 24, 2018, 11:27:40 PM »
Looks good on this older AMD Phenom(tm) II X4 905e Processor:

  Available Instruction Sets

  Vendor String = AuthenticAMD

  1 = supported
  0 = not supported

  --------------
  INTEL Original
  --------------
  1 mmx
  1 sse
  1 sse2
  1 sse3
  0 ssse3
  0 sse4.1
  0 sse4.2
  0 avx
  0 avx2

  ------------
  AMD Specific
  ------------
  1 mmx Ext
  1 3Dnow
  1 3Dnow Ext

  Press any key ....

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6667
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #5 on: September 25, 2018, 01:09:45 AM »
Thanks Wayne, getting the info on an older AMD is really useful.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

zedd151

  • Member
  • ****
  • Posts: 870
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #6 on: September 30, 2018, 10:56:16 PM »

  Available Instruction Sets
  Vendor String = AuthenticAMD
  1 = supported
  0 = not supported
  --------------
  INTEL Original
  --------------
  1 mmx
  1 sse
  1 sse2
  1 sse3
  1 ssse3
  1 sse4.1
  1 sse4.2
  1 avx
  1 avx2
  ------------
  AMD Specific
  ------------
  1 mmx Ext
  0 3Dnow
  0 3Dnow Ext
  Press any key ....
 
 
Better late than never. I have been offline for a while.
I'm not always the sharpest knife in the drawer, but I have my moments.  :P

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6667
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #7 on: October 01, 2018, 12:13:26 AM »
Z,

What model AMD is it ?
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

zedd151

  • Member
  • ****
  • Posts: 870
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #8 on: January 12, 2019, 04:17:21 AM »
Z,

What model AMD is it ?

A6-9220e is what it says in 'System'.
Sorry for the late reply. No'net at home, using public library when I get the opportunity.
I'm not always the sharpest knife in the drawer, but I have my moments.  :P

Raistlin

  • Member
  • ****
  • Posts: 501
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #9 on: January 12, 2019, 04:35:41 AM »
Hate to say this "...like a mad woman's sh..t.." =
but I told you so. AMD is freaky to detect correctly.
Remember the nearest power of 2 doesn't hold true.
Example Phenom with 3 cores ? Then the new thread
versus core count doesn't hold true for the bulk of
models. Asking the OS API results in inaccurate data
when considering BIOS settings versus CPUID versus
VM environments versus you-name-it NUMA configs.
Actually the same is true for Intel in the majority of
cases. I've considered the permutations carefully
and can say emphatically - to solve the algorithm
you need vast amounts of platforms to test with.
I've been ridiculed for this exact requirement, mentions
of (humour?) writing buggy code anyone... :icon_eek:
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

AW

  • Member
  • *****
  • Posts: 2328
  • Let's Make ASM Great Again!
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #10 on: January 12, 2019, 04:59:05 PM »
Still struggling with this, Raistlin?  :icon_eek:

Raistlin

  • Member
  • ****
  • Posts: 501
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #11 on: January 12, 2019, 05:13:01 PM »
@AW: Love the bait and switch  :bgrin: - No - I've solved the problem, but you are
not going to like the solution - it's hideous ! -  but necessary - I'll share with you once
I finish off my ver 1.0 of the enumerator - adding some of your and other forum
members suggestions.
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...

daydreamer

  • Member
  • ****
  • Posts: 911
  • watch Chebyshev on the backside of the Moon
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #12 on: January 12, 2019, 07:30:43 PM »
@AW: Love the bait and switch  :bgrin: - No - I've solved the problem, but you are
not going to like the solution - it's hideous ! -  but necessary - I'll share with you once
I finish off my ver 1.0 of the enumerator - adding some of your and other forum
members suggestions.
I researched some multicore detecting,found some winAPI call,I think it worked better with later models(it says)
maybe because windows gets updated,it also updates tests for newest cpus
and some benchmarks that XP was always faster than later OS,but the exception lies in multicpu handling so a threadripper on latest windows beats winxp,well if you use loads of threads
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*
Gone serverside programming p:  :D

AW

  • Member
  • *****
  • Posts: 2328
  • Let's Make ASM Great Again!
Re: CPUID code, need to test on 64 bit AMD hardware.
« Reply #13 on: January 13, 2019, 01:05:29 AM »
@AW: Love the bait and switch  :bgrin: - No - I've solved the problem, but you are
not going to like the solution - it's hideous ! -  but necessary - I'll share with you once
I finish off my ver 1.0 of the enumerator - adding some of your and other forum
members suggestions.
If you bettered the OS you have done an excellent job, despite being ugly an repulsive.