[AArch64] ARMv8.2 command line and feature macros support

Jiong Wang jiong.wang@foss.arm.com
Tue Jun 7 08:46:00 GMT 2016


ARMv8.2-A extends the ARMv8.1-A architecture, adding features that
include an optional extension to support FP16 in floating-point and
Adv.SIMD instructions. This patch adds the command line and feature
flags for ARMv8.2-A and the FP16 support.

The new command option -march=armv8.2-a will enable the new ARMv8.2-A
feature macro, which is a superset of the ARMv8.1 features.

The new feature "fp16" can be enabled by -march=armv8.2-a+fp16 which
will enable ARMv8.2 FP16 extension support.

The feature macro __ARM_FEATURE_FP16_SCALAR_ARITHMETIC is defined to
be 1 if the scalar FP16 instructions are available, it is otherwise
undefined.

The feature macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined to
be 1 if the vector FP16 instructions are available, it is otherwise
undefined.

OK for trunk?

Thanks.

2016-06-07  Matthew Wahab<matthew.wahab@arm.com>
             Jiong Wang<jiong.wang@arm.com>

         * config/aarch64/aarch64-arches.def: Add "armv8.2-a".
         * config/aarch64/aarch64.h (AARCH64_FL_V8_2): New.
         (AARCH64_FL_F16): New.
         (AARCH64_FL_FOR_ARCH8_2): New.
         (AARCH64_ISA_8_2): New.
         (AARCH64_ISA_F16): New.
         (TARGET_FP_F16INST): New.
         (TARGET_SIMD_F16INST): New.
         * config/aarch64/aarch64-option-extensions.def: New entry for "fp16".
         * config/aarch64/aarch64-c.c (arch64_update_cpp_builtins): Conditionally define
         __ARM_FEATURE_FP16_SCALAR_ARITHMETIC and __ARM_FEATURE_FP16_VECTOR_ARITHMETIC.
         * doc/invoke.texi (AArch64 Options): Document "armv8.2-a" and "fp16".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt.patch
Type: text/x-patch
Size: 5043 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160607/8a112a48/attachment.bin>


More information about the Gcc-patches mailing list