3 ms·
Eh. The article uses extern char fn(void); char kekw(void) { const char foo = fn() ^ 5; return foo - (foo & 3); } as a running ex
by Joker_vD 2y ago
Eh. The article uses
extern char fn(void);
char kekw(void) {
const char foo = fn() ^ 5;
return foo - (foo & 3);
}
as a running example, and while godbolt only has cc6502, that thing indeed generates worse code, with helper subroutine calls and doing some strange stack juggling.
- throw2030401 2y agoIt is clearly not what their charts are based on though. Their example output jsr fn eor #5 ldx #3 sax S sec sbc S rts Is better but not drastically so than the output of another 6502 compiler on godbolt: _kekw_sloc0_1_0: .ds 1 _kekw: jsr _fn eor #0x05 tax and #0x03 sta *_kekw_sloc0_1_0 txa sec sbc *_kekw_sloc0_1_0 rts
- throw2030401 2y agoHowever the output of llvm-mos on godbolt is garbage