From patchwork Tue Aug 13 12:49:45 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: 171195 Delivered-To: patch@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp866172ocp; Tue, 13 Aug 2019 05:59:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqymSms7F+ijbG/gBbZKJUmnw9IO/75/d+bFMGJaevAvZILiAxFy2DuiyuR+xcsmFq61LHTn X-Received: by 2002:ac8:4441:: with SMTP id m1mr14546940qtn.365.1565701171038; Tue, 13 Aug 2019 05:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565701171; cv=none; d=google.com; s=arc-20160816; b=UEKyqwmas4zs+4LFkm8jH/ga2z/BBR2g8xC4p/+xOHJ5syhoZeg/dHYrwPQCdAXnDe rMCXKQsfoaUoopoAFPn5IN6RWcul4kaEh8HEFL7noyBT/KPQotx4WWkYsJKjhJOqWEUf cdo4LR6dDGLneWNEwtc3dT7RST3r4v5UcJnKBsWFyx/zCq6TzA/yudZXUsk2MGl57DwN dND16SFRar/r2sCOrKg5E1TduD5AXLGJVzZd2HaeSICz7CtccaJvCisk/I4h3qhyma94 k/Jq77d5ELAMPSfaspS0nlsffRTK/r8McQqID9z8nYmiNoXP84HLDgrQtZ8qpvgdF5bQ UyXQ== 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=NhU5Jn6aRhUkVeAxdLRNRjvBS88J8AMxyLyTZHIDgUs=; b=W5JTd+xmnU//Ic3vbObRP/qX49+ouaMeMp1Z3ELUqe5cg5CM93G8vhfS8EECplERIP 5JBim4LIkSF/aBtRHtVMW2LBHyHzzn75OWPTlqQCZllqtloAOBD31V9J9speWUXW3hJq lxViS+zrw+Q8gEMus63tjCljf6gulg0yBZIr8LLqcyIWILEU726+K44PiLYSn/AHD7yo M1uUMIyFFkVF0nOPKtkISRyaXskamzkln3VH4BBt/XAnK17HZeO+tne5rlWYUoDlrm63 L9nN18V0VbJUpoAgodpG5m1WG3lBJOJHurr4nrEqUx3bx//cvWZmYo3fzxX60IK1/M95 gxtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=y34tfAgM; 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 t65si8802590qkb.255.2019.08.13.05.59.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 05:59:31 -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=y34tfAgM; 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]:52132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWOg-0001Ty-Li for patch@linaro.org; Tue, 13 Aug 2019 08:59:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54995) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWMK-0005bc-Fo for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxWMI-0006NA-HU for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:57:04 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:34673) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxWMH-0006Lm-Rr for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:57:01 -0400 Received: by mail-wm1-x344.google.com with SMTP id e8so1022654wme.1 for ; Tue, 13 Aug 2019 05:57:00 -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=NhU5Jn6aRhUkVeAxdLRNRjvBS88J8AMxyLyTZHIDgUs=; b=y34tfAgMEXrAcjHKNjsPdgKQTfH4+EMkXrl+0P4gcDAmKfiXmOEcpIcehyAwQiPxp/ WuWKU7QdLHUMGPAPruPWDyjNcmkDFubxKNhV3Tfug6SccpAEgZ2Cub3lCkKagPkTkBDE Oak67/25MeG626YoiU5eV93gat2u6JVg6RsyShIAHxSTQYIs72BRdRQ5zMH59SQyFVKA Y2U1gLfUW1KAhZYFBxrVR+l3EFUSk9mKGRBuNP5YV8K7i4wD8Xs185hCQ3lpgNwfQ48C D7js1P9qjLGmwyEUD3h/t/TAdPlRuVnfIcM4szBqjCBC/wwe1+B/QAbfnF6N5991mxER 2g9g== 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=NhU5Jn6aRhUkVeAxdLRNRjvBS88J8AMxyLyTZHIDgUs=; b=H8i6G4nFBjOODn7ezSuJYRyzp6iWD4ytLgA5tSJpBUPWaO6FhxhBZmxm5GeyEntqGH HaSoniplv4sELDWc+n68WwtoMU+e1ttUvcTR1CSKp1OlE2CgceCTg3a9GooXR4xeqUGb 3nAXKnq0ZrMjDJbe63oTJoUQWRCM8UpTYYh03U7BHTST5SfhxHfM1UTu2In2zO2rdqvQ Rn2AsWv7tLJmdulDcv1AtqnT4RNT19LwkUq3FiKQMxrBOKN3j3CXj5TH3bfHSI4nHtc0 xyMXIz06GQByalO4lHjXNQvHCxJDGHLzRhE674XZR9yeuR0T8NrH19NDJAKhkF3je6Z6 Zmvg== X-Gm-Message-State: APjAAAWRjtyr8KPuUrVzmtR6eIHMdJcc+z67hClSV74hKq2t2XcXr0lx tg9bR3vhlVdB5f9hXaf7xsgC8Q== X-Received: by 2002:a05:600c:207:: with SMTP id 7mr2950991wmi.146.1565701019569; Tue, 13 Aug 2019 05:56:59 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j15sm8296188wrn.70.2019.08.13.05.56.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 05:56:59 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 067901FF9B; Tue, 13 Aug 2019 13:49:48 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 13 Aug 2019 13:49:45 +0100 Message-Id: <20190813124946.25322-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190813124946.25322-1-alex.bennee@linaro.org> References: <20190813124946.25322-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::344 Subject: [Qemu-devel] [PATCH v3 12/13] 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 , Bastian Koppelmann , Palmer Dabbelt , Richard Henderson , armbru@redhat.com, Alistair Francis , =?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 --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 2 +- target/riscv/fpu_helper.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé 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) {