|
|
Stop the x86 Instruction Set War - TechAmok
Stop the x86 Instruction Set War - [hardware] 06:51 PM EST - Dec,08 2009 - post a comment Some smart blogger calls for an open, unified standard for x86 instruction set extensions. Very good reading and definitely link worth checking.
Software programmers may expect the compilers and software libraries to take care of all the intricacies of instruction sets for them. And the obvious way to deal with incompatible instruction sets is to make multiple branches of the code. Ideally, you would have one branch of code optimized for the latest Intel instruction set, another branch for the latest AMD instruction set, and one or more branches for older CPUs with older instruction sets. The software should detect which CPU it is running on and then choose the appropriate version of the code. This is called CPU dispatching. If the compiler can put a CPU dispatching mechanism into your code then you don't have to care about incompatible instruction sets - or do you?
The only compiler I have found that has such a feature for automatic CPU dispatching is Intel's compiler. The Intel compiler can put a CPU dispatcher into your code so that it checks which instruction set (SSE, SSE2, SSE3, etc.) is supported by the CPU and chooses a branch of code that is optimized for that instruction set - but only as long as it is running on an Intel CPU! It refuses to choose the optimal branch if the CPU doesn't have the "GenuineIntel" mark, even if the non-Intel CPU if fully compatible with the optimized code. And who would want to sell a software package that works poorly on AMD and VIA processors?
The situation is only slightly better when it comes to software libraries. Most compilers are equipped with libraries of standard functions, or you can use third party libraries. Some of the best optimized software libraries are published by Intel, but again they are optimized for Intel processors, and some of the functions work sub-optimally or not at all on non-Intel processors. AMD also publishes software libraries, and the AMD libraries work well on Intel processors, but of course the AMD libraries don't have a code branch that is optimized for instructions that are only available on Intel processors. There are many other libraries available, but they are typically less optimized and have little or no CPU dispatching. The GNU people are beginning to build a - long overdue - CPU dispatch mechanism into the GNU C library. The GNU library is open source, and of course it must support all x86 CPUs. But this work is done mostly by an Intel guy who has his natural focus on the latest Intel instruction sets and who has so far tested his improvements mainly on Intel processors. The best optimized code branches will work on AMD and VIA processors only with a few years delay when AMD and VIA have copied the Intel instruction sets into their processors. I am not aware of any AMD people contributing the GNU C library.
Of course, a programmer can make his own CPU dispatching, but this is a lot of work. The programmer would have to identify the most critical part of his program and divide it into multiple branches. There is no AMD compiler, so we would have to use assembly code or intrinsic functions to take advantage of AMD-specific instructions. Each branch has to be tested separately on different computers. And the maintenance of the code will be a nightmare. Every change in the code has to be implemented in each branch separately and tested on a separate computer.
The disadvantages of CPU dispatching are clear. It makes the code bigger, and it is so costly in terms of development time and maintenance costs that it is almost never done in a way that adequately optimizes for all brands of CPUs.
|
|
Add your comment (free registrationrequired)
Short overview of recent news articles |
|
Feb,17 2026 Apple Eyeing A Partnership With Chinese Memory Makers YMTC And CXMT Feb,17 2026 This $60,000 TV was IRRESISTIBLE Feb,17 2026 Keenadu Android Backdoor Infects Firmware, Spreads via Google Play Feb,17 2026 Discord's ID Check Nightmare Sparks Massive Exodus to TeamSpeak Feb,17 2026 Amazing Robot Performance at the 2026 Spring Festival Gala Feb,16 2026 Apple brings video podcasts and other improvements in iOS 26.4 beta Feb,16 2026 Dutch Defence Secretary Boldly Claims F-35 Software Could Be Feb,16 2026 Samsung shows off Galaxy S26 Ultra privacy display Feb,16 2026 60 Million Passwords Exposed? ETH Zurich Shatters 'Unbreakable' Feb,15 2026 Apple MacBook with iPhone chip launches next month Feb,15 2026 Discord's Disturbing Ties to Global Surveillance | ID Verification, Feb,15 2026 20 Mind-Blowing Tech Gadgets You MUST See in 2026! Feb,15 2026 Western Digital's HDD production capacity for 2026 is fully sold Feb,14 2026 Google Releases First Beta Version of Android 17 Feb,14 2026 The Audiophile Gaming Headset - HIFIMAN x ROG Kithara Feb,14 2026 7zip Malware: Beware 7zip.com Feb,14 2026 REDMAGIC 11 Pro Review: Can This Be Your ONLY Phone? Feb,13 2026 Google Docs now has AI-generated audio summaries Feb,13 2026 Apple Patches Actively Exploited Zero-Day Vulnerability Across Feb,13 2026 What is the Windows.old folder and can I delete it? Feb,12 2026 Microsoft AI CEO Mustafa Suleyman: 'Most White Collar Work Will Be Feb,12 2026 Helldivers Movie Lands November 2027 Release, Jason Momoa to Star Feb,12 2026 Apple 0-Day Vulnerability Actively Exploited in Sophisticated Attack Feb,11 2026 Apple releases iOS 26.3 and iPadOS 26.3 to the public Feb,11 2026 T-Mobile Announces Live Audio Language Translation as a Network Feb,10 2026 Windows 11 26H1 Drops Exclusively on New Snapdragon X2 Devices - No Feb,10 2026 Fake 7-Zip downloads are turning home PCs into proxy nodes Feb,10 2026 Microsoft Patch Tuesday February 2026 - 54 Vulnerabilities Fixed, Feb,10 2026 Snapdragon X2 Elite Early - Performance Preview Feb,10 2026 AI Chat App Exposes 300 Million Messages from 25 Million Users Feb,09 2026 My Kids can Pick ANY Phone They Want For a Present Feb,09 2026 Microsoft Removes Printer Drivers in Windows 11 Update - What You Feb,09 2026 Apple's Next AirPods Pro Will Literally See the World Around You Feb,09 2026 Beware of Apple Pay Phishing Attack that Aims to Steal Your Payment Feb,08 2026 NASA to Allow Astronauts to Bring Smartphones to Space Feb,08 2026 AT&T Launches New Samsung Phone for Kids Feb,07 2026 Headphones with Noise Cancelling that Don't Stick in your Ear - Feb,07 2026 Microsoft Just Killed Your Old Printer: Legacy Drivers Officially Feb,06 2026 RenEngine Loader and HijackLoader Duo Infects Over 400,000 Gamers in Feb,06 2026 EpsteIn Tool: Check If Your LinkedIn Contacts Appear in 3.5 Million
>> News Archive <<
| |
|