From patchwork Thu Jul 21 15:01:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 651236 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 3rwH7Q2Kqxz9srZ for ; Fri, 22 Jul 2016 01:02:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=XTURH6ra; dkim-atps=neutral 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; q=dns; s= default; b=mQjvLGsNcNpEPkH3w9CzAxl1AFD/UvF52rm9JQLbH+mfYRgRCVVrn aHVMiGRI0JpjzEuc7qLvA9zKcF+7EGgMgpKa8ZP5nUtYQ+hmPX0WMUGE6Avi5qJ5 Z5+7HvXNw8/QChuUX+c6zGTANP3K2GzPBPg/yl9STI3a9RkrB/kZAk= 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; s=default; bh=w3H92Sh8F5j75Huv+vOXN1/qTGs=; b=XTURH6raMqzUvPeo/yXBq0tZ1+83 fyOQ3alFRCyVFBuYuaQQrZGPPWH3IEXWPgf3/fPA42wCubcLwgeLCDT7F7q/vozJ Eh2fQVhMHo6xJA9xHwqUm107AermRM6QWTEXOslAdInvPI7dLZr+iSdhfVp2W9tx uriEZXsLlYFoUvU= Received: (qmail 123842 invoked by alias); 21 Jul 2016 15:02:02 -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 123824 invoked by uid 89); 21 Jul 2016 15:02:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=2, 10, Hx-languages-length:1757 X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: Aurelien Jarno Subject: [PATCH] powerpc: fix ifunc-sel.h fix asm constraints and clobber list Date: Thu, 21 Jul 2016 17:01:39 +0200 Message-Id: <1469113299-11997-1-git-send-email-aurelien@aurel32.net> As pointer out on the mailing list, the inline assembly code in sysdeps/powerpc/ifunc-sel.h doesn't have a list of clobbered registers and used wrong constraints. This patch fixes that. I verified it doesn't introduce any change in the generated code. Changelog: * sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Add "11", "12", "cr0" to the clobber list. Use "i" constraint instead of "X". (ifunc_one): Add "12" to the clobber list. Use "i" constraint instead of "X". --- ChangeLog | 4 ++++ sysdeps/powerpc/ifunc-sel.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b18a8cd..035e4a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ * sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Replace beqlr instructions by beq instructions jumping to the end of the function. + * sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Add "11", "12", "cr0" to the + clobber list. Use "i" constraint instead of "X". + (ifunc_one): Add "12" to the clobber list. Use "i" constraint instead + of "X". 2016-07-21 Szabolcs Nagy diff --git a/sysdeps/powerpc/ifunc-sel.h b/sysdeps/powerpc/ifunc-sel.h index 79d110f..ac589bd 100644 --- a/sysdeps/powerpc/ifunc-sel.h +++ b/sysdeps/powerpc/ifunc-sel.h @@ -26,7 +26,8 @@ ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void)) "addi %0,%0,%4-1b@l\n\t" "2:" : "=r" (ret) - : "X" (&global), "X" (f1), "X" (f2), "X" (f3)); + : "i" (&global), "i" (f1), "i" (f2), "i" (f3) + : "11", "12", "cr0"); return ret; } @@ -41,7 +42,8 @@ ifunc_one (int (*f1) (void)) "addis %0,%0,%1-1b@ha\n\t" "addi %0,%0,%1-1b@l" : "=r" (ret) - : "X" (f1)); + : "i" (f1) + : "12"); return ret; } #endif