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?



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