Hacker News new | ask | show | jobs
by brucehoult 709 days ago
There are two kinds of instructions that you might have or not have. The first is things such as vector instructions, crypto, string and blockmove which can usually be hidden away in library functions and you just set a function pointer to the correct version at program startup. But others such as ... just to pick a couple ... "ANDN" (rs1 & ~rs2) or "SH3ADD" ((rs1<<3) + rs2) are just naturally mixed in with potentially all of your code. The savings they provide relative to the base ISA make it simply not worth wrapping the in a library.