From patchwork Mon Oct 8 00:13:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 189874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2A43D2C01FD for ; Mon, 8 Oct 2012 11:13:56 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350260037; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Subject:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=cvOV6+I 01gyXvLPlbc4JaRsTkR4=; b=yMKzaAJdHIelsro/7JkRqUY+u+fILLFyiH96XUR GbPFFvhG5bRa3i/rZnxYg1rHfGHO8ajzRVnnOA2qzpXb2bnhnDNpYye972t+9oIH dpM+yqZjim4WWE/qeq+2KgD2aDeQ7GtC3ncQcmYgQAb9j+pmBo5wWMvI6vtktpxn RL6Q= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Subject:Message-ID:User-Agent:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=mvIfixU3hpDarrocqISjdLkiKyosvefA0MfHgpBPeuVgpUdH+GkzCFbJ8ZLcmN NRlSq3TzBt2bvZz1yw5Zu1FbNsemSzOKeIw2Et8o93n2nDtFpPIHaVHoPg/dgI0q vIm5SZTkEeL/v4lkqave1UGyy+FCYn1RBA3y50S0SLe1c=; Received: (qmail 4050 invoked by alias); 8 Oct 2012 00:13:45 -0000 Received: (qmail 4003 invoked by uid 22791); 8 Oct 2012 00:13:39 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, TW_BJ, TW_CP X-Spam-Check-By: sourceware.org Received: from dair.pair.com (HELO dair.pair.com) (209.68.1.49) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 08 Oct 2012 00:13:34 +0000 Received: (qmail 10758 invoked by uid 20157); 8 Oct 2012 00:13:33 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 8 Oct 2012 00:13:33 -0000 Date: Sun, 7 Oct 2012 20:13:33 -0400 (EDT) From: Hans-Peter Nilsson To: gcc-patches@gcc.gnu.org Subject: Committed, MMIX: fix a port-bug outputting constants, improving test-results. Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Fixing this bug, which effectively caused 0 to be emitted instead of constants requiring more than one actual insn to generate (through the base-plus-offset support, kind-of macro insns), i.e. like "LDA $2,#0lx" instead of "LDA $2,#ffffffffff", gets rid of 193 of the regressions from (some-early-time) I see for mmix-knuth-mmixware (regress-234 to regress-41), vastly improving results, somewhat as follows: === gcc Summary === -# of expected passes 73786 -# of unexpected failures 918 +# of expected passes 74337 +# of unexpected failures 367 === g++ Summary === -# of expected passes 45504 -# of unexpected failures 174 +# of expected passes 45536 +# of unexpected failures 142 === objc Summary === -# of expected passes 1655 -# of unexpected failures 153 +# of expected passes 2985 +# of unexpected failures 7 === libstdc++ Summary === -# of expected passes 6822 -# of unexpected failures 141 +# of expected passes 6907 +# of unexpected failures 56 It also brings down build+test from (wall-clock) about 7:09:24 to 5:01:46 on a yesteryear x86_64-linux host, mostly from the 17 eliminated timeouts. (BTW, that's on top of improvements from 9:18:00 that I get from changing the simulator, start-up-files and newlib low-level support to instrument and optionally require memory to be explicitly allocated rather than implicitly allocated on access; lots of eliminated timeouts. Bugs are also quite a bit easier to diagnose. Still quite a bit too high; it should be more like 3:30. I'll post the mmix-sim.ch when I've diagnosed all of the fallout from those changes as bugs previously hidden by implicit allocation, rather than subtle bugs in the new machinery.) There *are* fall-out regressions with this patch: +FAIL: objc/execute/exceptions/matcher-1.m execution, -O0 -fgnu-runtime +FAIL: objc/execute/exceptions/matcher-1.m execution, -O1 -fgnu-runtime +FAIL: objc/execute/exceptions/matcher-1.m execution, -O2 -fgnu-runtime +FAIL: objc/execute/exceptions/matcher-1.m execution, -O3 -fomit-frame-pointer -fgnu-runtime +FAIL: objc/execute/exceptions/matcher-1.m execution, -O3 -g -fgnu-runtime +FAIL: objc/execute/exceptions/matcher-1.m execution, -Os -fgnu-runtime but I'm just going to let that slide at the moment. Not even sorry, just happy that they're so few. Before someone starts lecturing me on knowingly introducing regressions, just don't. There's also a bug in the assembler for letting "#0lx" through as "#0" instead of erroring on the "lx". Later. Committed. * config/mmix/mmix.c (mmix_output_octa): Don't assume HOST_WIDEST_INT_PRINT_HEX starts with "0x". Instead use HOST_WIDE_INT_PRINT_HEX_PURE, falling back to HOST_WIDEST_INT_PRINT_UNSIGNED. brgds, H-P --- gcc/config/mmix/mmix.c.orig 2012-09-10 01:41:59.000000000 +0200 +++ gcc/config/mmix/mmix.c 2012-10-07 05:11:52.000000000 +0200 @@ -2499,19 +2499,9 @@ mmix_output_shiftvalue_op_from_str (FILE static void mmix_output_octa (FILE *stream, HOST_WIDEST_INT value, int do_begin_end) { - /* Snipped from final.c:output_addr_const. We need to avoid the - presumed universal "0x" prefix. We can do it by replacing "0x" with - "#0" here; we must avoid a space in the operands and no, the zero - won't cause the number to be assumed in octal format. */ - char hex_format[sizeof (HOST_WIDEST_INT_PRINT_HEX)]; - if (do_begin_end) fprintf (stream, "\tOCTA "); - strcpy (hex_format, HOST_WIDEST_INT_PRINT_HEX); - hex_format[0] = '#'; - hex_format[1] = '0'; - /* Provide a few alternative output formats depending on the number, to improve legibility of assembler output. */ if ((value < (HOST_WIDEST_INT) 0 && value > (HOST_WIDEST_INT) -10000) @@ -2520,8 +2510,13 @@ mmix_output_octa (FILE *stream, HOST_WID else if (value > (HOST_WIDEST_INT) 0 && value < ((HOST_WIDEST_INT) 1 << 31) * 2) fprintf (stream, "#%x", (unsigned int) value); - else - fprintf (stream, hex_format, value); + else if (sizeof (HOST_WIDE_INT) == sizeof (HOST_WIDEST_INT)) + /* We need to avoid the not-so-universal "0x" prefix; we need the + pure hex-digits together with the mmixal "#" hex prefix. */ + fprintf (stream, "#" HOST_WIDE_INT_PRINT_HEX_PURE, + (HOST_WIDE_INT) value); + else /* Need to avoid the hex output; there's no ...WIDEST...HEX_PURE. */ + fprintf (stream, HOST_WIDEST_INT_PRINT_UNSIGNED, value); if (do_begin_end) fprintf (stream, "\n");