xref: /openbmc/linux/arch/arm64/lib/Makefile (revision 5d7bdeb1)
112a0ef7bSWill Deaconlib-y		:= bitops.o clear_user.o delay.o copy_from_user.o	\
212a0ef7bSWill Deacon		   copy_to_user.o copy_in_user.o copy_page.o		\
312a0ef7bSWill Deacon		   clear_page.o memchr.o memcpy.o memmove.o memset.o	\
40a42cb0aSzhichang.yuan		   memcmp.o strcmp.o strncmp.o strlen.o strnlen.o	\
50a42cb0aSzhichang.yuan		   strchr.o strrchr.o
6c0385b24SWill Deacon
75be8b70aSArd Biesheuvel# Tell the compiler to treat all general purpose registers (with the
85be8b70aSArd Biesheuvel# exception of the IP registers, which are already handled by the caller
95be8b70aSArd Biesheuvel# in case of a PLT) as callee-saved, which allows for efficient runtime
105be8b70aSArd Biesheuvel# patching of the bl instruction in the caller with an atomic instruction
115be8b70aSArd Biesheuvel# when supported by the CPU. Result and argument registers are handled
125be8b70aSArd Biesheuvel# correctly, based on the function prototype.
13c0385b24SWill Deaconlib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o
14c0385b24SWill DeaconCFLAGS_atomic_ll_sc.o	:= -fcall-used-x0 -ffixed-x1 -ffixed-x2		\
15c0385b24SWill Deacon		   -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6		\
16c0385b24SWill Deacon		   -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9		\
17c0385b24SWill Deacon		   -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12	\
18c0385b24SWill Deacon		   -fcall-saved-x13 -fcall-saved-x14 -fcall-saved-x15	\
195be8b70aSArd Biesheuvel		   -fcall-saved-x18
205d7bdeb1SRobin Murphy
215d7bdeb1SRobin Murphylib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o
22