From patchwork Sun Aug 18 18:48:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 1148894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507195-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="AwvjSaD1"; dkim-atps=neutral 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 46BR1G0Tz1z9sMr for ; Mon, 19 Aug 2019 04:49:19 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; q=dns; s=default; b=RDb6QAWYGvhErrLjbXp6 l0drJpUPfGxcqhQP3rSvUWaBWAQdFeWUzCUnBV917aOHpVoH7/Yl9WAWKu2OibL2 gBlelb6moMAtTqdwo39wiBYpxwHjScRbdSxtTVe48UR8BJHg9PRct93JL227xwPp oN2zG9UfOt1LDcfKSzkPPTk= 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:from :content-type:content-transfer-encoding:mime-version:subject :message-id:date:cc:to; s=default; bh=bJM/0EcyZEJCMQrbXieYRQwtwj 0=; b=AwvjSaD11sOfvRZ5XVg+uTJ8hj4eQ8R9zhTM+roZvPE21lIxjgbjFrAVZT M7TyfpduiamZqneBLDGsZk/Qr+cSp8NEX7nnm8zq/N7H2WA7DkHTDJzOk+qpbnuR 75dWI5fgjGCWsdY/0RRLEXZLWm49yfXYl9lcEIo3xTi4/ACpk= Received: (qmail 12392 invoked by alias); 18 Aug 2019 18:49:10 -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 12213 invoked by uid 89); 18 Aug 2019 18:48:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_COUK, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*r:sk:host81-, HX-Spam-Relays-External:sk:host81-, H*RU:sk:host81-, TARGET_64BIT X-HELO: smtp2.wavenetuk.net Received: from smtp.wavenetuk.net (HELO smtp2.wavenetuk.net) (195.26.37.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Aug 2019 18:48:42 +0000 Received: from euterpe-sie.home (host81-138-1-83.in-addr.btopenworld.com [81.138.1.83]) by smtp2.wavenetuk.net (Postfix) with ESMTPA id 735E46001D8; Sun, 18 Aug 2019 19:48:31 +0100 (BST) From: Iain Sandoe Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [Darwin, PPC, committed] Fix fail of cpp/assert4.c Message-Id: <3B8B36F6-8E95-40FF-B174-D227A503B1E6@sandoe.co.uk> Date: Sun, 18 Aug 2019 19:48:20 +0100 Cc: Segher Boessenkool To: GCC Patches Despite that the cpp assert facility is deprecated, we do have a test for it. This test needs the cpu and machine asserts to be implemented which hadn't been done for PPC Darwin. Fixed thus. tested on powerpc-darwin9, applied to mainline, Iain gcc/ 2019-08-18 Iain Sandoe * config/rs6000/darwin.h (TARGET_OS_CPP_BUILTINS): Add asserts for cpu and machine. Factor 64/32b builtins. diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index 150dc4f4cd..a626325c2d 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -52,11 +52,23 @@ #define TARGET_OS_CPP_BUILTINS() \ do \ { \ - if (!TARGET_64BIT) builtin_define ("__ppc__"); \ - if (!TARGET_64BIT) builtin_define ("__PPC__"); \ - if (TARGET_64BIT) builtin_define ("__ppc64__"); \ - if (TARGET_64BIT) builtin_define ("__PPC64__"); \ builtin_define ("__POWERPC__"); \ + builtin_define ("__PPC__"); \ + if (TARGET_64BIT) \ + { \ + builtin_define ("__ppc64__"); \ + builtin_define ("__PPC64__"); \ + builtin_define ("__powerpc64__"); \ + builtin_assert ("cpu=powerpc64"); \ + builtin_assert ("machine=powerpc64"); \ + } \ + else \ + { \ + builtin_define ("__ppc__"); \ + builtin_define_std ("PPC"); \ + builtin_assert ("cpu=powerpc"); \ + builtin_assert ("machine=powerpc"); \ + } \ builtin_define ("__NATURAL_ALIGNMENT__"); \ darwin_cpp_builtins (pfile); \ } \