4 ms·
C compilers are just too smart IMO to make C portable assembly. Your example doesn’t always ADDI either, for example if it is inlined https://godbolt.org/z/vv9
by xmcqdpt2 2y ago
C compilers are just too smart IMO to make C portable assembly. Your example doesn’t always ADDI either, for example if it is inlined
https://godbolt.org/z/vv9rvKsxn https://godbolt.org/z/vv9rvKsxn
This isn’t qualitatively different from what the JVM JIT would do, but Java isn’t considered portable assembly.
I guess if you compile with optimizations completely off, you get something that is assembly-like, but I’ve never seen that in prod code.