* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
@ 2012-02-17 10:51 ` mikpe at it dot uu.se
2012-02-17 23:23 ` steven at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: mikpe at it dot uu.se @ 2012-02-17 10:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-02-17 10:46:11 UTC ---
Fails with gcc 4.7 but works with 4.6, 4.5, and 4.4.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
2012-02-17 10:51 ` [Bug target/52294] " mikpe at it dot uu.se
@ 2012-02-17 23:23 ` steven at gcc dot gnu.org
2012-02-18 0:00 ` rearnsha at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu.org @ 2012-02-17 23:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-17
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
2012-02-17 10:51 ` [Bug target/52294] " mikpe at it dot uu.se
2012-02-17 23:23 ` steven at gcc dot gnu.org
@ 2012-02-18 0:00 ` rearnsha at gcc dot gnu.org
2012-02-18 12:32 ` steven at gcc dot gnu.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-18 0:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-17 23:22:41 UTC ---
Confirmed.
lsls Rd, Rn, Rm
is only 2 bytes in size if Rd == Rn
Although the testcase only fails on trunk, the miscalculation is certain to be
present on all maintained branches.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (2 preceding siblings ...)
2012-02-18 0:00 ` rearnsha at gcc dot gnu.org
@ 2012-02-18 12:32 ` steven at gcc dot gnu.org
2012-02-18 12:46 ` steven at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu.org @ 2012-02-18 12:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rearnsha at gcc dot
| |gnu.org, steven at gcc dot
| |gnu.org
--- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2012-02-18 12:27:50 UTC ---
Richard, I suppose you mean the problem is in this define_insn:
(define_insn "*thumb1_ashlsi3"
[(set (match_operand:SI 0 "register_operand" "=l,l")
(ashift:SI (match_operand:SI 1 "register_operand" "l,0")
(match_operand:SI 2 "nonmemory_operand" "N,l")))]
"TARGET_THUMB1"
"lsl\\t%0, %1, %2"
[(set_attr "length" "2")
(set_attr "conds" "set")])
which should set "length" depending on the operands?
(BTW when should ARM_LSL_NAME be used instead of "lsl"? Or is ARM_LSL_NAME not
relevant for Thumb?)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (3 preceding siblings ...)
2012-02-18 12:32 ` steven at gcc dot gnu.org
@ 2012-02-18 12:46 ` steven at gcc dot gnu.org
2012-02-18 12:47 ` steven at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu.org @ 2012-02-18 12:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-02-18 12:36:29 UTC ---
(If the pattern of comment #3 is to blame, then this goes back all the way to
the check-in of that pattern, see
http://gcc.gnu.org/viewcvs?view=revision&revision=33028)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (4 preceding siblings ...)
2012-02-18 12:46 ` steven at gcc dot gnu.org
@ 2012-02-18 12:47 ` steven at gcc dot gnu.org
2012-02-18 13:24 ` steven at gcc dot gnu.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu.org @ 2012-02-18 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-02-18 12:46:00 UTC ---
(In reply to comment #4)
> (If the pattern of comment #3 is to blame, then this ...
...probably fix it.
Index: arm.md
===================================================================
--- arm.md (revision 184318)
+++ arm.md (working copy)
@@ -3505,7 +3505,12 @@
(match_operand:SI 2 "nonmemory_operand" "N,l")))]
"TARGET_THUMB1"
"lsl\\t%0, %1, %2"
- [(set_attr "length" "2")
+ [(set (attr "length")
+ (if_then_else
+ (eq (symbol_ref ("which_alternative"))
+ (const_int 0))
+ (const_int 4)
+ (const_int 2)))
(set_attr "conds" "set")])
(define_expand "ashrdi3"
And otherwise: sorry for all the noise :-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (5 preceding siblings ...)
2012-02-18 12:47 ` steven at gcc dot gnu.org
@ 2012-02-18 13:24 ` steven at gcc dot gnu.org
2012-02-18 15:34 ` rearnsha at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: steven at gcc dot gnu.org @ 2012-02-18 13:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2012-02-18 12:47:20 UTC ---
Or better:
Index: arm.md
===================================================================
--- arm.md (revision 184318)
+++ arm.md (working copy)
@@ -3505,7 +3505,7 @@
(match_operand:SI 2 "nonmemory_operand" "N,l")))]
"TARGET_THUMB1"
"lsl\\t%0, %1, %2"
- [(set_attr "length" "2")
+ [(set_attr "length" "4,2")
(set_attr "conds" "set")])
(define_expand "ashrdi3"
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (6 preceding siblings ...)
2012-02-18 13:24 ` steven at gcc dot gnu.org
@ 2012-02-18 15:34 ` rearnsha at gcc dot gnu.org
2012-02-20 12:31 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-18 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rearnsha at gcc dot gnu.org
|gnu.org |
--- Comment #7 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-18 15:25:01 UTC ---
(In reply to comment #3)
> Richard, I suppose you mean the problem is in this define_insn:
>
> (define_insn "*thumb1_ashlsi3"
> [(set (match_operand:SI 0 "register_operand" "=l,l")
> (ashift:SI (match_operand:SI 1 "register_operand" "l,0")
> (match_operand:SI 2 "nonmemory_operand" "N,l")))]
> "TARGET_THUMB1"
> "lsl\\t%0, %1, %2"
> [(set_attr "length" "2")
> (set_attr "conds" "set")])
No, that pattern is only for Thumb1, it never applies to Thumb2.
I'm currently testing a fix
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (7 preceding siblings ...)
2012-02-18 15:34 ` rearnsha at gcc dot gnu.org
@ 2012-02-20 12:31 ` rguenth at gcc dot gnu.org
2012-02-21 15:53 ` rearnsha at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-20 12:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (8 preceding siblings ...)
2012-02-20 12:31 ` rguenth at gcc dot gnu.org
@ 2012-02-21 15:53 ` rearnsha at gcc dot gnu.org
2012-02-21 23:47 ` rearnsha at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-21 15:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #8 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-21 15:38:40 UTC ---
Author: rearnsha
Date: Tue Feb 21 15:38:35 2012
New Revision: 184442
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184442
Log:
PR target/52294
* thumb2.md (thumb2_shiftsi3_short): Split register and
immediate shifts. For register shifts tie operands 0 and 1.
(peephole2 for above): Check that register-controlled shifts
have suitably tied operands.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/thumb2.md
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (9 preceding siblings ...)
2012-02-21 15:53 ` rearnsha at gcc dot gnu.org
@ 2012-02-21 23:47 ` rearnsha at gcc dot gnu.org
2012-02-22 0:05 ` rearnsha at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-21 23:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #9 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-21 23:46:10 UTC ---
Author: rearnsha
Date: Tue Feb 21 23:46:05 2012
New Revision: 184452
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184452
Log:
PR target/52294
* thumb2.md (thumb2_shiftsi3_short): Split register and
immediate shifts. For register shifts tie operands 0 and 1.
(peephole2 for above): Check that register-controlled shifts
have suitably tied operands.
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/arm/thumb2.md
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (10 preceding siblings ...)
2012-02-21 23:47 ` rearnsha at gcc dot gnu.org
@ 2012-02-22 0:05 ` rearnsha at gcc dot gnu.org
2012-02-22 1:39 ` rearnsha at gcc dot gnu.org
2012-06-08 8:58 ` jye2 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-22 0:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #10 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-21 23:51:21 UTC ---
Author: rearnsha
Date: Tue Feb 21 23:51:16 2012
New Revision: 184454
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184454
Log:
PR target/52294
* thumb2.md (thumb2_shiftsi3_short): Split register and
immediate shifts. For register shifts tie operands 0 and 1.
(peephole2 for above): Check that register-controlled shifts
have suitably tied operands.
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/arm/thumb2.md
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (11 preceding siblings ...)
2012-02-22 0:05 ` rearnsha at gcc dot gnu.org
@ 2012-02-22 1:39 ` rearnsha at gcc dot gnu.org
2012-06-08 8:58 ` jye2 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2012-02-22 1:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.7.0 |4.5.4
--- Comment #11 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2012-02-22 00:11:27 UTC ---
Fixed in 4.5, 4.6 and trunk
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9
2012-02-17 10:32 [Bug target/52294] New: [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9 bero at arklinux dot org
` (12 preceding siblings ...)
2012-02-22 1:39 ` rearnsha at gcc dot gnu.org
@ 2012-06-08 8:58 ` jye2 at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: jye2 at gcc dot gnu.org @ 2012-06-08 8:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52294
--- Comment #12 from jye2 at gcc dot gnu.org 2012-06-08 08:57:59 UTC ---
Author: jye2
Date: Fri Jun 8 08:57:53 2012
New Revision: 188332
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188332
Log:
2012-06-08 Joey Ye <joey.ye@arm.com>
Backport r184442 from mainline
2012-02-21 Richard Earnshaw <rearnsha@arm.com>
PR target/52294
* thumb2.md (thumb2_shiftsi3_short): Split register and
immediate shifts. For register shifts tie operands 0 and 1.
(peephole2 for above): Check that register-controlled shifts
have suitably tied operands.
Backport r183756 from mainline
2012-01-31 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* config/arm/thumb2.md (thumb2_mov_notscc): Use MVN for true
condition.
Backport r183349 from mainline
2012-01-20 Jakub Jelinek <jakub@redhat.com>
PR target/51915
* config/arm/arm.c (arm_count_output_move_double_insns): Call
output_move_double on a copy of operands array.
Backport r183095 from mainline
2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* config/arm/arm.md (mov_notscc): Use MVN for false condition.
Backport r182628 from mainline
2011-12-21 Richard Earnshaw <rearnsha@arm.com>
PR target/51643
* arm.c (arm_function_ok_for_sibcall): Use DECL_WEAK in previous
change.
Backport r182621 from mainline
2011-12-21 Richard Earnshaw <rearnsha@arm.com>
PR target/51643
* arm.c (arm_function_ok_for_sibcall): Don't try to tailcall a
weak function on bare-metal EABI targets.
Testsuite:
Backport r183349 from mainline
2012-01-20 Jakub Jelinek <jakub@redhat.com>
PR target/51915
* gcc.target/arm/pr51915.c: New test.
Backport r183095 from mainline
2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* gcc.c-torture/execute/20120110-1.c: New testcase.
Backport r182621 from mainline
2011-12-21 Richard Earnshaw <rearnsha@arm.com>
PR target/51643
* gcc.target/arm/sibcall-2.c: New test.
Added:
branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.c-torture/execute/20120111-1.c
branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.target/arm/pr51915.c
branches/ARM/embedded-4_6-branch/gcc/testsuite/gcc.target/arm/sibcall-2.c
Modified:
branches/ARM/embedded-4_6-branch/gcc/ChangeLog.arm
branches/ARM/embedded-4_6-branch/gcc/config/arm/arm.c
branches/ARM/embedded-4_6-branch/gcc/config/arm/arm.md
branches/ARM/embedded-4_6-branch/gcc/config/arm/thumb2.md
branches/ARM/embedded-4_6-branch/gcc/testsuite/ChangeLog.arm
^ permalink raw reply [flat|nested] 15+ messages in thread