|
From: | Nick Clifton |
Subject: | Re: How to port binutils to other arch? |
Date: | Tue, 26 May 2009 16:46:42 +0100 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Hi Harry,
I want to know what to do if I want to let binutils support another architecture, for example, if we have one new processor with some different instructions, how to add them to binutils?
There are two basic methods. If your new processor is just a variant of a currently existing cpu type then you can add the support to the currently existing code. So for example suppose that you were creating a MIPS variant with a few new instructions. You could add code to opcodes/mips-opc.c to describe the new instructions and code to gas/config/tc-mips.c to ensure that the new instructions are only accepted when assembling for this new processor.
On the other hand if your new processor is really new, not just a variant, then you should add a new configuration target for it. This involves adding new files to the bfd, gas, include, ld, and opcodes directories, (along the lines of the files that are already present there), and teaching the configure mechanisms about your new target.
Cheers Nick
[Prev in Thread] | Current Thread | [Next in Thread] |