Using the gcc c compiler with a custom set of mnemonics
Jeff Law
law@redhat.com
Wed Nov 18 20:52:00 GMT 2015
On 11/18/2015 01:36 PM, Daniel wrote:
> As I have written a register machine
>
> (see github.com/daknuett/py_register_machine )
> I want to use a c compiler to compile programs for it.
> I _do_ know, that I will have to face several issues with my machine,
> but the main problem now ist, that I need a compiler.
>
> So my question is: is there a easy way to use gcc with a custom set of
> mnemonics/directives?
>
> By the way: I need gcc just to compile the code to assembler.
>
> As I my instruction set is different to the x86 set, I am not able to
> use the standart configuration.
You would have to build a machine description and other target files for
your custom architecture. There are dozens of active GCC targets which
you can use as a starting point for your custom architecture.
Jeff
More information about the Gcc-help
mailing list