From patchwork Fri Jan 9 07:48:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Holsgrove X-Patchwork-Id: 4582 Received: (qmail 7355 invoked by alias); 9 Jan 2015 07:49:08 -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 7293 invoked by uid 89); 9 Jan 2015 07:49:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bn1-obe.outbound.protection.outlook.com From: David Holsgrove To: CC: Subject: [COMMITTED PATCH] MicroBlaze: Fix volatile-register-var warning in READ_THREAD_POINTER Date: Fri, 9 Jan 2015 17:48:35 +1000 In-Reply-To: <1420789716-19858-1-git-send-email-david.holsgrove@xilinx.com> References: <1420789716-19858-1-git-send-email-david.holsgrove@xilinx.com> X-RCIS-Action: ALLOW Message-ID: X-EOPAttributedMessage: 0 Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=david.holsgrove@xilinx.com; X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(54534003)(377424004)(189002)(450100001)(21056001)(19580395003)(92726002)(76176999)(6806004)(87936001)(89996001)(48376002)(50466002)(74316001)(20776003)(47776003)(19580405001)(50986999)(120916001)(46102003)(2950100001)(53416004)(106466001)(110136001)(104016003)(229853001)(33646002)(107046002)(2351001)(77156002)(92566001)(64706001)(108616004)(62966003)(86362001)(230783001)(4396001)(31966008)(99396003)(50226001)(107986001)(24736002)(23106004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1AFFO11HUB027; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; MLV:sfv; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB027; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA: BCL:0; PCL:0; RULEID:(601004); SRVR:BN1AFFO11HUB027; X-Forefront-PRVS: 04519BA941 X-Exchange-Antispam-Report-CFA: BCL:0;PCL:0;RULEID:;SRVR:BN1AFFO11HUB027; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jan 2015 07:49:03.2973 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1AFFO11HUB027 Resolves warning: 'optimization may eliminate reads and/or writes to register variables' 2015-01-06 David Holsgrove * sysdeps/microblaze/nptl/tls.h: Remove inline __microblaze_get_thread_area and update READ_THREAD_POINTER. Signed-off-by: David Holsgrove --- ChangeLog | 6 ++++++ sysdeps/microblaze/nptl/tls.h | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 834e23c..2a925cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2015-01-09 David Holsgrove + * sysdeps/microblaze/nptl/tls.h (__microblaze_get_thread_area): Function + removed. + (READ_THREAD_POINTER): Use __microblaze_thread_area instead. + +2015-01-09 David Holsgrove + * sysdeps/microblaze/nptl/tls.h (TLS_INIT_TP): Use NULL instead of 0. diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h index fb4a71a..171a745 100644 --- a/sysdeps/microblaze/nptl/tls.h +++ b/sysdeps/microblaze/nptl/tls.h @@ -59,14 +59,9 @@ typedef struct void *private; } tcbhead_t; -static inline void *__microblaze_get_thread_area (void) -{ - register void * volatile __microblaze_thread_area asm ("r21"); - return (void *) __microblaze_thread_area; -} - -# define READ_THREAD_POINTER() \ - ({ __microblaze_get_thread_area(); }) +#define READ_THREAD_POINTER() \ + ({ register void *__microblaze_thread_area asm ("r21"); \ + __microblaze_thread_area; }) /* This is the size of the initial TCB. */ # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)