5 ms·
Now a days, compiler writers sees zero reason to write inline assembly. First of all, it throws a wrench in high level optimizer's analysis. Plus, compilers an
by drp4929 14y ago
Now a days, compiler writers sees zero reason to write inline assembly.
First of all, it throws a wrench in high level optimizer's analysis. Plus, compilers and processors are getting smarter day by day while inline assembly in shipping code becomes more and more untouchable everyday.
- tomjen3 14y agoYou have never written embedded code, or code to deal with low level hardware in drivers? I haven't either, but I imagine ASM would be required here.
- pornel 14y agoI've written code for GameBoy Advance which has no OS, just magic memory addresses, and didn't need any assembly. Even hblank interrupts could be implemented in C.
- snogglethorpe 14y agoA typical reason to use assembly these days is for instructions the compiler doesn't output (for instance specialized instructions which are only useful for a kernel). GCC's extended assembly at least (which clang/LLVM also support), allows one to specify constraints for asm() statements that let the compiler respect dependencies etc.