ARM ASM %c0 output operand doesn't seem to output correct assembly code

Claudio Favi claudio.favi@epfl.ch
Tue Apr 5 13:38:00 GMT 2005


Hi,
I wanted to substitute an operand that is a constant value without the
syntax that normally indicates an immediate operand. For that reading
the manual i saw that %cn is what i need. But it does seem to work:

sample program:

int main() {
 asm ("cdp %c0, 0, cr15, cr%c1, cr2, 0": : "n"(3), "n"(5) );
}

when i compile it i get:

cdp #6,0,cr15,cr#5,cr2,0

note that this is for the ARM architecture
I tried to compile the same code with i386 and it works as expected:

cdp 6,0,cr15,cr5,cr2,0

(well except that cdp is not a i386 instruction ...)

is there a reason for this ?

Thanks





More information about the Gcc-help mailing list