Open mshockwave opened 1 year ago
@llvm/issue-subscribers-backend-m68k
I'm not sure if there's any current plan to support ColdFire CPUs, but being able to enable/disable specific addressing modes would definitely assist with it: https://www.microapl.com/Porting/ColdFire/cf_68k_diffs.html
I'm not sure if there's any current plan to support ColdFire CPUs, but being able to enable/disable specific addressing modes would definitely assist with it: https://www.microapl.com/Porting/ColdFire/cf_68k_diffs.html
Right, and I think we need to do that (enable/disable specific addressing modes) anyway since some of the addressing modes are not supported until 68020 (e.g. memory indirect addressing). I think the only way to do so right now is using predicates (e.g. AtLeast68020
) on instruction declarations, which is tbh not really hard owing to how we factor out operands with different addressing modes.
Right now we only support a subset of all memory addressing modes. Though the current set of addressing modes will suffice to codegen most of the code, some of the missing addressing modes can lead to better codegen qualities in certain cases. More importantly, AsmParser and Disassembler depend on these operand declarations too.
Adapted from a similar table in M68kInstrFormat.td originally written by Arytom, below is a table of current supporting status for all memory addressing modes. I thought it might be a good idea to track the progress of these addressing modes using this table.
For explanations of these addressing modes, please refer to Section 2.2 in the M68k Programmers' Manual.
I think we can start from the low-hanging fruits like 'o', 'e', and 'B' to finish their missing functionalities first.