4 ms·
Cannot you just __asm__() things ?
by JackSlateur 2y ago
Cannot you just __asm__() things ?
- pjc50 2y agoNot portably! People want to have their cake (not having to think about instruction names, code generation for arithmetic expressions, or register allocation, because those differ per platform) and eat it (generate reasonably predictable machine code for multiple different platforms). Things like LLVM IR are pretty close, but understandably nobody wants to write IR by hand.
- o11c 2y agoAs I mentioned, asm is often a pessimization. GCC has a lot of useful builtins though.