From patchwork Sat May 25 02:20:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Programmingkid X-Patchwork-Id: 1105285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="psw/YEIU"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 459n821f25z9s1c for ; Sat, 25 May 2019 12:22:42 +1000 (AEST) Received: from localhost ([127.0.0.1]:34797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUMKV-0000UY-VH for incoming@patchwork.ozlabs.org; Fri, 24 May 2019 22:22:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUMJm-0000UP-H9 for qemu-devel@nongnu.org; Fri, 24 May 2019 22:21:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUMIW-0003aY-7G for qemu-devel@nongnu.org; Fri, 24 May 2019 22:20:37 -0400 Received: from mail-it1-x144.google.com ([2607:f8b0:4864:20::144]:56126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUMIW-0003aQ-32 for qemu-devel@nongnu.org; Fri, 24 May 2019 22:20:36 -0400 Received: by mail-it1-x144.google.com with SMTP id g24so11930317iti.5 for ; Fri, 24 May 2019 19:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FaLRym9qoHWfpYrSmaKpwioVaNz4Jc0X02F6oDD3AfA=; b=psw/YEIUWAcY3Qy/UhpzoNBfHrB3Ni6RHbFalO5pUpIVGHEwwv5D0wj1x2ssIUZLCJ wR4LoiOz3FA0S94XDgBEsByICzQUAhFEXhtIM2QZ5EArnpCo/VDZ3oZOUi61BvTp68qz cKkmsyPl54BbSMDa+63PLMvJsZ1dhYZUHAwM1GnkoVciVp74Yhs+9zEmYVq40ODhYekc MsO4IIyLfc/Z658wlY7O+NtEEhIHjzFd8TV33njUCmBXnc3DYGASYcOQVL7j6D1cjnQm lWjWPy/mL0shVGVS647KwR+4SagS3EBltR0sc0HbIu5fVuEi6NdKgGEX6GMb41ujwsyM KT5w== 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; bh=FaLRym9qoHWfpYrSmaKpwioVaNz4Jc0X02F6oDD3AfA=; b=Zr46ASW0qIz1EWrEwEsiZeJUbAIB7aGGNpOhuKGtO0jKqZH7+XVWoEc/CybuvYoY7x 8Ywj9P+d5jsMkWyQf9dk1FR77Bkr5YXpU4pzCAOuEiCadWTRFpJ2wClFlYafXfwZ9u5o jrCk31OiLV1W2M1554F9yTAOEJDBMtsVz5fr8fNcLJ4ohipNGLb1ctg+5M8XfTiW951O gPm1Fzc3KugIooQniejcsRJ4TKs+1fZMvdk7DtxOpB0S1fEzGhMhB5UJf4Onxw+t65cc WgnDsYiYIcTV70AKGE/g5NT3dQChiOcQ/D8e57x1NUqWVCelmzpwhX63Rz5EV415rX52 qC2w== X-Gm-Message-State: APjAAAUae/RIS/ELknfNPqK9jutI/7k+vwQujETjYz7ms6AuOTt49sKu 9bZb3aFVMULtaOfxNNCZEzE= X-Google-Smtp-Source: APXvYqzGVJH+lgHKnKSaOTInd/lNVS06orm9e4S0R25m05B1TFrYyU6zEgb5P8cb0W7xTzahc6+/qw== X-Received: by 2002:a24:81d4:: with SMTP id q203mr20127283itd.55.1558750835562; Fri, 24 May 2019 19:20:35 -0700 (PDT) Received: from localhost.localdomain (d14-69-20-184.try.wideopenwest.com. [69.14.184.20]) by smtp.gmail.com with ESMTPSA id p20sm1575524ioj.63.2019.05.24.19.20.34 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 24 May 2019 19:20:34 -0700 (PDT) From: John Arbuckle To: richard.henderson@linaro.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.orgd, david@gibson.dropbear.id.au, mark.cave-ayland@ilande.co.uk Date: Fri, 24 May 2019 22:20:08 -0400 Message-Id: <20190525022008.24788-3-programmingkidx@gmail.com> X-Mailer: git-send-email 2.14.3 (Apple Git-98) In-Reply-To: <20190525022008.24788-1-programmingkidx@gmail.com> References: <20190525022008.24788-1-programmingkidx@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::144 Subject: [Qemu-devel] [PATCH 2/2] Implement the PowerPC Floating Point Status and Control Register Fraction Rounded bit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Arbuckle Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: John Arbuckle --- target/ppc/fpu_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index 0b7308f539..0baf1ce8e4 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -630,6 +630,10 @@ static void do_float_check_status(CPUPPCState *env, uintptr_t raddr) env->fpscr &= ~(1 << FPSCR_FI); /* clear the FPSCR[FI] bit */ } + /* Set or clear the Fraction Rounded bit */ + env->fpscr = deposit32(env->fpscr, FPSCR_FR, 1, + (status & float_flag_rounded) != 0); + if (cs->exception_index == POWERPC_EXCP_PROGRAM && (env->error_code & POWERPC_EXCP_FP)) { /* Differred floating-point exception after target FPR update */