Re: LLVM 6502 Codegen
Posted: Tue May 18, 2021 5:00 pm
Minor update:
Now that printf kinda-sorta-barely-just works, I've managed to hook up LLVM's end-to-end test suite, using a 6502 simulator derived from https://github.com/mist64/perfect6502, which is itself based off the visual6502 netlists.
Of the SingleSource test targets (MultiSource and Benchmarks has stuff like 7zip, lol, yeah right):
Passed : 420
Failed : 55
Executable Missing: 1321
Executable missing is mostly compile failures. I'll be heads down in the coming months getting passed as high as possible, before beginning major optimization work. Probably won't be much news until then, "the number passed got bigger" isn't very interesting.
EDIT: Interestingly, quite a few of these cases are in C++! We'll probably get some degree of C++ support "for free", since the backend doesn't really care whether or not, say, the function pointers it receives are from C++ virtual functions. I have extreme doubts that a C++ standard library could be made to fit in 64K, but that still leaves a relatively large subset of C++ potentially usable. Way after the initial release, I may try to get this working, if just for the bragging rights.
Now that printf kinda-sorta-barely-just works, I've managed to hook up LLVM's end-to-end test suite, using a 6502 simulator derived from https://github.com/mist64/perfect6502, which is itself based off the visual6502 netlists.
Of the SingleSource test targets (MultiSource and Benchmarks has stuff like 7zip, lol, yeah right):
Passed : 420
Failed : 55
Executable Missing: 1321
Executable missing is mostly compile failures. I'll be heads down in the coming months getting passed as high as possible, before beginning major optimization work. Probably won't be much news until then, "the number passed got bigger" isn't very interesting.
EDIT: Interestingly, quite a few of these cases are in C++! We'll probably get some degree of C++ support "for free", since the backend doesn't really care whether or not, say, the function pointers it receives are from C++ virtual functions. I have extreme doubts that a C++ standard library could be made to fit in 64K, but that still leaves a relatively large subset of C++ potentially usable. Way after the initial release, I may try to get this working, if just for the bragging rights.