public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64461] New: bad assembly generated for Coldfire targets
@ 2014-12-31 20:24 joel at gcc dot gnu.org
  2015-01-02 20:37 ` [Bug target/64461] " joel at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: joel at gcc dot gnu.org @ 2014-12-31 20:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

            Bug ID: 64461
           Summary: bad assembly generated for Coldfire targets
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joel at gcc dot gnu.org

Created attachment 34368
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34368&action=edit
Preprocessed RTEMS source which produces the error

Fails at -O1, -O2, and -Os. All RTEMS Coldfire BSPs appear to be failing to
build. I have not looked through all build logs yet to give a complete list of
CPU models impacted but all are Coldfires. For sure, 5235 and 5282 do this.

$ m68k-rtems4.11-gcc --versionm68k-rtems4.11-gcc (GCC) 5.0.0 20141230
(experimental)


$ m68k-rtems4.11-gcc -mcpu=5235 -Os -c coldfire.c 
/tmp/ccrrBmOJ.s: Assembler messages:
/tmp/ccrrBmOJ.s:82: Error: operands mismatch -- statement `move.b
3(%a5),3(%a1,%d0.l)' ignored
/tmp/ccrrBmOJ.s:977: Error: operands mismatch -- statement `move.b
-1(%fp),3(%a0,%d2.l)' ignored
/tmp/ccrrBmOJ.s:1055: Error: operands mismatch -- statement `move.b
-5(%fp),3(%a0,%d3.l)' ignored


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
@ 2015-01-02 20:37 ` joel at gcc dot gnu.org
  2015-01-02 21:16 ` joel at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-02 20:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #1 from Joel Sherrill <joel at gcc dot gnu.org> ---
Doing a git bisect showed this to be the commit that broke things. Clearly not
m68k specific but triggered it. 

commit 91ae0791cbebaac673e42e53c8b7f000241a0ca1
Author: dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Aug 29 23:19:42 2014 +0000

    * expr.c (convert_move): If the target has an explicit converter,
    use it.


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214747
138bc75d-0d04-0410-961f-82ee72b054a4



The full git bisect log is:

# bad: [6c13ec429c328b934e9f67d5cd6f5ab55e17ce73] 2015-01-02  Tobias Burnus 
<burnus@net-b.de>
# good: [8edc9ee53be8854228d20569eee719a01a4001de] 2014-07-18  Bernd Edlinger 
<bernd.edlinger@hotmail.de>
git bisect start 'HEAD' '8edc9ee53be8854228d20569eee719a01a4001de'
# bad: [2dd9fd37811882a2c5cdcd0880c20e507256e10f] 2014-10-10  Yannick Moy 
<moy@adacore.com>
git bisect bad 2dd9fd37811882a2c5cdcd0880c20e507256e10f
# good: [1d8a14f043cccdaeee0a0782560a398a902e15cf] Daily bump.
git bisect good 1d8a14f043cccdaeee0a0782560a398a902e15cf
# bad: [e3b7afcb34c7c4d4cd2f876e83fc2c90c2eeaae6] 2014-09-11  Segher
Boessenkool  <segher@kernel.crashing.org>
git bisect bad e3b7afcb34c7c4d4cd2f876e83fc2c90c2eeaae6
# bad: [67e0a76ed4c526001119ad5d78f49f2cb2f780a0] Fix typo.
git bisect bad 67e0a76ed4c526001119ad5d78f49f2cb2f780a0
# good: [ae799283c5ecc25191575fb5ec2bc16d97674437] Use rtx_expr_list for
expr_status.x_forced_labels
git bisect good ae799283c5ecc25191575fb5ec2bc16d97674437
# good: [8c409b9147aa9f2c536bffe1db93e30ac740d99c] AVX-512. Support
512-bit/masked interleave.
git bisect good 8c409b9147aa9f2c536bffe1db93e30ac740d99c
# good: [c1920e9db30af5043bdc942cfdf374b832687ee4] 2014-08-29  Richard Biener 
<rguenther@suse.de>
git bisect good c1920e9db30af5043bdc942cfdf374b832687ee4
# good: [6843b812545c8f94708624f6332ea3873cc952fc] PR 62215 Reinstate unlinking
old module file before renaming.
git bisect good 6843b812545c8f94708624f6332ea3873cc952fc
# bad: [1c0165c81ccfbe4fbadd96ac8b85c59a0002cab6]     * config/pa/pa.c
(pa_assemble_integer): Don't add PLABEL relocation     prefix to function
labels when generating fast indirect calls.
git bisect bad 1c0165c81ccfbe4fbadd96ac8b85c59a0002cab6
# bad: [4765975cb2f85d61e801d12562b39da2d1e25f2c] * cppbuiltin.c
(define_builtin_macros_for_type_sizes): Round pointer size up to a power of
two. * defaults.h (DWARF2_ADDR_SIZE): Round up. (POINTER_SIZE_UNITS): New,
rounded up value. * dwarf2asm.c (size_of_encoded_value): Use it.
(dw2_output_indirect_constant_1): Likewise. * expmed.c (init_expmed_one_conv):
We now know the sizes of partial int modes. * loop-iv.c
(iv_number_of_iterations): Use precision, not size. * optabs.c (expand_float):
Use precision, not size. (expand_fix): Likewise. * simplify-rtx
(simplify_unary_operation_1): Likewise. * tree-dfa.c (get_ref_base_and_extent):
Likewise. * varasm.c (assemble_addr_to_section): Round up pointer sizes.
(default_assemble_integer) Likewise. (dump_tm_clone_pairs): Likewise. *
dwarf2out.c (mem_loc_descriptor): Allow partial-int modes also. *
var-tracking.c (adjust_mems): Allow partial-int modes also.
(prepare_call_arguments): Likewise. * stor-layout.c (finalize_type_size):
Preserve precision. (layout_type): Use precision, not size.
git bisect bad 4765975cb2f85d61e801d12562b39da2d1e25f2c
# good: [9f30a5e055e777cdb28fd391c34ec8f3cd80a4d6] * lib/target-supports.exp
(check_effective_target_size32plus): Increase size to avoid false positives on
24-bit address spaces. * gcc.c-torture/compile/limits-stringlit.c: Skip if
msp430. * gcc.dg/lto/pr54709_1.c: Fix memcpy prototype. *
gcc.dg/torture/pta-ptrarith-3.c: Use __SIZE_TYPE__ instead of "int". *
gcc.dg/torture/pr36373-10.c: Use __SIZE_TYPE__ if present. *
gcc.dg/torture/pr57864.c: Use __SIZE_TYPE__. * gcc.dg/torture/pr26763-2.c: Use
__SIZE_TYPE__ instead of "int". * gcc.dg/tree-ssa/isolate-3.c: Use
__SIZE_TYPE__ instead of "long unsigned int". * gcc.dg/pr52549.c: Use
__SIZE_TYPE__ if present.
git bisect good 9f30a5e055e777cdb28fd391c34ec8f3cd80a4d6
# bad: [91ae0791cbebaac673e42e53c8b7f000241a0ca1] * expr.c (convert_move): If
the target has an explicit converter, use it.
git bisect bad 91ae0791cbebaac673e42e53c8b7f000241a0ca1
# first bad commit: [91ae0791cbebaac673e42e53c8b7f000241a0ca1] * expr.c
(convert_move): If the target has an explicit converter, use it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
  2015-01-02 20:37 ` [Bug target/64461] " joel at gcc dot gnu.org
@ 2015-01-02 21:16 ` joel at gcc dot gnu.org
  2015-01-02 22:29 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-02 21:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #2 from Joel Sherrill <joel at gcc dot gnu.org> ---
