From patchwork Thu Jan 9 17:34:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 308894 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AD0C22C0089 for ; Fri, 10 Jan 2014 04:34:37 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=L2ix59XhfM/oagWUuRi9GFU9mmzdgULoja17Efa+a13 Ns3WE0xoRnvyOgnHkNwY7Dq5w7oEbN0R9wZ9zy5gVxjfs07vpFP6Zw2zV0LgH2iu mkjoDhrNeKL3L/VNr6N87v5zSDp15EGgytcndXnTEGYBVZ4eWRyqQc1SLnanZ6AU = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=sGsUYuP8HiVuNMiSWm1g2cQkZws=; b=HY44Ppt3Qo9ggjOaD EMPjvWEy2SUz2sSeJ4WJEXhxTXoAjDlXTrCiyzObzhWdmjKxKjorlsKWWjGgL3aC 44I2OdB0q3lxs6GlhRShJKB2FxTJfY5XUvDL1lq25X1B8uqJfqt9atym87qfAbzr ftkchRmYIKEBbs8ha4JWY+GUBs= Received: (qmail 19967 invoked by alias); 9 Jan 2014 17:34:30 -0000 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 Received: (qmail 19953 invoked by uid 89); 9 Jan 2014 17:34:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jan 2014 17:34:29 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 09 Jan 2014 17:34:26 +0000 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 9 Jan 2014 17:34:24 +0000 Message-ID: <52CEDDA0.5060408@arm.com> Date: Thu, 09 Jan 2014 17:34:24 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches CC: Richard Earnshaw Subject: [PATCH][ARM] Fix arm_init_iwmmxt_builtins to handle only iwmmxt entries X-MC-Unique: 114010917342602801 X-IsSubscribed: yes Hi all, After my CRC32 intrinsics patch that added new entries into the bdesc_2arg table, the arm_init_iwmmxt_builtins function tries to iterate over them and blows up, causing an ICE when trying to compile with -mcpu=iwmmxt. This patch fixes that by ignoring the non-iwmmxt entries in that table when initialising the iwmmxt builtins. With this patch the gcc.target/arm/mmx-2.c comes back and PASSes. Tested arm-none-eabi on qemu. Ok for trunk? Thanks, Kyrill 2014-01-09 Kyrylo Tkachov * config/arm/arm.c (arm_init_iwmmxt_builtins): Skip non-iwmmxt builtins. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index c8bf7c1..842d67f 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -24244,7 +24244,7 @@ arm_init_iwmmxt_builtins (void) enum machine_mode mode; tree type; - if (d->name == 0) + if (d->name == 0 || !(d->mask == FL_IWMMXT || d->mask == FL_IWMMXT2)) continue; mode = insn_data[d->icode].operand[1].mode;