0

I need to convert some code to the ISA of the intel i7-8705G but i do not know which version of the x86-64 ISA it uses.

I want to use godbolt here and select the ISA from the drop down list but there are several versions of the x86-64. Which one is correct for my processor?

I was surprised to see several versions. On the intel web site it simply lists it as 64 bit. here

Greg
  • 476
  • 9
  • 23
  • 1
    [i7-8705G is Kaby Lake G](https://ark.intel.com/content/www/us/en/ark/products/130411/intel-core-i7-8705g-processor-with-radeon-rx-vega-m-gl-graphics-8m-cache-up-to-4-10-ghz.html), so use `gcc -O3 -march=skylake`. Most i7-8xxx CPUs are Coffee Lake. Not that it matters, the differences are only in the GPU and manufacturing tweaks; same CPU microarchitecture. (Except [CFL has a working loop buffer (LSD)](https://en.wikichip.org/wiki/intel/microarchitectures/coffee_lake#Front-end), they fixed the issue that made them disable it with microcode updates for SKL and KBL.) – Peter Cordes Jul 11 '19 at 06:12

1 Answers1

4

I need to convert some code to the ISA of the intel i7-8705G but i do not know which version of the x86-64 ISA it uses.

The x86-64 ISA doesn't have versions. It's the instruction set from an 8086 with a large number of optional extensions, where (at least in theory) each of these extensions could be present/not present on any (existing or future) 80x86 CPU, and where most of the extensions are indicated as present/not present by a set of about 100 flags returned by the CPUID instruction.

To make sense of all the possibilities, GCC (its -mtune and -march options) have predefined "CPU names" based on the name Intel gives micro-architectures. For Intel i7-8705G, the micro-architecture was "Kaby Lake". The newest version of GCC doesn't have a pre-defined name for Kaby Lake; however Kaby Lake was an optimization of a previous micro-architecture that Intel called Skylake, and GCC does have the predefined name "skylake", so that would be the best possible option (e.g. -march=skylake).

Note: I couldn't find any drop-down list of architectures on godbolt, so I'm wondering if you got confused and were thinking of something else (the list of compilers, where each compiler has multiple versions).

Brendan
  • 35,656
  • 2
  • 39
  • 66
  • Thanks for your answer :) Ah yes, is seems I was confused with the compiler versions. I think i should go for the x86-64 gcc 9.1 – Greg Jul 11 '19 at 07:37