This patch adds -march=armv8.5-a to the Arm backend.
Armv8.5-A also adds two new security features:
- Speculation Barrier instruction
- Execution and Data Prediction Restriction Instructions
These are made optional to all older Armv8-A versions. Thus we are adding two
new options "+sb" and "+predres" to all older Armv8-A. These are passed on to
the assembler and have no code generation effects and have already gone in the
trunk of binutils.
*** gcc/ChangeLog ***
2018-11-12 Sudakshina Das <sudi.das@arm.com>
* config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
(ARMv8_5a): New fgroup.
(armv8.5-a): New arch.
(armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
sb and predres.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
* config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
* config/arm/t-multilib (v8_5_a_simd_variants): New variable.
Add matching rules for -march=armv8.5-a and extensions.
* doc/invoke.texi (ARM options): Document -march=armv8.5-a.
Add sb and predres to all armv8-a except armv8.5-a.
*** gcc/testsuite/ChangeLog ***
2018-11-12 Sudakshina Das <sudi.das@arm.com>
* gcc.target/arm/multilib.exp: Add some -march=armv8.5-a
combination tests.
From-SVN: r266031
+2018-11-12 Sudakshina Das <sudi.das@arm.com>
+
+ * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
+ (ARMv8_5a): New fgroup.
+ (armv8.5-a): New arch.
+ (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
+ sb and predres.
+ * config/arm/arm-tables.opt: Regenerate.
+ * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
+ * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
+ * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
+ Add matching rules for -march=armv8.5-a and extensions.
+ * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
+ Add sb and predres to all armv8-a except armv8.5-a.
+
2018-11-12 Richard Biener <rguenther@suse.de>
* tree-vrp.h (value_range[_base]::set): Make public. Provide
# Architecture rel 8.4.
define feature armv8_4
+# Architecture rel 8.5.
+define feature armv8_5
+
# M-Profile security extensions.
define feature cmse
# (Very) slow multiply operations. Should probably be a tuning bit.
define feature smallmul
+# Speculation Barrier Instruction for v8-A architectures, added by
+# default to v8.5-A
+define feature sb
+
+# Execution and Data Prediction Restriction Instruction for
+# v8-A architectures, added by default from v8.5-A
+define feature predres
+
# Feature groups. Conventionally all (or mostly) upper case.
# ALL_FPU lists all the feature bits associated with the floating-point
# unit; these will all be removed if the floating-point unit is disabled
define fgroup ARMv8_2a ARMv8_1a armv8_2
define fgroup ARMv8_3a ARMv8_2a armv8_3
define fgroup ARMv8_4a ARMv8_3a armv8_4
+define fgroup ARMv8_5a ARMv8_4a armv8_5 sb predres
define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv
define fgroup ARMv8m_main ARMv7m armv8 cmse
define fgroup ARMv8r ARMv8a
option crypto add FP_ARMv8 CRYPTO
option nocrypto remove ALL_CRYPTO
option nofp remove ALL_FP
+ option sb add sb
+ option predres add predres
end arch armv8-a
begin arch armv8.1-a
option crypto add FP_ARMv8 CRYPTO
option nocrypto remove ALL_CRYPTO
option nofp remove ALL_FP
+ option sb add sb
+ option predres add predres
end arch armv8.1-a
begin arch armv8.2-a
option nocrypto remove ALL_CRYPTO
option nofp remove ALL_FP
option dotprod add FP_ARMv8 DOTPROD
+ option sb add sb
+ option predres add predres
end arch armv8.2-a
begin arch armv8.3-a
option nocrypto remove ALL_CRYPTO
option nofp remove ALL_FP
option dotprod add FP_ARMv8 DOTPROD
+ option sb add sb
+ option predres add predres
end arch armv8.3-a
begin arch armv8.4-a
option crypto add FP_ARMv8 CRYPTO DOTPROD
option nocrypto remove ALL_CRYPTO
option nofp remove ALL_FP
+ option sb add sb
+ option predres add predres
end arch armv8.4-a
+begin arch armv8.5-a
+ tune for cortex-a53
+ tune flags CO_PROC
+ base 8A
+ profile A
+ isa ARMv8_5a
+ option simd add FP_ARMv8 DOTPROD
+ option fp16 add fp16 fp16fml FP_ARMv8 DOTPROD
+ option crypto add FP_ARMv8 CRYPTO DOTPROD
+ option nocrypto remove ALL_CRYPTO
+ option nofp remove ALL_FP
+end arch armv8.5-a
+
begin arch armv8-m.base
tune for cortex-m23
base 8M_BASE
Enum(arm_arch) String(armv8.4-a) Value(24)
EnumValue
-Enum(arm_arch) String(armv8-m.base) Value(25)
+Enum(arm_arch) String(armv8.5-a) Value(25)
EnumValue
-Enum(arm_arch) String(armv8-m.main) Value(26)
+Enum(arm_arch) String(armv8-m.base) Value(26)
EnumValue
-Enum(arm_arch) String(armv8-r) Value(27)
+Enum(arm_arch) String(armv8-m.main) Value(27)
EnumValue
-Enum(arm_arch) String(iwmmxt) Value(28)
+Enum(arm_arch) String(armv8-r) Value(28)
EnumValue
-Enum(arm_arch) String(iwmmxt2) Value(29)
+Enum(arm_arch) String(iwmmxt) Value(29)
+
+EnumValue
+Enum(arm_arch) String(iwmmxt2) Value(30)
Enum
Name(arm_fpu) Type(enum fpu_type)
MULTILIB_MATCHES += $(foreach ARCH, $(v8_4_a_simd_variants), \
march?armv8-a+simd=march?armv8.4-a$(ARCH))
+# Baseline v8.5-a: map down to baseline v8-a
+MULTILIB_MATCHES += march?armv8-a=march?armv8.5-a
+
+# Map all v8.5-a SIMD variants to v8-a+simd
+MULTILIB_MATCHES += $(foreach ARCH, $(v8_5_a_simd_variants), \
+ march?armv8-a+simd=march?armv8.5-a$(ARCH))
+
# Use Thumb libraries for everything.
MULTILIB_REUSE += mthumb/march.armv7-a/mfloat-abi.soft=marm/march.armv7-a/mfloat-abi.soft
all_v7_a_r := armv7-a armv7ve armv7-r
-all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a
+all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a \
+ armv8.5-a
# No floating point variants, require thumb1 softfp
all_nofp_t := armv6-m armv6s-m armv8-m.base
v8_1_a_simd_variants := $(call all_feat_combs, simd crypto)
v8_2_a_simd_variants := $(call all_feat_combs, simd fp16 fp16fml crypto dotprod)
v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto)
+v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto)
v8_r_nosimd_variants := +crc
ifneq (,$(HAS_APROFILE))
MULTILIB_MATCHES += $(foreach ARCH, $(v8_4_a_simd_variants), \
march?armv7+fp=march?armv8.4-a$(ARCH))
+# Baseline v8.5-a: map down to baseline v8-a
+MULTILIB_MATCHES += march?armv7=march?armv8.5-a
+
+# Map all v8.5-a SIMD variants
+MULTILIB_MATCHES += $(foreach ARCH, $(v8_5_a_simd_variants), \
+ march?armv7+fp=march?armv8.5-a$(ARCH))
+
# Use Thumb libraries for everything.
MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.soft=marm/march.armv7/mfloat-abi.soft
$(foreach ARCH, armv7, \
mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp))
-endif # Not APROFILE.
\ No newline at end of file
+endif # Not APROFILE.
@samp{armv7}, @samp{armv7-a}, @samp{armv7ve},
@samp{armv8-a}, @samp{armv8.1-a}, @samp{armv8.2-a}, @samp{armv8.3-a},
@samp{armv8.4-a},
+@samp{armv8.5-a},
@samp{armv7-r},
@samp{armv8-r},
@samp{armv6-m}, @samp{armv6s-m},
Disable the cryptographic instructions.
@item +nofp
Disable the floating-point, Advanced SIMD and cryptographic instructions.
+@item +sb
+Speculation Barrier Instruction.
+@item +predres
+Execution and Data Prediction Restriction Instructions.
@end table
@item armv8.1-a
@item +nofp
Disable the floating-point, Advanced SIMD and cryptographic instructions.
+
+@item +sb
+Speculation Barrier Instruction.
+
+@item +predres
+Execution and Data Prediction Restriction Instructions.
@end table
@item armv8.2-a
@item +nofp
Disable the floating-point, Advanced SIMD and cryptographic instructions.
+
+@item +sb
+Speculation Barrier Instruction.
+
+@item +predres
+Execution and Data Prediction Restriction Instructions.
@end table
@item armv8.4-a
@item +nocrypto
Disable the cryptographic extension.
+@item +nofp
+Disable the floating-point, Advanced SIMD and cryptographic instructions.
+
+@item +sb
+Speculation Barrier Instruction.
+
+@item +predres
+Execution and Data Prediction Restriction Instructions.
+@end table
+
+@item armv8.5-a
+@table @samp
+@item +fp16
+The half-precision floating-point data processing instructions.
+This also enables the Advanced SIMD and floating-point instructions as well
+as the Dot Product extension and the half-precision floating-point fmla
+extension.
+
+@item +simd
+The ARMv8.3-A Advanced SIMD and floating-point instructions as well as the
+Dot Product extension.
+
+@item +crypto
+The cryptographic instructions. This also enables the Advanced SIMD and
+floating-point instructions as well as the Dot Product extension.
+
+@item +nocrypto
+Disable the cryptographic extension.
+
@item +nofp
Disable the floating-point, Advanced SIMD and cryptographic instructions.
@end table
+2018-11-12 Sudakshina Das <sudi.das@arm.com>
+
+ * gcc.target/arm/multilib.exp: Add some -march=armv8.5-a
+ combination tests.
+
2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
* gcc.target/csky/fnmul-1.c: New.
{-march=armv8.4-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
{-march=armv8.4-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8.4-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv8.5-a+crypto -mfloat-abi=soft} "thumb/v8-a/nofp"
+ {-march=armv8.5-a+simd+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv8.5-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
+ {-march=armv8.5-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv8.5-a+fp16 -mfloat-abi=soft} "thumb/v8-a/nofp"
+ {-march=armv8.5-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv8.5-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
+ {-march=armv8.5-a+simd+nofp+fp16 -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"