Author Topic: Instruction Set Detection for Linux, BSD and Mac OS  (Read 6188 times)

Gunther

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Instruction Set Detection for Linux, BSD and Mac OS
« on: May 09, 2014, 04:17:01 AM »
This is the instruction set detection for the 64-bit *nixes (Linux, BSD, Mac OS). The appropriate 64-bit Windows version can be found here, a 32-bit Windows version exists here. A new thread is necessary, because the 64-bit ABIs for Unix and Windows are very different.

For a detailed description of the files, please check the file readme.txt. The code is well commented and self-explanatory. Here is the output of the program:
Quote

   Supported Features by Processor and Operating System
   ====================================================

Vendor String: GenuineIntel
Brand  String: Intel(R)Core(TM)i7-3770CPU@3.40GHz

   Instruction Sets
   ----------------

MMX  SSE  SSE2  SSE3  SSSE3  SSE4.1  SSE4.2  AVX

   Supported Special Instructions
   ------------------------------

Conditional Moves
FXSAVE and FXSTOR
XSAVE and XSTOR for processor extended state management.
POPCNT
RDRAND
AES (Advanced Encryption Standard) Instruction Set
16-bit floating-point Conversion Instructions

Please, press enter to end the application ...


Your help and test results are very welcome.

Gunther
You have to know the facts before you can distort them.

Gunner

  • Regular Member
  • *
  • Posts: 48
    • Gunners Software
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #1 on: May 09, 2014, 11:32:49 AM »
Quote
~/projects/64/IsetUnix $ ./cpu
   Supported Features by Processor and Operating System
   ====================================================

Vendor String: AuthenticAMD
Brand  String: AMDPhenom(tm)IIX4955Processor

   Instruction Sets
   ----------------

MMX  SSE  SSE2  SSE3

   Supported Special Instructions
   ------------------------------

Conditional Moves
FXSAVE and FXSTOR

Please, press enter to end the application ...

A FYI, when unzipped, the exe lost the executable permission.
Quote
ls -l ./cpu
-rw-r--r-- 1 gunner gunner 14090 May  8 19:22 ./cpu

Maybe use tar for your *NIX archives?
~Rob

Gunther

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #2 on: May 10, 2014, 01:51:58 AM »
Gunner,

thank you for testing the software.

A FYI, when unzipped, the exe lost the executable permission.
Quote
ls -l ./cpu
-rw-r--r-- 1 gunner gunner 14090 May  8 19:22 ./cpu

Maybe use tar for your *NIX archives?

yes, you're right. I should form a tar ball, which can be ziped, to meet the requirements of our forum.

Gunther
You have to know the facts before you can distort them.

dedndave

  • Member
  • *****
  • Posts: 8828
  • Still using Abacus 2.0
    • DednDave
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #3 on: May 10, 2014, 02:55:30 AM »
I should form a tar ball...

you LINUX guys crack me up   :lol:

hey Rob !!! long time no see   :t

Gunther

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #4 on: May 10, 2014, 04:04:54 AM »
Dave,

you LINUX guys crack me up   :lol:

that's life.

Gunther
You have to know the facts before you can distort them.

DarkWolf

  • Guest
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #5 on: June 13, 2014, 11:39:51 AM »
Hey gunther
on my system I get this error.

Which is weird cause I never had a problem running a exe in my home folder (or subfolder) before.

$ ./cpu
bash: ./cpu: cannot execute binary file

Gunther

  • Member
  • *****
  • Posts: 4198
  • Forgive your enemies, but never forget their names
Re: Instruction Set Detection for Linux, BSD and Mac OS
« Reply #6 on: June 14, 2014, 01:38:32 AM »
Hi DarkWolf,

Hey gunther
on my system I get this error.

Which is weird cause I never had a problem running a exe in my home folder (or subfolder) before.

$ ./cpu
bash: ./cpu: cannot execute binary file

That's very strange. But you can re-build the ELF and it should start. Can you try this?

Gunther
You have to know the facts before you can distort them.