My take generates pretty darn good assembly for the cases it handles, but it's absurdly incomplete. Still, a huge amount of risk factors have already been addressed, and there's only a few big known unknowns left.
Shouldn't be too hard to add later, since they're mostly just swizzles onto the existing instructions, and LLVM already has good support for registering slightly different versions of a target (subtargeting).
For now, I'm targeting the plain-jane MOS chip, since it's the buggiest and least capable, and thus the most difficult.
https://github.com/mysterymath/clang6502
My take generates pretty darn good assembly for the cases it handles, but it's absurdly incomplete. Still, a huge amount of risk factors have already been addressed, and there's only a few big known unknowns left.
Example input:
Example output: