Open dbalatoni13 opened 5 months ago
The way this is meant to work is that you have a .set eq, 2
directive in your asm file that gets expanded during parsing. If dtk is assuming an implicit prelude then we may want to add that prelude to m2c.
dtk asm files include macros.inc which does not contain this directive.
My question is: even if it did, would the include be needed to be manually pasted into the file before running m2c or is there an automatic way?
It would currently need to be either manually pasted, yes. I think we can add an arch-specific prelude to deal with this? It would go in defines
in parse_file
. This approach does mean btw that reloc references to a global named eq
gets treated as a literal with the value 2
instead, which is not ideal, but I think in practice the breakage will be non-existent.
We currently have an asm pattern for Fcmpo cror, it looks like this:
but in the asm format of dtk it's like this:
or lt respectively.
What would be the nicest way to make m2c support both formats?