Inline assembly statements in C code and extended ASM for ARM Cortex architectures
问题 I am trying to compile the following two pieces of code with ARM Compiler 5 for a Cortex A microprocessor: Part 1 : static inline void cp15_write_sctlr(uint32_t value) { asm("mcr p15, 0, %0, c1, c0, 0" :: "r"(value)); } static inline uint32_t cp15_read_actlr(void) { uint32_t actlr; asm("mrc p15, 0, %0, c1, c0, 1" : "=r"(actlr)); return actlr; } Part 2 : static inline void dmb(void) { asm("dmb" ::: "memory"); } static inline void dsb(void) { asm("dsb" ::: "memory"); } static inline void isb