This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: how to embed an arbitrary opcode
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org, Daniel Gutson <dgutson at codesourcery dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, John Breitenbach <breiten at lexmark dot com>
- Date: Fri, 19 Jun 2009 15:20:13 +0100
- Subject: Re: how to embed an arbitrary opcode
- References: <4A3AA129.5090708@lpdev.prtdev.lexmark.com> <4A3B93C0.4030109@redhat.com>
> Currently there is no way to achieve the effect you desire. But all is
> not lost, this being free software and all. So, please try out the
> attached patch which adds two new pseudo ops to the ARM port of GAS:
>
> .iword <expression>[,<expression>]*
> .ishort <expression>[,<expression>]*
>
> which can be used to insert 32-bit and 16-bit values respectively into
> the output stream and mark them as instructions not data.
I'd rather not do it this way. A naive implementation like this ignores many
of the complications that arise on Thumb-2 targets.
c.f. http://sourceware.org/ml/binutils/2006-11/msg00250.html
Daniel Gutson is currently working on implementing a variant of (2).
Paul