From patchwork Mon Oct 26 18:05:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 536136 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 B6897140DB4 for ; Tue, 27 Oct 2015 05:06:24 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=D1l4LL9V; 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:in-reply-to :references:in-reply-to:references; q=dns; s=default; b=Gbs6/dF1 lyH04wHzLgFo9TUDTADQ+xfdmSoIo9oLH3om2w6odFCy0EWdpWmqhKE7hoyNI/PY M9Y4O5n7GQE+15FrGfuQQEqXDs2SWBqpWkgy0yPuzcfDShU4PcIR36ksA65LWhaM yninjjkwdasFj7i03myBbDPMslqailzoT0Q= 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:in-reply-to:references; s=default; bh=gXVJcaOYT21wqg uXM3gbIUhNNic=; b=D1l4LL9VnGc/9cvNmYFPrVPHVaV+mVUklo99Kgak4gPool nnz9oPLoFo05WduyEkBapZQmBqlkfXo4HsdO7HuLOJi9E2FrUesZOcu/Win3JEZl CIXyGQ3wep/WZ+miCt68PQ8jT2RyVgJDk+oaudfn1GM6zan1EED9vxq/ggXEk= Received: (qmail 34824 invoked by alias); 26 Oct 2015 18:06:19 -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 34812 invoked by uid 89); 26 Oct 2015 18:06:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e24smtp05.br.ibm.com X-MailFrom: tuliom@linux.vnet.ibm.com X-RcptTo: libc-alpha@sourceware.org From: "Tulio Magno Quites Machado Filho" To: libc-alpha@sourceware.org Cc: joseph@codesourcery.com, munroesj@linux.vnet.ibm.com, meissner@linux.vnet.ibm.com, Ulrich.Weigand@de.ibm.com, dje.gcc@gmail.com, jakub@redhat.com, carlos@redhat.com Subject: [PATCH 1/2] soft-fp: Automatically create KF files from TF ones Date: Mon, 26 Oct 2015 16:05:16 -0200 Message-Id: <8e65d35c381c163cad808f089d8a94666aa0c2a6.1445882428.git.tuliom@linux.vnet.ibm.com> In-Reply-To: References: In-Reply-To: References: X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15102618-0033-0000-0000-000003C47ABA Use a sed script to automatically generate KF files based on their respective TF. 2015-10-26 Tulio Magno Quites Machado Filho Michael Meissner * soft-fp/Makefile: Generate KF files from TF. * soft-fp/.gitignore: Ignore auto-generated files. --- soft-fp/.gitignore | 1 + soft-fp/Makefile | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 soft-fp/.gitignore diff --git a/soft-fp/.gitignore b/soft-fp/.gitignore new file mode 100644 index 0000000..833e136 --- /dev/null +++ b/soft-fp/.gitignore @@ -0,0 +1 @@ +*kf*.c diff --git a/soft-fp/Makefile b/soft-fp/Makefile index 28f9f0c..e392b9d 100644 --- a/soft-fp/Makefile +++ b/soft-fp/Makefile @@ -37,4 +37,18 @@ gcc-quad-routines := negtf2 addtf3 subtf3 multf3 divtf3 eqtf2 \ fixunstfdi floatditf extendsftf2 trunctfsf2 extenddftf2 \ trunctfdf2 sqrttf2 floatunsitf floatunditf +# Auto-generate KF routines list, removing unused files. +gcc-kf-routines-auto := $(subst tf,kf,\ + $(filter-out sqrttf2,$(gcc-quad-routines))) + +generate-routines: $(addsuffix .c,$(gcc-kf-routines-auto)) + +clean: + -rm -f $(addsuffix .c,$(gcc-kf-routines-auto)) + include ../Rules + +.SECONDEXPANSION: +$(addsuffix .c,$(gcc-kf-routines-auto)): $$(subst kf,tf,$$@) + @sed -e 's/\(__[a-z]\+\)tf\([a-z0-9]*\)/\1kf\2/g' \ + -e 's/quad[.]h/quad-float128.h/g' $< > $@