|
|
|
|
|
by iheartmemcache
3188 days ago
|
|
RE: Portability -
Not sure how far you'll be able to get by gcc -S'ing something like nuklear[1] (cross-platform ANSI C89) but it might save you some time. I don't have much HLL asm/demoscene experience personally so I'm not sure what's "impressive" as engineering feats these days but this looks cool. As someone who aspires to see a viable Smalltalk-like runtime self-modifiable introspective debugger at the OS level with a decent layer of POSIX compatibility and the ability to run AVX512 instructions, I like the idea that tools like this are out there. Cheers, mate [1] https://github.com/vurtun/nuklear |
|
The big problem with using "gcc -S" is that as a result you have a HLL program, simply written as an assembly language listing.
The humans write assembly code very different than HLL. Even translated to asm notation, this difference will persist. Asm programmer will choose different algorithms, different data structures, different architecture of the program.
Actually this is why in the real world tasks, regardless of the great compiler quality, the assembly programmer will always write faster program than HLL programmer.
Another effect is that in most cases, deeply optimized asm program is still more readable and maintainable than deeply optimized HLL program.
In this regard, some early optimizations in assembly programming are acceptable and even good for the code quality.