From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13019 invoked by alias); 13 Aug 2012 22:42:31 -0000 Received: (qmail 13006 invoked by uid 22791); 13 Aug 2012 22:42:30 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_XG 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; Mon, 13 Aug 2012 22:42:17 +0000 From: "PHHargrove at lbl dot gov" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54142] ppc64 build failure - Unrecognized opcode: `sldi' (and `srdi`) Date: Mon, 13 Aug 2012 22:42: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: normal X-Bugzilla-Who: PHHargrove at lbl dot gov 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-08/txt/msg00795.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54142 --- Comment #9 from Paul H. Hargrove 2012-08-13 22:42:16 UTC --- Following up on my previous experiment, I tried the same input with the xgcc which is failing to build libdecnumber. If also fails with the 1-line test case: {phargrov@fc6 ~}$ cat q.c unsigned long long foo(void) { return 0x00007FFF00000000LLU; } {phargrov@fc6 ~}$ /usr/local/upc/compiler/bld/./gcc/xgcc -B/usr/local/upc/compiler/bld/./gcc/ -m64 -O ~/q.c /tmp/cctmw5wO.s: Assembler messages: /tmp/cctmw5wO.s:14: Error: Unrecognized opcode: `sldi' Examining stderr when "-v" is passed to the two compilers reveals a KEY difference: {phargrov@fc6 ~}$ gcc -m64 -O -v -c q.c 2>&1 | grep -w as as -a64 -mppc64 -many -V -Qy -o q.o /tmp/ccpjKGBl.s {phargrov@fc6 ~}$ /usr/local/upc/compiler/bld/./gcc/xgcc -B/usr/local/upc/compiler/bld/./gcc/ -m64 -O -v -c ~/q.c 2>&1 | grep -w as /usr/local/upc/compiler/bld/./gcc/as -v -a64 -mcom -many -o q.o /tmp/cctEFZq2.s The difference (other than the use of the built-time wrapper script) is "-mppc64" for the Red Hat built gcc-4.2.1 vs "-mcom" for the 4.8.0 snapshot. The following shows that this flag, not the presence of the wrapper script is the origin of the failure: {phargrov@fc6 ~}$ /usr/local/upc/compiler/bld/./gcc/as -a64 -mcom -many -o q.o q.s q.s: Assembler messages: q.s:14: Error: Unrecognized opcode: `sldi' {phargrov@fc6 ~}$ /usr/local/upc/compiler/bld/./gcc/as -a64 -mppc64 -many -o q.o q.s [no error] {phargrov@fc6 ~}$ /usr/bin/as -a64 -mcom -many -o q.o q.s q.s: Assembler messages: q.s:14: Error: Unrecognized opcode: `sldi' {phargrov@fc6 ~}$ /usr/bin/as -a64 -mppc64 -many -o q.o q.s [no error] So, assuming gas is correct in rejecting 'sldi' and 'srdi' in "common" mode the question becomes, "why is gcc by default specifying a target to the assembler which doesn't support the instructions it is generating?" Of course, if 'sldi' and 'slri' ARE supposed to be supported in "common" mode, then this is a binutils bug.