GCC ARM Assembly Preprocessor Macro
问题 I am trying to use an assembly(ARM) macro for fixed-point multiplication: #define MULT(a,b) __asm__ __volatile__ ( \ "SMULL r2, r3, %0, %1\n\t" \ "ADD r2, r2, #0x8000\n\t" \ "ADC r3, r3, #0\n\t" \ "MOV %0, r2, ASR#16\n\t" \ "ORR %0, %0, r3, ASL#16" \ : "=r" (a) : "0"(a), "1"(b) : "r2", "r3" ); but when trying to compile I get error(s): expected expression before ' asm ' (You can ignore everything below this if you value your time but it would be nice if you took a look at it, the main