Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

load constructed constant in arm inline assembly - how?


  • To: arm-gnu@xxxxxxxxxxxxxxxx
  • Subject: load constructed constant in arm inline assembly - how?
  • From: "Kurt Kennett" <kurt_kennett@xxxxxxxxxxx>
  • Date: Thu, 01 Sep 2005 09:46:13 -0700

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:

asm volatile (
"ldr r0, =%0\n"
:
: "?"( 0xC0000000 | some-value-defined-in-a-C-header | some-other-value-defined-in-another-C-header )
);

my problem is that i can't find the constraint to use for the "?" character above. If i use 'm' i just get warnings about lvalues and stuff. The problem is i want to use my C/C++ defines and constants to make the value, and not have to duplicate them in the assembler.

help?

k2

_________________________________________________________________
Designer Mail isn't just fun to send, it's fun to receive. Use special stationery, fonts and colors. http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*.