arm-modes.def: Add new condition code mode CC_V to represent the overflow bit.
authorMichael Collison <michael.collison@linaro.org>
Wed, 24 Aug 2016 19:31:20 +0000 (19:31 +0000)
committerMichael Collison <collison@gcc.gnu.org>
Wed, 24 Aug 2016 19:31:20 +0000 (19:31 +0000)
commitc8cd4696473a9c803b9454adeee57c90565c2fad
tree8a1b828540680a9271b18e9c65d461ce0fb4fb3e
parentd5b5d21260d1036b078cad42ec2fe88754cd8ca3
arm-modes.def: Add new condition code mode CC_V to represent the overflow bit.

2016-08-24  Michael Collison <michael.collison@linaro.org>
    Michael Collison <michael.collison@arm.com>

* config/arm/arm-modes.def: Add new condition code mode CC_V
to represent the overflow bit.
* config/arm/arm.c (maybe_get_arm_condition_code):
Add support for CC_Vmode.
(arm_gen_unlikely_cbranch): New function to generate common
rtl conditional branches for overflow patterns.
* config/arm/arm-protos.h: Add prototype for
arm_gen_unlikely_cbranch.
* config/arm/arm.md (addv<mode>4, add<mode>3_compareV,
addsi3_compareV_upper): New patterns to support signed
builtin overflow add operations.
(uaddv<mode>4, add<mode>3_compareC, addsi3_compareV_upper):
New patterns to support unsigned builtin add overflow operations.
(subv<mode>4, sub<mode>3_compare1): New patterns to support signed
builtin overflow subtract operations,
(usubv<mode>4): New patterns to support unsigned builtin subtract
overflow operations.
(negvsi3, negvdi3, negdi2_compare, negsi2_carryin_compare): New patterns
to support builtin overflow negate operations.
* gcc.target/arm/builtin_saddl.c: New testcase.
* gcc.target/arm/builtin_saddll.c: New testcase.
* gcc.target/arm/builtin_uaddl.c: New testcase.
* gcc.target/arm/builtin_uaddll.c: New testcase.
* gcc.target/arm/builtin_ssubl.c: New testcase.
* gcc.target/arm/builtin_ssubll.c: New testcase.
* gcc.target/arm/builtin_usubl.c: New testcase.
* gcc.target/arm/builtin_usubll.c: New testcase.

Co-Authored-By: Michael Collison <michael.collison@arm.com>
From-SVN: r239739
14 files changed:
gcc/ChangeLog
gcc/config/arm/arm-modes.def
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/builtin_saddl.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_saddll.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_ssubl.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_ssubll.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_uaddl.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_uaddll.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_usubl.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/builtin_usubll.c [new file with mode: 0644]