From: Kyrylo Tkachov Date: Mon, 8 Jan 2018 15:15:08 +0000 (+0000) Subject: [arm] Add -march=armv8.3-a and dotprod multilib selection rules X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a00a42220eca0305312b842ded274fd0aa23383d;p=gcc.git [arm] Add -march=armv8.3-a and dotprod multilib selection rules We don't have the t-aprofile, t-multilib and t-arm-elf mapping rules for multilibs when using the variants of -march=armv8.3-a and the dotproduct extension. This patch adds them. -march=armv8.3-a behaves in the same way as -march=armv8.2-a in this regard. Bootstrapped and tested with the aprofile multilib list. Checked that --print-multi-directory gives sensible results with armv8.3-a options and extensions. I've also added some armv8.3-a, fp16 and dotprod combination tests to multilib.exp * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for -march=armv8.3-a variants. * config/arm/t-multilib: Likewise. * config/arm/t-arm-elf: Likewise. Handle dotprod extension. * gcc.target/arm/multilib.exp: Add fp16, dotprod and armv8.3-a combination tests. From-SVN: r256345 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5aeb0ec519..e08bd9213fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-01-08 Kyrylo Tkachov + + * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for + -march=armv8.3-a variants. + * config/arm/t-multilib: Likewise. + * config/arm/t-arm-elf: Likewise. Handle dotprod extension. + 2018-01-08 Aaron Sawdey * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it diff --git a/gcc/config/arm/t-aprofile b/gcc/config/arm/t-aprofile index 3e92c62290a..6c34c09cc15 100644 --- a/gcc/config/arm/t-aprofile +++ b/gcc/config/arm/t-aprofile @@ -88,9 +88,13 @@ MULTILIB_MATCHES += $(foreach ARCH, $(v8_1_a_simd_variants), \ # Baseline v8.2-a: map down to baseline v8-a MULTILIB_MATCHES += march?armv8-a=march?armv8.2-a -# Map all v8.2-a SIMD variants to v8-a+simd +# Baseline v8.3-a: map down to baseline v8-a +MULTILIB_MATCHES += march?armv8-a=march?armv8.3-a + +# Map all v8.2-a and v8.3-a SIMD variants to v8-a+simd MULTILIB_MATCHES += $(foreach ARCH, $(v8_2_a_simd_variants), \ - march?armv8-a+simd=march?armv8.2-a$(ARCH)) + march?armv8-a+simd=march?armv8.2-a$(ARCH) \ + march?armv8-a+simd=march?armv8.3-a$(ARCH)) # Use Thumb libraries for everything. diff --git a/gcc/config/arm/t-arm-elf b/gcc/config/arm/t-arm-elf index ace4736cdb9..189ab9beb00 100644 --- a/gcc/config/arm/t-arm-elf +++ b/gcc/config/arm/t-arm-elf @@ -36,7 +36,7 @@ v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \ # Not all these permutations exist for all architecture variants, but # it seems to work ok. -v8_fps := simd fp16 crypto fp16+crypto +v8_fps := simd fp16 crypto fp16+crypto dotprod # We don't do anything special with these. Pre-v4t probably doesn't work. all_early_nofp := armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t @@ -46,7 +46,7 @@ all_early_arch := armv5e armv5tej armv6 armv6j armv6k armv6z armv6kz \ all_v7_a_r := armv7-a armv7ve armv7-r -all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a +all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a # No floating point variants, require thumb1 softfp all_nofp_t := armv6-m armv6s-m armv8-m.base diff --git a/gcc/config/arm/t-multilib b/gcc/config/arm/t-multilib index 58448a9d887..c0ca255c017 100644 --- a/gcc/config/arm/t-multilib +++ b/gcc/config/arm/t-multilib @@ -139,9 +139,13 @@ MULTILIB_MATCHES += $(foreach ARCH, $(v8_1_a_simd_variants), \ # Baseline v8.2-a: map down to baseline v8-a MULTILIB_MATCHES += march?armv7=march?armv8.2-a -# Map all v8.2-a SIMD variants +# Baseline v8.3-a: map down to baseline v8-a +MULTILIB_MATCHES += march?armv7=march?armv8.3-a + +# Map all v8.2-a SIMD variants. v8.3-a SIMD variants have the same mappings MULTILIB_MATCHES += $(foreach ARCH, $(v8_2_a_simd_variants), \ - march?armv7+fp=march?armv8.2-a$(ARCH)) + march?armv7+fp=march?armv8.2-a$(ARCH) \ + march?armv7+fp=march?armv8.3-a$(ARCH)) # Use Thumb libraries for everything. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 562b5a0053b..749668f9816 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-08 Kyrylo Tkachov + + * gcc.target/arm/multilib.exp: Add fp16, dotprod and armv8.3-a + combination tests. + 2018-01-08 Richard Biener PR tree-optimization/83563 diff --git a/gcc/testsuite/gcc.target/arm/multilib.exp b/gcc/testsuite/gcc.target/arm/multilib.exp index 5de87c4440c..c3c8e1f919d 100644 --- a/gcc/testsuite/gcc.target/arm/multilib.exp +++ b/gcc/testsuite/gcc.target/arm/multilib.exp @@ -72,6 +72,26 @@ if {[multilib_config "aprofile"] } { {-march=armv8.2-a+simd+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" {-march=armv8.2-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" {-march=armv8.2-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.2-a+fp16 -mfloat-abi=soft} "thumb/v8-a/nofp" + {-march=armv8.2-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.2-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" + {-march=armv8.2-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.2-a+dotprod -mfloat-abi=soft} "thumb/v8-a/nofp" + {-march=armv8.2-a+simd+dotprod -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.2-a+simd+dotprod+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" + {-march=armv8.2-a+simd+nofp+dotprod -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+crypto -mfloat-abi=soft} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+fp16 -mfloat-abi=soft} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+dotprod -mfloat-abi=soft} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+dotprod -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" + {-march=armv8.3-a+simd+dotprod+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" + {-march=armv8.3-a+simd+nofp+dotprod -mfloat-abi=softfp} "thumb/v8-a+simd/softfp" {-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard" {-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp" {-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard"