]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm.c (arm_rtx_costs_1, [...]): Adjust costs for comparing a constant with small...
authorRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 24 Oct 2003 09:25:30 +0000 (09:25 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 24 Oct 2003 09:25:30 +0000 (09:25 +0000)
commitc769a35d59f282465c1a344617bf04d595e8c477
tree8b0705d0530966a28b9e785abe61611f6dc2697b
parentc21dbe8553f0e26da2d3df76d3d0c387da38c522
arm.c (arm_rtx_costs_1, [...]): Adjust costs for comparing a constant with small negative numbers and add...

* arm.c (arm_rtx_costs_1, case TARGET_THUMB): Adjust costs for
comparing a constant with small negative numbers and add costing
for constants in conjunction with AND.
(note_invalid_constants): Tidy previous change.
(thumb_cmp_operand): Tidy.
(thumb_cmpneg_operand): New function.
* arm.h (CONDITIONAL_REGISTER_USAGE): Don't use HI regs if optimizing
for size.
(FIRST_LO_REGNUM, FIRST_HI_REGNUM, LAST_HI_REGNUM): Define.
(PREDICATE_CODES): Add thumb_cmpneg_operand.
* arm.md (cbranchsi4): Convert to define_expand.  Handle comparison
with a negative constant.
(cbranchsi4_insn): Matcher for cbranchsi4.
(cbranchsi4_scratch): Similar, but a scratch is available for
handling negative constants.
(movsi_cbranchsi4): New pattern.
(tstsi3_cbranch): Renamed from andsi3_cbranch_scratch, remove scratch
and use the TST instruction.
(andsi3_cbranch, orrsi3_cbranch, xorsi3_cbranch, cbranchne_decr1)
(addsi3_cbranch, subsi3_cbranch): Ensure that register preferencing
cannot see high regs or memory alternatives.
(bicsi3_cbranch_scratch, bicsi3_cbranch): New patterns.

From-SVN: r72885
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md