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?
0 comments
[ 2.0 ms ] story [ 11.4 ms ] threadNo comments yet.