This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: arm thumb2 ldr.w syntax?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Roland McGrath <mcgrathr at google dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 15 Sep 2011 00:06:45 -0400
- Subject: Re: arm thumb2 ldr.w syntax?
- References: <x57jvcsuak56.fsf@frobland.mtv.corp.google.com>
- Reply-to: noloader at gmail dot com
On Wed, Sep 14, 2011 at 5:28 PM, Roland McGrath <mcgrathr@google.com> wrote:
> The disassembler shows me this for a Thumb2 instruction of interest:
>
> ?28: ? f8dc c000 ? ? ? ldr.w ? ip, [ip]
>
> But I cannot figure out how to make the assembler emit that.
I've run across similar when trying to generate Thumb instructions on
an ARM. In my case, I could not get ADDS generated (the instruction
was being rejected as invalid). Instead of 'ADDS, r1, r1, r0', I
needed to emit the instruction manually:
__asm__
(
"ldr r0, %[xa] ;" // R0 = a
"ldr r1, %[xb] ;" // R1 = b
".short 0x1809 ;" // 'adds r1, r1, r0'
...
);
Jeff