This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

labels and the __asm()

Hello,

I'm trying to create my own analog for __delay__cycles() for am335x PRU with a variable argument not a constant as it is in original function.
I wrote the following code but the compilation gives me some error.

void delay(register uint32_t x) { __asm__ __volatile__ ( " WAIT: \n" " SUB r14, r14, 1 \n" " QBNE WAIT, r14, 0 \n" ); }

and hereare errors:

ERROR! at line 1043: [E0003] Invalid instruction
WAIT:

ERROR! at EOF: [E0300] The following symbols are undefined:
WAIT

I didn't found the right way of using labels in inline asm in datasheets.

How to make it?