How do I access local C variable in arm inline assembly?
According to GCC docs: 6.45.2.3 Output Operands You can pass the values like this: #include <stdio.h> int main(int argc, char *argv[]) { int src = 1; int dst; asm (“mov %1, %0\n\t add $1, %0” : “=r” (dst) : “r” (src)); printf(“0x%X\n”, dst); return 0; } After your asm code you put the ‘:’ character … Read more