Re: [arm-gnu] load constructed constant in arm inline assembly - how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] load constructed constant in arm inline assembly - how?
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: Re: [arm-gnu] load constructed constant in arm inline assembly - how?
- From: Paul Brook <paul@xxxxxxxxxxxxxxxx>
- Date: Thu, 1 Sep 2005 17:57:06 +0100
On Thursday 01 September 2005 17:46, Kurt Kennett wrote:
> hi.
>
> I'm trying to do this:
>
> ldr r0, =<32-bit constant>
>
> The thing is, the constant is constructed at compile time in the .cpp file
> that is invoking the arm inline assembler:
#define FOO 42
void bar()
{
asm volatile (
"ldr r0, =%a0"
:
: "i"( 0xC0000000 | FOO)
: "r0");
}
Paul