Ideas about Compiler Backend Generator

When I was playing ⊼ Turing Complete, I had this idea:

  • Is there a universal way to generate its compiler backend for any architecture CPU through a hardware description file(and/or similar files). Like AST parser generator.

If this can be achieved, wouldn’t I be able to use Zig to write programs for the Symphony architecture. HAHA

With caveats (as in having requirements of what the target architecture must declare) maybe, I’m not sure. But I doubt you would get good performance out of it.

But if the goal is only that it works, could be good enough.