From patchwork Sun Oct 31 14:15:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 69713 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 462AFB70E3 for ; Mon, 1 Nov 2010 01:15:59 +1100 (EST) Received: (qmail 6869 invoked by alias); 31 Oct 2010 14:15:56 -0000 Received: (qmail 6861 invoked by uid 22791); 31 Oct 2010 14:15:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-ww0-f41.google.com (HELO mail-ww0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 31 Oct 2010 14:15:49 +0000 Received: by wwe15 with SMTP id 15so4145762wwe.2 for ; Sun, 31 Oct 2010 07:15:47 -0700 (PDT) Received: by 10.227.147.148 with SMTP id l20mr7143614wbv.118.1288534547379; Sun, 31 Oct 2010 07:15:47 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id i19sm4193236wbe.5.2010.10.31.07.15.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 31 Oct 2010 07:15:46 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [committed] Add a MIPS clause to 20101011-1.c Date: Sun, 31 Oct 2010 14:15:44 +0000 Message-ID: <87aaluv46n.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 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 Hopefully the comment says it all. I realise !bare-metal doesn't imply Linux, but the test seems like a good compromise. Tested on mipsisa64-elf (where the test was failing) and on mips64-linux-gnu. Applied. Richard gcc/testsuite/ * gcc.c-torture/execute/20101011-1.c: Skip for MIPS unless running the Linux kernel. Index: gcc/testsuite/gcc.c-torture/execute/20101011-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20101011-1.c 2010-10-31 13:39:08.000000000 +0000 +++ gcc/testsuite/gcc.c-torture/execute/20101011-1.c 2010-10-31 14:10:40.000000000 +0000 @@ -12,6 +12,12 @@ #elif defined (__sh__) /* On SH division by zero does not trap. */ # define DO_TEST 0 +#elif defined (__mips__) && !defined(__linux__) + /* MIPS divisions do trap by default, but libgloss targets do not + intercept the trap and raise a SIGFPE. The same is probably + true of other bare-metal environments, so restrict the test to + systems that use the Linux kernel. */ +# define DO_TEST 0 #else # define DO_TEST 1 #endif