From patchwork Sun Nov 27 00:08:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 127824 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 04059B70DC for ; Sun, 27 Nov 2011 11:09:04 +1100 (EST) Received: (qmail 4833 invoked by alias); 27 Nov 2011 00:09:02 -0000 Received: (qmail 4825 invoked by uid 22791); 27 Nov 2011 00:09:01 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 27 Nov 2011 00:08:44 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pAR08hjN005867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 26 Nov 2011 19:08:43 -0500 Received: from pebble.twiddle.home (vpn-228-165.phx2.redhat.com [10.3.228.165]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pAR08h6U011585 for ; Sat, 26 Nov 2011 19:08:43 -0500 Message-ID: <4ED17F8B.3060602@redhat.com> Date: Sat, 26 Nov 2011 16:08:43 -0800 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 MIME-Version: 1.0 To: GCC Patches Subject: Fix init_sync_optabs iteration 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 Testing on m68k-linux -mcpu=5206 (aka coldfire, aka no cas insn) revealed that we hadn't properly registered __sync_val_compare_and_swap_4. Oops. r~ * optabs.c (init_sync_libfuncs_1): Include max in iteration. diff --git a/gcc/optabs.c b/gcc/optabs.c index 1aafd28..0ce21e9 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -6606,7 +6606,7 @@ init_sync_libfuncs_1 (optab tab, const char *base, int max) buf[len + 2] = '\0'; mode = QImode; - for (i = 1; i < max; i *= 2) + for (i = 1; i <= max; i *= 2) { buf[len + 1] = '0' + i; set_optab_libfunc (tab, mode, buf);