AMD64 still has a lot of baggage, but modern compilers generally aren’t going to issue instructions that do not perform well on modern processors, so a lot of the baggage is just sitting in microcode and never used unless you run some really old code. I suspect that a lot of AMD64 and ARM instruction streams would actually look very similar due to AMD64 compilers using the highest performance instructions to get the job done.
Actually, this cannot be any farther from the truth.
As others have said, Windows and Linux, in general are shipped with very generic libraries to cover a wide gamut of processors from much more than 10 years ago.
The compiler, although it can emit code for newer processors, is however being used to target the lowest common denominator.
AMD and Intel are generally very slow to update compilers because the old code would run on the new processors no problem.
This is one of many reasons many companies would be running their own distro so that they can extract performance out of their machines in their data centers.
Look at OpenSSL, if you want top performance on a modern machine you need to recompile so that you can take benefit of AES instructions on new processors.
Look at Linux netfilter, if you want orders of magnitude gain in performance you recompile with AVX.
This is what we do and I am certain most other big companies do.
If you use some infrastructure from Azure, They have their own distro. They are not using some generic Ubuntu distro, even though if you wish you could still do.
Windows is nerfed on a next level, you cannot recompile it and you are at the mercy of Microsoft.
If you look at Android, the OEM compiles the system libraries and the kernel using highly tuned options and extract best performance out of the processor because they own the HW and the SW.
During OTA the /boot, /vendor are always updated by OEM which means best case performance. AOSP updates are also compiled by OEM and delivered via OTA to update the /system
Apps made by third party are java based and are not influenced by the compiler options.
You can bet Apple does the same. I would even go far as to suggest they would not mind nerfing old HW in order to support current products.
.NET 6 has a chance of redeeming itself if the AOT can JIT the IL code to match the native arch, but thats probably stretching it a bit too far. But nevertheless I am excited about .NET 6 AOT.
MS has to make a new OS every few years and set the minimum requirements. But then again that has never been the MO for both Windows and Linux.