From patchwork Tue Jun 28 16:39:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 71123 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp1692586qgy; Tue, 28 Jun 2016 09:40:39 -0700 (PDT) X-Received: by 10.98.86.72 with SMTP id k69mr3361000pfb.166.1467132039908; Tue, 28 Jun 2016 09:40:39 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id i23si34362955pfa.147.2016.06.28.09.40.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jun 2016 09:40:39 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-71210-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-71210-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-71210-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; q=dns; s=default; b=sojdZ 85xIPl/YwxmjmaVyxRdGTFPVbPUZeecHyypftmvRYOmoS+LdsjcApUNSmR8sxPIu Rb+kWoq4nEvAZYihFQQFpITggo26ZC7hiKFkGR9O1L1ESUTNEDuXOASHn2UwUioH 9ulv0CpGWvCScbS4TdqkjolMLeP4uhxp8zFRus= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type; s=default; bh=DIqQHjAhVs5 KkoRxtDno8z1x0eM=; b=mQthiKP4TCkJlUKoJLFvsCXuVfqiKnwqqeus0rQXty+ tG57tkTv43VnRNGkdVDxnmDGf8FwW4rTcHESsdI2suCx6dC70y/tdSb+Z2Vpvj7C xergqNZDZqjd2CLd9/zxU7mdy6imBUttePoPSj0M2Gz68yOLVEFgp0RfHE5qZ4wU = Received: (qmail 10046 invoked by alias); 28 Jun 2016 16:40:21 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 9960 invoked by uid 89); 28 Jun 2016 16:40:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HX-Exchange-Antispam-Report-Test:22074186197030 X-HELO: na01-bn1-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , CC: , , , , , , , , , , , , , , , , Andrew Pinski , Yury Norov Subject: [PATCH 01/23] [AARCH64] define word size for lp64 and ilp32 Date: Tue, 28 Jun 2016 19:39:16 +0300 Message-ID: <1467131978-669-2-git-send-email-ynorov@caviumnetworks.com> In-Reply-To: <1467131978-669-1-git-send-email-ynorov@caviumnetworks.com> References: <1467131978-669-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-ClientProxiedBy: AM5PR0901CA0030.eurprd09.prod.outlook.com (10.164.186.168) To SN1PR07MB2254.namprd07.prod.outlook.com (10.164.47.148) X-MS-Office365-Filtering-Correlation-Id: 93654865-a0a2-4746-168a-08d39f72d9d4 X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2254; 2:huLbL180scyoKe/+imuvV9lhPG/D3pGSZAcMeXkDr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exchange-Antispam-Report-Test: UriScan:(250305191791016)(22074186197030); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:SN1PR07MB2254; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB2254; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB2254; 4:5n67fSYm2r3ACoCnKohGhiK7WSvdfh3tU4XLxNCqMku8ePRbAfNjc4bxDE/xHU4Zj4RSyHFsl20IkyksaMIKtuyeT2Fjv+TYvTUpA22oXvDngn83AS29myvvNwL/u5yag/5ViaJk5QHb+bWOcshQbCRTL8qqFzocrQIu365DG1H41CimpU9EUN8mIjRe599wpSwINygAtUUHiKc2gcEeEqunTMIceyG3ABmmPbVpke6N7xWqcXHc75ny87KrtcfPOGzfQlzqtHYN6lArsmxwt3zUsa266WMur8/SOGWGC1L3wEZ1TxKKNPpGxwejNQy9jmM0PUdgqrq3UVdPGK90sWLTfzijqc0c8tyfTYa1VvhUM9eqIlOqFZsN4cB7eTPlgGGXmn0kkIxHT2r1aqJQFHQ+9+nfisgpUQDkO30H34CpUzKrfEFdwVRP772I6kUA X-Forefront-PRVS: 0987ACA2E2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(6116002)(81166006)(92566002)(229853001)(107886002)(3846002)(4326007)(81156014)(8676002)(189998001)(77096005)(33646002)(305945005)(7846002)(36756003)(7736002)(19580395003)(2906002)(5003940100001)(19580405001)(106356001)(76506005)(50226002)(97736004)(48376002)(105586002)(47776003)(5001770100001)(66066001)(2950100001)(586003)(50466002)(42186005)(76176999)(68736007)(50986999)(4001430100002)(101416001)(15975445007)(2004002)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB2254; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts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XPCHPN0uNQGUjidnbmLjXsjMFTLJMx26KOc+5V6Bejb0833Dih+WFFL/VVzqIHS+VoXndLjlrj/xhj8RO/sbdVFKPr9vv6QVu4z5tTWfLQlAOxjxzqPcuxYUDI8y/zmX4l7yNvGQXkL40hlXsQs97x2YXjm22+DHu/ba977Q7rO7ejF3pswvwNV83ORSjnrPTePxMs5d5zUhvGaFSOBL6j4ATj0tnYIqbjnnnX0ojWanbLqHHH9MQYCz4lX4EX3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2016 16:40:01.5092 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR07MB2254 From: Andrew Pinski Additionally introduce and/or define MIN/MAX macro for size and ptrdiff types. Signed-off-by: Andrew Pinski Signed-off-by: Yury Norov --- sysdeps/aarch64/bits/wordsize.h | 25 +++++++++++++++++++++++++ sysdeps/generic/stdint.h | 9 +++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 sysdeps/aarch64/bits/wordsize.h -- 2.7.4 diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h new file mode 100644 index 0000000..569307a --- /dev/null +++ b/sysdeps/aarch64/bits/wordsize.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 +#endif + diff --git a/sysdeps/generic/stdint.h b/sysdeps/generic/stdint.h index 4427627..cedbe43 100644 --- a/sysdeps/generic/stdint.h +++ b/sysdeps/generic/stdint.h @@ -248,8 +248,13 @@ typedef unsigned long long int uintmax_t; # define PTRDIFF_MIN (-9223372036854775807L-1) # define PTRDIFF_MAX (9223372036854775807L) # else -# define PTRDIFF_MIN (-2147483647-1) -# define PTRDIFF_MAX (2147483647) +# if __WORDSIZE32_PTRDIFF_LONG +# define PTRDIFF_MIN (-2147483647L-1) +# define PTRDIFF_MAX (2147483647L) +# else +# define PTRDIFF_MIN (-2147483647-1) +# define PTRDIFF_MAX (2147483647) +# endif # endif /* Limits of `sig_atomic_t'. */