Multiple BSPs trigger this on various files which is not a surprise seeing as
it is generating an illegal memory to memory move. But in case it helps, this
is the list of CPU CFLAGS of BSPs which trigger it. I really believe this is a
breakage for all Coldfire variants though.

-mcpu=5206
-mcpu=5235
-mcpu=5272
-mcpu=528x 
-mcpu=52235
-mcpu=5307
-mcfv4e -Wa,-memac


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
  2015-01-02 20:37 ` [Bug target/64461] " joel at gcc dot gnu.org
  2015-01-02 21:16 ` joel at gcc dot gnu.org
@ 2015-01-02 22:29 ` schwab@linux-m68k.org
  2015-01-02 22:35 ` schwab@linux-m68k.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2015-01-02 22:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> ---
It is using truncsiqi2, but that pattern hasn't been adjusted for coldfire.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-01-02 22:29 ` schwab@linux-m68k.org
@ 2015-01-02 22:35 ` schwab@linux-m68k.org
  2015-01-02 22:48 ` joel at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schwab@linux-m68k.org @ 2015-01-02 22:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> ---
The easiest fix is to disable the three trunc patterns for the coldfire.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-01-02 22:35 ` schwab@linux-m68k.org
@ 2015-01-02 22:48 ` joel at gcc dot gnu.org
  2015-01-12 20:20 ` law at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-02 22:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #5 from Joel Sherrill <joel at gcc dot gnu.org> ---
(In reply to Andreas Schwab from comment #4)
> The easiest fix is to disable the three trunc patterns for the coldfire.

This isn't my area of expertise. That's why I focused in on doing the git
bisect. Hoped it would help someone else.

If you provide a patch, I am more than happy to test it.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-01-02 22:48 ` joel at gcc dot gnu.org
@ 2015-01-12 20:20 ` law at gcc dot gnu.org
  2015-01-12 20:21 ` law at redhat dot com
  2015-01-12 22:09 ` joel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: law at gcc dot gnu.org @ 2015-01-12 20:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #6 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Mon Jan 12 20:19:57 2015
New Revision: 219488

URL: https://gcc.gnu.org/viewcvs?rev=219488&root=gcc&view=rev
Log:
       PR target/64461
        * gcc.target/m68k/pr64461.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/m68k/pr64461.c
Modified:
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-01-12 20:20 ` law at gcc dot gnu.org
@ 2015-01-12 20:21 ` law at redhat dot com
  2015-01-12 22:09 ` joel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: law at redhat dot com @ 2015-01-12 20:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |law at redhat dot com
         Resolution|---                         |FIXED

--- Comment #7 from Jeffrey A. Law <law at redhat dot com> ---
Should be fixed on the trunk.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/64461] bad assembly generated for Coldfire targets
  2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-01-12 20:21 ` law at redhat dot com
@ 2015-01-12 22:09 ` joel at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-12 22:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64461

--- Comment #8 from Joel Sherrill <joel at gcc dot gnu.org> ---
Thanks. I didn't build all our Coldfire BSPs but I checked one and it is OK
now.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-12 22:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-31 20:24 [Bug target/64461] New: bad assembly generated for Coldfire targets joel at gcc dot gnu.org
2015-01-02 20:37 ` [Bug target/64461] " joel at gcc dot gnu.org
2015-01-02 21:16 ` joel at gcc dot gnu.org
2015-01-02 22:29 ` schwab@linux-m68k.org
2015-01-02 22:35 ` schwab@linux-m68k.org
2015-01-02 22:48 ` joel at gcc dot gnu.org
2015-01-12 20:20 ` law at gcc dot gnu.org
2015-01-12 20:21 ` law at redhat dot com
2015-01-12 22:09 ` joel at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).