This is the mail archive of the
mailing list for the binutils project.
[gas] new port advice
- From: Peter Breuer <peter dot t dot breuer at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 7 Apr 2015 16:47:00 +0100
- Subject: [gas] new port advice
- Authentication-results: sourceware.org; auth=none
- Reply-to: Peter dot T dot Breuer at gmail dot com
Is there a pointer for me out there on how to do a little modification
of gas for a certain architecture?
I've read the documentation, googled, perused the source, and made
changes that result in objdump understanding and printing a new
instruction I've added. Now ...
I want to change gas's handling of addi (and other instructions with
immediate data) so that it is treated like a macro that causes three
new machine code instructions to be emitted instead of just the one
old one. Thus
addi r1,r2,0x345 -> newins1 0x3;newins2 0x4;addi r1,r2,0x5
That should be turned on and off by a directive in the assembler.
Which file(s) do I twiddle?
Yes, I could do this by changing the c compiler to output the intended
assembler in the first place. I'll try this first.
Advice gratefully received