From patchwork Mon Aug 19 12:17:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 171611 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2938387ily; Mon, 19 Aug 2019 05:54:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3qS7Ngs1K1s1zgnLWdBIhuMYVymqmmUvJoFX14WMNuLykdBiek4xqPAOkHOk7YJ5DHFXW X-Received: by 2002:aed:3e6f:: with SMTP id m44mr20739290qtf.220.1566219296244; Mon, 19 Aug 2019 05:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566219296; cv=none; d=google.com; s=arc-20160816; b=JGD4CvsJV4EG3AL91iO5L+ttOXfdKAeUK/ajSB3nJNoAQaF7Y/3kptHFhxVWB3mDFE xEJbDelEEdrI5nzYTzqqvpDIB1douCtHiu7m+eJ+X2cMI5foJ6e5Ykyj4aUdDjwhqm5I WssymVauMjXGR9agJzQQjL3qMAwET2Gnv/t+woAZ3fbv/kZlTc4X4SjCGABmAIL1H4qN a4Wwoh35qqf5nztOgSoJaFUDGo2rt4V3WDeSVdi0iEVDrpSkbZycaPj1WaHXu0ZzC4YN yLAdb6Et7DisQ8HOhvQyavPGwAl8Gs3jKYA+LSGRpUGhW98ul6xgnQMvNFy67EonFh2X EyPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=5KWGpM2yFitmukAYRZPxrR2ZBIZTL/Or6P8Yp0GX2SU=; b=lsgc09Amqxfs2bdPB8TuFOCU2ig9QDOB3QdtE+XGVfPyeXr524ikSFpoFG4ZZd8JYT iKKApuWH+GKZQtfO3XnOgS61EW2rUQPgnadXvat5RhnPCVjaF/nrAsFQaPLKC/5TYWeq nnt7xTu1Oy2aZckVhZLOBiCHhmwQJ9B9G3cjdjXp9e1ady7yzRUrseIP6Vm1wSs0APyg Po7laKWzRqW4olhXEnCUkVJ/MPvEecdQjreUcm9PIR0LpAqYoy1wmZWI5IWdNN9nc6Gv Xn9cNg5x8YCH2t29EWG4ecpJmHfCH5zg2QHUtNf23t1tXs89WsXvSgR4ditlnK1zdmvl UPPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sSi+7gsK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g9si4198674qke.121.2019.08.19.05.54.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Aug 2019 05:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sSi+7gsK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzhBX-0005u0-Ic for patch@linaro.org; Mon, 19 Aug 2019 08:54:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37855) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hzgbG-000385-Iq for qemu-devel@nongnu.org; Mon, 19 Aug 2019 08:17:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hzgbE-0007Eb-CL for qemu-devel@nongnu.org; Mon, 19 Aug 2019 08:17:26 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hzgbE-0007B3-3o for qemu-devel@nongnu.org; Mon, 19 Aug 2019 08:17:24 -0400 Received: by mail-wr1-x42d.google.com with SMTP id t16so8481996wra.6 for ; Mon, 19 Aug 2019 05:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5KWGpM2yFitmukAYRZPxrR2ZBIZTL/Or6P8Yp0GX2SU=; b=sSi+7gsKqtKPpyTyOFyo8hmsuPAruLqIR+noqR8QEaYN4LSeq8GhoVlEfebZ77AHO6 NjI3W+comt9NigoZffxDP31PPok368ujseNULyvvy5GBKY5XH6rb4QCU5D9mDDJgIajc atEM07UgjUYlP0q5q0diPh6qI0QA+tNodGTaCe6JrxZc+tBeeMHvPjxG8ZHrsNqQ929O /jfl0Atn7C38oeIITbb6m6qwAm97+Wqpy0GyRkFkpv/E5ZGHrXiHd2htXex4Jb39Y5SJ K/r5GOo6R9MStPgt4AwlkzQfRgIxV9Wt8bSv5iXPTTKSZkxTNz5IMPeHW7QWgHqnakGy c9CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5KWGpM2yFitmukAYRZPxrR2ZBIZTL/Or6P8Yp0GX2SU=; b=BlFRJukn54fuAoFi0Oi4ytOou7uvUUv+5MEjUQkN30HR034eRZobUu3p3qgRcHkXzR xQvi9e+6pKWhaBtG8J45K3ZwRFyIVi5xQrTLK2RaQi7tqN2wRwsiBBr6R6zEt1L6lpjZ cFouFkyQld0z5Tyu3tmVHEN3x+TKLn7+D4Q6PJYr9OLembet0Gbdr92F2K6pvqAt5L84 vEa6yQpaV3KtXR2DHBzo9UW0Bo9mjAbWepd6dl4RCklcryOPp3l7Ma+H3TST0YDgm5j2 HDywVPmpaXKFTWfroViJ7aze1PtolxsEiRVaTn7Wejiev+kHUZLFjk0VYB+7HnTgPrR/ yEcw== X-Gm-Message-State: APjAAAUMvpGu6iYxTCN7FcII8Giv/51aPzzUDS1OQGQNgC4e6lR8sJd7 g1SM4o2GflVYyj20KOjOFjn0Tw== X-Received: by 2002:adf:d187:: with SMTP id v7mr17120942wrc.33.1566217038428; Mon, 19 Aug 2019 05:17:18 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t13sm15361389wrr.0.2019.08.19.05.17.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 05:17:15 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DE19B1FF9B; Mon, 19 Aug 2019 13:17:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Mon, 19 Aug 2019 13:17:08 +0100 Message-Id: <20190819121709.31597-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190819121709.31597-1-alex.bennee@linaro.org> References: <20190819121709.31597-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d Subject: [Qemu-devel] [PULL 11/12] target/riscv: rationalise softfloat includes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:RISC-V TCG CPUs" , Sagar Karandikar , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Palmer Dabbelt , Richard Henderson , qemu-devel@nongnu.org, Alistair Francis , Bastian Koppelmann , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We should avoid including the whole of softfloat headers in cpu.h and explicitly include it only where we will be calling softfloat functions. We can use the -types.h and -helpers.h in cpu.h for the few bits that are global. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Acked-by: Palmer Dabbelt -- 2.20.1 diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index f8d07bd20ad..6d52f97d7c3 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -27,6 +27,7 @@ #include "qemu/error-report.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "fpu/softfloat-helpers.h" /* RISC-V CPU definitions */ diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 0adb307f329..240b31e2ebb 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -22,7 +22,7 @@ #include "qom/cpu.h" #include "exec/cpu-defs.h" -#include "fpu/softfloat.h" +#include "fpu/softfloat-types.h" #define TCG_GUEST_DEFAULT_MO 0 diff --git a/target/riscv/fpu_helper.c b/target/riscv/fpu_helper.c index b4f818a6465..0b79562a690 100644 --- a/target/riscv/fpu_helper.c +++ b/target/riscv/fpu_helper.c @@ -21,6 +21,7 @@ #include "qemu/host-utils.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "fpu/softfloat.h" target_ulong riscv_cpu_get_fflags(CPURISCVState *env) {