aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm-modes.def
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2010-07-03 01:00:37 +0000
committerSandra Loosemore <sandra@gcc.gnu.org>2010-07-02 21:00:37 -0400
commit73160ba9dc7be367d91f286eb5b07cb8af4a79bc (patch)
treea0af68d8ac04351704260ecd0693e4526a5d9616 /gcc/config/arm/arm-modes.def
parent400cfcf50e5aeae792e8ef39a743b1cb6fafedd5 (diff)
downloadgcc-73160ba9dc7be367d91f286eb5b07cb8af4a79bc.zip
gcc-73160ba9dc7be367d91f286eb5b07cb8af4a79bc.tar.gz
gcc-73160ba9dc7be367d91f286eb5b07cb8af4a79bc.tar.bz2
arm.c (arm_canonicalize_comparison): Canonicalize DImode comparisons.
2010-07-02 Daniel Jacobowitz <dan@codesourcery.com> Julian Brown <julian@codesourcery.com> Sandra Loosemore <sandra@codesourcery.com> gcc/ * config/arm/arm.c (arm_canonicalize_comparison): Canonicalize DImode comparisons. Adjust to take both operands. (arm_select_cc_mode): Handle DImode comparisons. (arm_gen_compare_reg): Generate a scratch register for DImode comparisons which require one. Use xor for Thumb equality checks. (arm_const_double_by_immediates): New. (arm_print_operand): Allow 'Q' and 'R' for constants. (get_arm_condition_code): Handle new CC_CZmode and CC_NCVmode. * config/arm/arm.h (CANONICALIZE_COMPARISON): Always use arm_canonicalize_comparison. * config/arm/arm-modes.def: Add CC_CZmode and CC_NCVmode. * config/arm/arm-protos.h (arm_canonicalize_comparison): Update prototype. (arm_const_double_by_immediates): Declare. * config/arm/constraints.md (Di): New constraint. * config/arm/predicates.md (arm_immediate_di_operand) (arm_di_operand, cmpdi_operand): New. * config/arm/arm.md (cbranchdi4): Handle non-Cirrus also. (*arm_cmpdi_insn, *arm_cmpdi_unsigned) (*arm_cmpdi_zero, *thumb_cmpdi_zero): New insns. (cstoredi4): Handle non-Cirrus also. gcc/testsuite/ * gcc.c-torture/execute/20100416-1.c: New test case. Co-Authored-By: Julian Brown <julian@codesourcery.com> Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com> From-SVN: r161764
Diffstat (limited to 'gcc/config/arm/arm-modes.def')
-rw-r--r--gcc/config/arm/arm-modes.def6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/arm/arm-modes.def b/gcc/config/arm/arm-modes.def
index 55b98bc..e9825ed 100644
--- a/gcc/config/arm/arm-modes.def
+++ b/gcc/config/arm/arm-modes.def
@@ -39,10 +39,16 @@ ADJUST_FLOAT_FORMAT (HF, ((arm_fp16_format == ARM_FP16_FORMAT_ALTERNATIVE)
CC_NOTBmode should be used if only the C flag is set as a not-borrow
flag, after a subtraction.
CC_Nmode should be used if only the N (sign) flag is set correctly
+ CC_CZmode should be used if only the C and Z flags are correct
+ (used for DImode unsigned comparisons).
+ CC_NCVmode should be used if only the N, C, and V flags are correct
+ (used for DImode signed comparisons).
CCmode should be used otherwise. */
CC_MODE (CC_NOOV);
CC_MODE (CC_Z);
+CC_MODE (CC_CZ);
+CC_MODE (CC_NCV);
CC_MODE (CC_SWP);
CC_MODE (CCFP);
CC_MODE (CCFPE);