This is the mail archive of the
mailing list for the binutils project.
Re: [gas] new port advice
- From: Nicholas Clifton <nickc at redhat dot com>
- To: Peter dot T dot Breuer at gmail dot com, binutils at sourceware dot org
- Date: Wed, 08 Apr 2015 16:31:40 +0100
- Subject: Re: [gas] new port advice
- Authentication-results: sourceware.org; auth=none
- References: <20150407164700 dot 4f8023ed at betty dot enbd dot org>
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?
You will probably want to update md_assemble() in that file, (or one of
its children), so that it detects the macro instruction and generates
the correct sequence. There are several other architectures that do
this kind of thing (eg: MIPS, RL78) so examining other tc-*.c files may