From patchwork Wed Oct 15 22:29:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 400106 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 61B501400E9 for ; Thu, 16 Oct 2014 09:29:31 +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:date :message-id:from:to:subject; q=dns; s=default; b=Zxk9/F6MisZWanG D/zBGBG8kfPWIQzOwd0celPp1dIKUWdXO2JWrcGxpdu6Tdjf8Kw8lY9mgy5zSddk 25/WRul+H5utl8sWL3nkFGuQ1kZDriV/aKYCX5fNAk0OF/cuGEHT2t+QyqjrdWvM EcyTX1RD4//tWyeyE51bqKwrznrg= 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:date :message-id:from:to:subject; s=default; bh=CsLQO7K6Ngw/ynXqNL/Eq fdrhKQ=; b=cz0LdaK11DXWkcqUK/ZwrrFsrLL9ABkYBnkblyQ8LXRXNT8ORYrwW XBVmMc3B13VdnuvmzHlyL+8OYBlkgEFuk9KUueBOe4d/eZsHUMy0rQ2poa3AjKi+ lyq/y5QF5nLAqom7RjBHXON2FQrOtU/WowuxxNcjON2ptuJX+JQJaM= Received: (qmail 9647 invoked by alias); 15 Oct 2014 22:29:25 -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 9634 invoked by uid 89); 15 Oct 2014 22:29:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 15 Oct 2014 22:29:23 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9FMTLnm011955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 15 Oct 2014 18:29:21 -0400 Received: from greed.delorie.com (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9FMTKDw029213 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 15 Oct 2014 18:29:21 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.14.4/8.14.4) with ESMTP id s9FMTJ7g012514; Wed, 15 Oct 2014 18:29:19 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.4/8.14.4/Submit) id s9FMTJrd012513; Wed, 15 Oct 2014 18:29:19 -0400 Date: Wed, 15 Oct 2014 18:29:19 -0400 Message-Id: <201410152229.s9FMTJrd012513@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [pointer size] more edge cases X-IsSubscribed: yes A few more cases where pointers were assumed to be whole bytes. Ok? Index: gcc/c-family/c-cppbuiltin.c =================================================================== --- gcc/c-family/c-cppbuiltin.c (revision 216287) +++ gcc/c-family/c-cppbuiltin.c (working copy) @@ -668,13 +668,13 @@ cpp_atomic_builtins (cpp_reader *pfile) to a boolean truth value, let the library work around that. */ builtin_define_with_int_value ("__GCC_ATOMIC_TEST_AND_SET_TRUEVAL", targetm.atomic_test_and_set_trueval); /* ptr_type_node can't be used here since ptr_mode is only set when toplev calls backend_init which is not done with -E or pch. */ - psize = POINTER_SIZE / BITS_PER_UNIT; + psize = POINTER_SIZE_UNITS; if (psize >= SWAP_LIMIT) psize = 0; builtin_define_with_int_value ("__GCC_ATOMIC_POINTER_LOCK_FREE", (have_swap[psize]? 2 : 1)); } Index: gcc/stor-layout.c =================================================================== --- gcc/stor-layout.c (revision 216287) +++ gcc/stor-layout.c (working copy) @@ -2580,13 +2580,13 @@ initialize_sizetypes (void) } if (precision == -1) gcc_unreachable (); } bprecision - = MIN (precision + BITS_PER_UNIT_LOG + 1, MAX_FIXED_MODE_SIZE); + = MIN (precision, MAX_FIXED_MODE_SIZE); bprecision = GET_MODE_PRECISION (smallest_mode_for_size (bprecision, MODE_INT)); if (bprecision > HOST_BITS_PER_DOUBLE_INT) bprecision = HOST_BITS_PER_DOUBLE_INT; /* Create stubs for sizetype and bitsizetype so we can create constants. */ Index: gcc/tree-core.h =================================================================== --- gcc/tree-core.h (revision 216287) +++ gcc/tree-core.h (working copy) @@ -1170,13 +1170,13 @@ enum omp_clause_map_kind OMP_CLAUSE_MAP_ALLOC, OMP_CLAUSE_MAP_TO, OMP_CLAUSE_MAP_FROM, OMP_CLAUSE_MAP_TOFROM, /* The following kind is an internal only map kind, used for pointer based array sections. OMP_CLAUSE_SIZE for these is not the pointer size, - which is implicitly POINTER_SIZE / BITS_PER_UNIT, but the bias. */ + which is implicitly POINTER_SIZE_UNITS, but the bias. */ OMP_CLAUSE_MAP_POINTER, /* Also internal, behaves like OMP_CLAUS_MAP_TO, but additionally any OMP_CLAUSE_MAP_POINTER records consecutive after it which have addresses falling into that range will not be ignored if OMP_CLAUSE_MAP_TO_PSET wasn't mapped already. */ OMP_CLAUSE_MAP_TO_PSET,