diff --git a/INSTALL b/INSTALL index e5143c6b7..e9d38f931 100644 --- a/INSTALL +++ b/INSTALL @@ -285,7 +285,10 @@ systems, by passing "USE_SLZ=" to the "make" command. Please note that SLZ will benefit from some CPU-specific instructions like the availability of the CRC32 extension on some ARM processors. Thus it can further -improve its performance to build with "CPU=native" on the target system. +improve its performance to build with "CPU=native" on the target system, or +"CPU=armv81" (modern systems such as Graviton2 or A55/A75 and beyond), +"CPU=a72" (e.g. for RPi4, or AWS Graviton), "CPU=a53" (e.g. for RPi3), or +"CPU=armv8-auto" (automatic detection with minor runtime penalty). A second option involves the widely known zlib library, which is very likely installed on your system. In order to use zlib, simply pass "USE_ZLIB=1" to the @@ -421,6 +424,11 @@ one of the following choices to the CPU variable : - ultrasparc : Sun UltraSparc I/II/III/IV processor - power8 : IBM POWER8 processor - power9 : IBM POWER9 processor + - armv81 : modern ARM cores (Cortex A55/A75/A76/A78/X1, Neoverse, Graviton2) + - a72 : ARM Cortex-A72 or A73 (e.g. RPi4, Odroid N2, AWS Graviton) + - a53 : ARM Cortex-A53 or any of its successors in 64-bit mode (e.g. RPi3) + - armv8-auto : support both older and newer armv8 cores with a minor penalty, + thanks to gcc 10's outline atomics (default with gcc 10.2). - native : use the build machine's specific processor optimizations. Use with extreme care, and never in virtualized environments (known to break). - generic : any other processor or no CPU-specific optimization. (default) diff --git a/Makefile b/Makefile index 74fca3529..6571dc6fc 100644 --- a/Makefile +++ b/Makefile @@ -162,7 +162,8 @@ TARGET = #### TARGET CPU # Use CPU= to optimize for a particular CPU, among the following # list : -# generic, native, i586, i686, ultrasparc, power8, power9, custom +# generic, native, i586, i686, ultrasparc, power8, power9, custom, +# a53, a72, armv81, armv8-auto CPU = generic #### Architecture, used when not building for native architecture @@ -274,6 +275,10 @@ CPU_CFLAGS.i686 = -O2 -march=i686 CPU_CFLAGS.ultrasparc = -O6 -mcpu=v9 -mtune=ultrasparc CPU_CFLAGS.power8 = -O2 -mcpu=power8 -mtune=power8 CPU_CFLAGS.power9 = -O2 -mcpu=power9 -mtune=power9 +CPU_CFLAGS.a53 = -O2 -mcpu=cortex-a53 +CPU_CFLAGS.a72 = -O2 -mcpu=cortex-a72 +CPU_CFLAGS.armv81 = -O2 -march=armv8.1-a +CPU_CFLAGS.armv8-auto = -O2 -march=armv8-a+crc -moutline-atomics CPU_CFLAGS = $(CPU_CFLAGS.$(CPU)) #### ARCH dependent flags, may be overridden by CPU flags