The language of architectural arrangement is one thing, and the real world is another. Once assembler pseudo-operators and macros come into play, getting to know the toolchain and the code base in question helps a lot. Linux is especially unpleasant because most of the assembly source contains several levels of both assembler macros and CPP macros. If you know what to look for and follow the heading in arch/arm/include/asm/assembler.h , you will eventually find this complex beast:
.irp c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo .macro ret\c, reg #if __LINUX_ARM_ARCH__ < 6 mov\c pc, \reg #else .ifeqs "\reg", "lr" bx\c \reg .else mov\c pc, \reg .endif #endif .endm .endr
The goal is to emit a recommended architecture return command in the interest of microarchitecture with a return stack , while allowing the same codes to compile for older architectures.
Notlikethat
source share