3 ms·
Ask HN: How does a compiler handle differences in instructions sets?
AMD and Intel each have instruction extension that are exclusive to each company.
How does a modern compiler deal with those?
The easiest would be to ignore them entirely.
Or can you say "turn on AMD extensions" (or Intels) and it uses those, then what happens
if you run it on Intel?
Does it insert logic to check which cpu?
Or does the compiler include code for both
where it is advantageous and simply branch
to the right instruction set after querying
the CPU?