diff options
author | ramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-24 10:46:00 +0000 |
---|---|---|
committer | ramana <ramana@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-12-24 10:46:00 +0000 |
commit | 89504fc1abe5cdd87f4ecec5a3be7ba718661149 (patch) | |
tree | f6f0314bf4dd56f06ecd57f3fd34fd361484f9f2 /gcc/config/arm/arm.md | |
parent | dc58accd577e012e118fe7dfa066fa4298cb477a (diff) | |
download | gcc-89504fc1abe5cdd87f4ecec5a3be7ba718661149.tar.gz |
Fix PR target/40887
2009-12-24 Julian Brown <julian@codesourcery.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/40887
* config/arm/arm.c (output_call_mem): Remove armv5 support.
* config/arm/arm.md (*call_mem): Disable for armv5. Add note.
(*call_value_mem): Likewise.
PR target/40887
* gcc.target/gcc.arm/pr40887.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155453 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.md')
-rw-r--r-- | gcc/config/arm/arm.md | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index e79ef15fa7d..cbb0a1bdf14 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -8453,12 +8453,17 @@ (set_attr "type" "call")] ) + +;; Note: not used for armv5+ because the sequence used (ldr pc, ...) is not +;; considered a function call by the branch predictor of some cores (PR40887). +;; Falls back to blx rN (*call_reg_armv5). + (define_insn "*call_mem" [(call (mem:SI (match_operand:SI 0 "call_memory_operand" "m")) (match_operand 1 "" "")) (use (match_operand 2 "" "")) (clobber (reg:SI LR_REGNUM))] - "TARGET_ARM" + "TARGET_ARM && !arm_arch5" "* return output_call_mem (operands); " @@ -8560,13 +8565,15 @@ (set_attr "type" "call")] ) +;; Note: see *call_mem + (define_insn "*call_value_mem" [(set (match_operand 0 "" "") (call (mem:SI (match_operand:SI 1 "call_memory_operand" "m")) (match_operand 2 "" ""))) (use (match_operand 3 "" "")) (clobber (reg:SI LR_REGNUM))] - "TARGET_ARM && (!CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))" + "TARGET_ARM && !arm_arch5 && (!CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))" "* return output_call_mem (&operands[1]); " |