From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31338 invoked by alias); 17 May 2012 11:32:00 -0000 Received: (qmail 31329 invoked by uid 22791); 17 May 2012 11:31:59 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 May 2012 11:31:38 +0000 From: "mikpe at it dot uu.se" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53386] Bad assembly code produced for m68000 Date: Thu, 17 May 2012 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: mikpe at it dot uu.se X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg01713.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53386 --- Comment #7 from Mikael Pettersson 2012-05-17 11:31:35 UTC --- gcc-4.3.x changed gcc/config.gcc: --- gcc-4.2.4/gcc/config.gcc 2008-03-13 20:11:43.000000000 +0100 +++ gcc-4.3.6/gcc/config.gcc 2011-02-25 00:02:14.000000000 +0100 ... -m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc - tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux.h" - tm_defines="${tm_defines} MOTOROLA USE_GAS" - tmake_file=m68k/t-uclinux +m68k-*-uclinuxoldabi*) # Motorola m68k/ColdFire running uClinux + # with uClibc, using the original + # m68k-elf-based ABI + default_m68k_cpu=68020 + default_cf_cpu=5206 + tm_file="${tm_file} m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/uclinux-oldabi.h" + tm_defines="${tm_defines} MOTOROLA=1" + tmake_file="m68k/t-floatlib m68k/t-uclinux" + use_fixproto=no + ;; +m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux + # with uClibc, using the new GNU/Linux-style + # ABI. + default_m68k_cpu=68020 + default_cf_cpu=5206 + tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h" + tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1" + extra_options="${extra_options} linux.opt" + tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs" use_fixproto=no ;; Upping the default m68k cpu to 020 is suspicious, but the real problem is the inclusion of m68k/linux.h in tm_files, as that disables strict-alignment support, even when compiling with an explicit -m68000 option. I don't know anthing about the uClinux m68k "old" and "new" ABIs, but it looks like you will get correct behaviour if you build for m68k-uclinuxoldabi --with-cpu=m68000.