From patchwork Sun May 17 09:23:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553969 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1617A60D for ; Sun, 17 May 2020 09:25:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E02D9206D5 for ; Sun, 17 May 2020 09:25:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aFZ5Kha0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E02D9206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFXf-0005wk-3y for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:25:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWs-000444-8H for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:18 -0400 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:38323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWq-0001mg-LB for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:18 -0400 Received: by mail-lf1-x143.google.com with SMTP id 202so5375163lfe.5 for ; Sun, 17 May 2020 02:24:16 -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 :mime-version:content-transfer-encoding; bh=sYYgHAo2+EKZquY3ZxB7P+G7B9EmMHUqv6UWZNAADzw=; b=aFZ5Kha0rluHj2t+w/WQT9PzTODgiCSvwuuatMDL1Fi+NtLRaU6DImd/6iyQWELhlw v4GWSu+R8u0TQqDxnplt7FtOaHrdQW66GicL0AzWWtgzB5zdr/Iz8xIwFysisu2LpK91 djZ+8jpBorruUKkzxey2XegVUA0CSnV2Vg7FBt0221Adc4JqiwMExS3RMd52BB3W9WBs NJA3gGkAT6Tuv/4WhXWUJ3B4cMocTERRHBAvzS+rNJTHNz8dZQ6GueYzJLSvzJtJI0Zn 7hVm2cr5Xc8vIUaybjRKAX/BuJ8Y8CYSTYB7NFawHi7aFGrpCKKLz4LAYWPavoWEgMOM QhJA== 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=sYYgHAo2+EKZquY3ZxB7P+G7B9EmMHUqv6UWZNAADzw=; b=N7QFIYUu7zTs0g8J/gnlrgedDHzYzOSo8XgdgO4XI6E8Ea+Fj1z9W5qhLpfhnKlvEu FB34gBqncX+XNAEXT/FFrnW5/svTsh4XCLnC7uVNSrGSW36SzGEdNZZCdQur67vsQGtY B9cwDrj+fMFtGbzlustrcVHYq7+q1Ng4HCoKa6I294CnAI3ygdw8QwuAPalPBR3XMVBp xLviPGeulmtlVo6//3xxAa6pq451j3i2U5pv+Xxg6p76p4GjNzhHmFf5ZgTdC9HqJglN xlwxZtyYE0cnnDuLPiRg/VgZTI3u3PZVQFuEtndSv1sAHQLqDmOAAjQZcL/LTd5bBBx5 DCfg== X-Gm-Message-State: AOAM532GGPuGKSel0Ro7+sMPIbFeOzcDCQzte2GxAIFE8QrG0NrdNh7n Vo2jedKd8DFgoBVyJ+a3I1O+ny6l7Q4= X-Google-Smtp-Source: ABdhPJwXCPUp/JE79mpJyWxpG1VKsGGO9ShtbKc6XoHOjG0RhMdDhsOMTeIssCmoHAxkOWL+P7SKxQ== X-Received: by 2002:ac2:504c:: with SMTP id a12mr7940146lfm.110.1589707454798; Sun, 17 May 2020 02:24:14 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:14 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 01/19] target/mips: fpu: Demacro ADD. Date: Sun, 17 May 2020 11:23:39 +0200 Message-Id: <20200517092357.1469-2-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x143.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 5287c86c61..984f3f4dfb 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,12 +1208,48 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(add) FLOAT_BINOP(sub) FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP +uint64_t helper_float_add_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_add(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_add_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_add_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_add(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_add(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { From patchwork Sun May 17 09:23:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553977 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20CEA138A for ; Sun, 17 May 2020 09:26:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB3B1206D5 for ; Sun, 17 May 2020 09:26:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gncmjEyW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EB3B1206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFZ3-00011x-24 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWt-00044o-E6 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:19 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:46607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWr-0001mn-I8 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:19 -0400 Received: by mail-lj1-x242.google.com with SMTP id f18so6610410lja.13 for ; Sun, 17 May 2020 02:24:17 -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 :mime-version:content-transfer-encoding; bh=xJKvZWQFMn9VprRv2pADfNDp4/qI8q0H7WxNbnq8wtU=; b=gncmjEyWKQ2W6nHmJEJZ8jJB4dyZsVLL6hW13vX32OzwO3y6JwQpF4N8WaE0QsvQqt jtw1eZEcrjFi7k92EKcFbMg6O6zEUxOYdoZV5lR3nVZ4Wn8/VZPw+7FCz8lHbYTu4AGQ ARfnZimWh0CtmnRNTWntDJo6YwEaKGID6jsBwCfYAB0OGycqdCTYARI9ACqIpYKjqDG5 RaKUV5tCCsd+RQqSXWCObuX0tzoAuyhVpB0yRnRGLlroVJi9Cw8O/nHKbksXH+die94+ b8FhILx49XQYWWX3TLyyYHfFEQnMAk46H/inBaRuGks3WB1ImNI3GmfRtxIKtqxQ6Txo d+zA== 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=xJKvZWQFMn9VprRv2pADfNDp4/qI8q0H7WxNbnq8wtU=; b=tPM7OwfK/rBZPQRyKfE9BP4s6Dj/Wjc83blw8DeLu7FzxBXio4Ty1uYQkIE0yGHn2n kOHThR6BtknmWWl5oEDPOySeSbm8LiRd9xuOPq8MTfiRA9afDyidUjusVj2NUPI9KmY7 DhEqFwUtt6sytUj6nI/oXHKREmsOw3uHBTR10CzWJQi1tqt+FYVGqqdE36LssYNbkrrG YTRtk8SLWFSJoyfoHCLyIBkPV4EBaysg2rT7Wy/HZrhCxstWu546NHKtX6jz/JsDLSQN tYfLiJ/Y8zV+sPJIvRl02yW8QsBxaRGfBl8wc6kyYpLqeSQsTzzx8ZvDEZf3OG14sobm IeqQ== X-Gm-Message-State: AOAM532kDC/BU58SnePlPMpu1Wo7BrHrE9q8DQOPVa2G8IBYrP+7ak/1 GN6yrvfGadm85PwrYBdSQDmqEt/WXiY= X-Google-Smtp-Source: ABdhPJxLWt+pmDUveyw+nnOhEHJVkDzjoTeqlJOoAl2/eDarnOC3JUoJ4bYjsUrKnWK/tfjoZYPuYw== X-Received: by 2002:a2e:b5a2:: with SMTP id f2mr300987ljn.261.1589707455923; Sun, 17 May 2020 02:24:15 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:15 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 02/19] target/mips: fpu: Demacro SUB. Date: Sun, 17 May 2020 11:23:40 +0200 Message-Id: <20200517092357.1469-3-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::242; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x242.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 984f3f4dfb..715a872cae 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(sub) FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP @@ -1249,6 +1248,42 @@ uint64_t helper_float_add_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_sub_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_sub(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_sub_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_sub_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_sub(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_sub(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Sun May 17 09:23:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553975 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22B5D138A for ; Sun, 17 May 2020 09:26:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECEE2206D5 for ; Sun, 17 May 2020 09:26:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="olK3iMxe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECEE2206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFZ0-0000tn-54 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:26:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWv-00049W-Ul for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:21 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:45699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWu-0001nA-V9 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:21 -0400 Received: by mail-lj1-x241.google.com with SMTP id h4so6610468ljg.12 for ; Sun, 17 May 2020 02:24:20 -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 :mime-version:content-transfer-encoding; bh=Hp/YCDbUF4k/Qi0Hzps0dHG39YUDYzBviudtOCIRUBo=; b=olK3iMxe7Pm0BQxoTVzWbJZrfUOS/VT3+S+QElbcfIu5HN4EXlZzYAIij96TahAeWw qqYPlAFRMweJJ845I0sbRMQAkf7rmkVKbJrrD9bQDgvoXHgFPkwJUyQZO9vTfp91Aj/3 mYMazJgqeQKxveeCepsbzI5w9unWL1rBKck307hdiJkAkC5J4vE0xLf7L9IwRlEHZ7Iw t3pspr0BK9YiIr/zkvQ/iO72DmD1bJxTySCgkCJXSLEuyP8LcxuJuN8se/R/1XMtI2W/ iZP1rk3ZGHwUhloSZj0FZzNZ2aFNWBbhvp7Q8VkMUO/dUratyG5886QBwZU5caDFW9a/ nt2A== 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=Hp/YCDbUF4k/Qi0Hzps0dHG39YUDYzBviudtOCIRUBo=; b=n4NWKL/D2AULvqRs5o21eFDVddNPSYXYy04aHZW/Bv8KGgKg/E0olQycT+l31z7EEu V43yZqxOBgwtO7v+MRx78qyIvx/A5/Td3fJm/jbHaPuN99BWDJxXoUNqBdjurdocpeNW JtOo/+lZbTtuCrtRG6QIUY1lSuWZS6WXb7qzB1kV5kh0Xm3LmYVkbfvxOWkHl3N2gG6E dFQ7tm3P41rbkBbUbL5xvqO0jeAzX17Zw4mq9nMpPh4R1ZRGq0ot1v5ILiS498Y4Y/sL fdU726+wpMau5+TTDm5C81L9XpODxgk3LpWSFJ0Jn6txCC6XjxRqDRdJNMW0HvdNYNCK np/A== X-Gm-Message-State: AOAM533kmL4AREIBPoQ9Uxqk32A12yPzet6JfHi6A+hZLqwZoWBFUvcf l2rbtSQgeH75LDSXbYyDVaTDx69dEvw= X-Google-Smtp-Source: ABdhPJyhMH5/GgBWGHENNLibGqRC8AdvJU/W523TmFkVNi2lCO1b1r2ZN/h/nBpWHLLNlFwmAO+Kvw== X-Received: by 2002:a2e:2245:: with SMTP id i66mr7406781lji.191.1589707459274; Sun, 17 May 2020 02:24:19 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:18 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 03/19] target/mips: fpu: Demacro MUL. Date: Sun, 17 May 2020 11:23:41 +0200 Message-Id: <20200517092357.1469-4-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::241; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x241.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 715a872cae..449e945166 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(mul) FLOAT_BINOP(div) #undef FLOAT_BINOP @@ -1284,6 +1283,42 @@ uint64_t helper_float_sub_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_mul_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_mul(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_mul_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_mul_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Sun May 17 09:23:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C9A160D for ; Sun, 17 May 2020 09:27:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62AC2206D5 for ; Sun, 17 May 2020 09:27:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nKlABRnA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62AC2206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFaB-0003yl-JQ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:27:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWw-0004Ax-Lw for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:22 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:41125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWv-0001nE-Ub for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:22 -0400 Received: by mail-lj1-x241.google.com with SMTP id v16so2568850ljc.8 for ; Sun, 17 May 2020 02:24:21 -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 :mime-version:content-transfer-encoding; bh=u+u2GTLpTwv9NrMPHkakKvWn/ABYNzXl/Rjh49VH7qg=; b=nKlABRnAZA+xXDMVxH8qNeFknIo34x1KARIhU0JylHWIfIUl38oyNga1TtXoL/RmCb Zeu4gNzEbS/IhyhL/MMz8RAsmIG0J3//u2uN53QaeNnP0tz3EVkOmBOCpxvy5Yq4ZQ7P /ALfxH0TaPNolbRiBQvYwfOHDVXmlOg/VCO2wPg9WFl0LCSYtKjIRiHHtwK75wKhwX9m xBzkyFIXebrde+vJULUjyXFIkld8WmAFfxHF2iArRtPABI6UlXO/S6NWDDLJl1mEf+CD /pj7/8rnsvw+sgt1NMjwvo/yjSsU0QrOxQXzq0FfPzePqZnWOYlOwLwFBRlN8oAMQOpp kvYw== 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=u+u2GTLpTwv9NrMPHkakKvWn/ABYNzXl/Rjh49VH7qg=; b=omJCV+0NgpBW3uq8MTKef944WoFIDwn8r0kVHvNPbGMhxTdmdWZESDTEmV2aokE10k yE213G6xJoa2QwjINSxTyki//1JTJpkgnDG3ZyR7mr0d9mF1L6aeNJIgMa17YNg1tiIR lkSupbMt1EgTbdGfudwXTvMt0bhk5JUQsgpQjzJT6tm51wyjFh5E/LyC+Fppxb/tLFro RPzU+diHF/xqCv8rciF6XIe0FwwQILGpwa49kyQEn+zrTMeFFpUsJzpXoJCl1k2dy+gU Yblk+gcFdrsKQMYNuAr5fh9sx06GF1wvYpfRBteJgfs0NevJI6QSGCFgF0uX8QDjl5RU g8EQ== X-Gm-Message-State: AOAM5321Den/Zw46osZ7Cke5T3iHWC4v6AgnI7gyevtwW4+FI85dNB4O jTpOfEJSUW9a06jNApoJQUI7ufeq9/k= X-Google-Smtp-Source: ABdhPJzqt8IEByJ6TlRrpzuLtEtjH3L8Cx/COdG5RXtsLz3TJHW1z3KIkMhIsi+WWTSlKIRMbPkZUQ== X-Received: by 2002:a2e:88d8:: with SMTP id a24mr7257797ljk.224.1589707460334; Sun, 17 May 2020 02:24:20 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:19 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 04/19] target/mips: fpu: Demacro DIV. Date: Sun, 17 May 2020 11:23:42 +0200 Message-Id: <20200517092357.1469-5-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::241; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x241.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 449e945166..2759c9989d 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1208,7 +1208,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ return ((uint64_t)wth2 << 32) | wt2; \ } -FLOAT_BINOP(div) #undef FLOAT_BINOP uint64_t helper_float_add_d(CPUMIPSState *env, @@ -1319,6 +1318,42 @@ uint64_t helper_float_mul_ps(CPUMIPSState *env, return ((uint64_t)wth2 << 32) | wtl2; } +uint64_t helper_float_div_d(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint64_t dt2; + + dt2 = float64_div(fdt0, fdt1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return dt2; +} + +uint32_t helper_float_div_s(CPUMIPSState *env, + uint32_t fst0, uint32_t fst1) +{ + uint32_t wt2; + + wt2 = float32_div(fst0, fst1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return wt2; +} + +uint64_t helper_float_div_ps(CPUMIPSState *env, + uint64_t fdt0, uint64_t fdt1) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t wtl2; + uint32_t wth2; + + wtl2 = float32_div(fstl0, fstl1, &env->active_fpu.fp_status); + wth2 = float32_div(fsth0, fsth1, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return ((uint64_t)wth2 << 32) | wtl2; +} + /* MIPS specific binary operations */ uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) From patchwork Sun May 17 09:23:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17816138A for ; Sun, 17 May 2020 09:25:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2BD5206D5 for ; Sun, 17 May 2020 09:25:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a/iTsoQ3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2BD5206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:52812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFXj-0006Bt-WD for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:25:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWx-0004Cj-N0 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:23 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:36821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWx-0001nQ-04 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:23 -0400 Received: by mail-lj1-x242.google.com with SMTP id u15so6644888ljd.3 for ; Sun, 17 May 2020 02:24:22 -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 :mime-version:content-transfer-encoding; bh=U9Bvm6vL09AIwqK4OvW6xKwpQP6QGlp9aoqhYUD54/M=; b=a/iTsoQ3osCKtLaIrmnQAjdz3Fy139XyJHIazlzjJo9m04dKuei24Hw7JXO6vVxHqN 43FPeCmlP9IJ9svEzJRSu6ulxqR3ACIAzJ/p15KI/qMDAeruv2ieReRk/en4H2wTcsiS R7cSK8OfSq1k3YK00tXbfM9rs+yRrXzKwXWqyNx4S44NyY4N9iV+Un8rVWTAF4cuuykZ dHZRFVg8lNs2Edfrz94zN3oYUeA7Ryi3YNs0SoJVUcTdIKo/Cw0IJ1Mvor7RoMqjLInY f0nGMKVisKLKh7LQ0pgUi4cp+sseGfzw4BDoUM6MjTfjjQxmX4QxiqwlnlRqmjDajRET 73yA== 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=U9Bvm6vL09AIwqK4OvW6xKwpQP6QGlp9aoqhYUD54/M=; b=WSIA7zoXEipMWcOTB/hGvoet8Uqdr+jlApHXInkPj+zNiT6UNZgGxcjgqOXq5HC5wC l5vfRloL2nEtwxxZGiIHlon5HcUYgwh2ZSA3qKpJmT/5ETXqYVIHP+EyKAhnmMZFfVju nPOBbwQo5mV8K+6QZGXjVQDCYTETvuNVdJ/7f8Fub/NwlLIWs6js0i988XW09pEr/ruz w/jM7/Dken3JqQCNsnqyBdbc3DBPbOh+ELV2W5X65iC+p1wOUlRVdHPP+dr7mosvkDPO t8RYPH7vrpl/397DLoUTrn02YHY06j/0WnW38f/ixS/Wtpa+nliHfv7HTRZrG26MkrUd 0EVQ== X-Gm-Message-State: AOAM5304dV27gwbYihfwJBhCrhY16ph+6Q4SLybXzLqymKY5AoQLhrxc MvBDjErW58g08JrI6KYBpip7sbhfzN8= X-Google-Smtp-Source: ABdhPJwH7b2htsmdwOnEDBucwXd2HncwrXl0W+YxI2mhyhIddDTMrWowX/+owAyh3q9l3KR8LcJQlw== X-Received: by 2002:a2e:a211:: with SMTP id h17mr7548902ljm.289.1589707461380; Sun, 17 May 2020 02:24:21 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:21 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 05/19] target/mips: fpu: Remove now unused macro FLOAT_BINOP Date: Sun, 17 May 2020 11:23:43 +0200 Message-Id: <20200517092357.1469-6-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::242; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x242.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 2759c9989d..a3a39681f8 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1170,45 +1170,6 @@ FLOAT_CLASS(class_d, 64) #undef FLOAT_CLASS /* binary operations */ -#define FLOAT_BINOP(name) \ -uint64_t helper_float_ ## name ## _d(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1) \ -{ \ - uint64_t dt2; \ - \ - dt2 = float64_ ## name(fdt0, fdt1, &env->active_fpu.fp_status);\ - update_fcr31(env, GETPC()); \ - return dt2; \ -} \ - \ -uint32_t helper_float_ ## name ## _s(CPUMIPSState *env, \ - uint32_t fst0, uint32_t fst1) \ -{ \ - uint32_t wt2; \ - \ - wt2 = float32_ ## name(fst0, fst1, &env->active_fpu.fp_status);\ - update_fcr31(env, GETPC()); \ - return wt2; \ -} \ - \ -uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ - uint64_t fdt0, \ - uint64_t fdt1) \ -{ \ - uint32_t fst0 = fdt0 & 0XFFFFFFFF; \ - uint32_t fsth0 = fdt0 >> 32; \ - uint32_t fst1 = fdt1 & 0XFFFFFFFF; \ - uint32_t fsth1 = fdt1 >> 32; \ - uint32_t wt2; \ - uint32_t wth2; \ - \ - wt2 = float32_ ## name(fst0, fst1, &env->active_fpu.fp_status); \ - wth2 = float32_ ## name(fsth0, fsth1, &env->active_fpu.fp_status); \ - update_fcr31(env, GETPC()); \ - return ((uint64_t)wth2 << 32) | wt2; \ -} - -#undef FLOAT_BINOP uint64_t helper_float_add_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) From patchwork Sun May 17 09:23:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553985 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C93F138A for ; Sun, 17 May 2020 09:27:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20E78206D5 for ; Sun, 17 May 2020 09:27:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UW6WBM1x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20E78206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFaE-00045k-B6 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:27:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFWz-0004FM-UX for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:25 -0400 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]:41305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWy-0001nY-2y for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:24 -0400 Received: by mail-lf1-x141.google.com with SMTP id a9so5383338lfb.8 for ; Sun, 17 May 2020 02:24:23 -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 :mime-version:content-transfer-encoding; bh=NfiyJnH8f+NZGQdRmwsMGxjYlt1H1kJMr2qydSKKkTI=; b=UW6WBM1xI/Lad/dFGXYMAu0d0udbIRMrH+qpV0K2mvpdSNISl+UuJ8epyzkVBLhs11 tLYktQoiYLTHnbH+A0rwgEM7aXK4WRkSVzS0omymUW9R6i6dZeQEnEdoyD46Xz+O6xB5 DW6OItU6vHpJ4Tzt9KBUcvnLv0DeZ6ZZNN3cPGPKbfa2mW4Oadb0dfaSc1Pn4OnSxvEl GPu+eWh+BQOvKcpKCwYH2oQ1DcdYMunzd0ORuWyG/qvgyj4eFKpoXcBD8DX5POXBVB7G kyu40KH/tWO0UFFFZccrHDnCA4kwQoUu02PL+K8W7fJZXGRLRRXt4fXqzN9fQnvnya1O JaKQ== 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=NfiyJnH8f+NZGQdRmwsMGxjYlt1H1kJMr2qydSKKkTI=; b=jNs7ylC14qPxajC2Dvq9JfykWm/s72N8R8s1wNAIyXlydhrpoAi3nEzAtmhnag2/m7 uJAmASmV6q9BXoWfvR8Gj8WW01l8CKFRwKx5yBuBMvOlqJz/HDNsixFX1aUD3DU9xP/6 DaRj11ifLTIOLIjcQ1hE1ZUFxrtmyyH3ZzcXQcEdEgG6i5H82Ww/gBlhzffVEWJEbPpw a5j4ipplh+oSxfpGA5I0lFa62HpDyj5gYOhmwdiFDlZPOeLJebw+Y7jd9gQPJoKG9s96 /StHRvefoI0hACVT78L8UxPv4455VwynZUWvcPO0ALNxbLdPRA/er1a+TLeLcqnQEl8X tpPQ== X-Gm-Message-State: AOAM530zzNAISGcMN41w0/UvBXFLAhh1N1eOBaU+schTyp2uyS4YpEYU oBU1o7UjwC7uRUbc+f2sk3DwrTITDF8= X-Google-Smtp-Source: ABdhPJyNA/YCze94cZER9bh9PSKjT27sgcv2mXhQgJFfYxwvGjglp9OtLg6gPBHNR1QoeqQYeGjrcQ== X-Received: by 2002:a19:8c11:: with SMTP id o17mr7826797lfd.173.1589707462407; Sun, 17 May 2020 02:24:22 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:22 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 06/19] target/mips: fpu: Demacro MADD. Date: Sun, 17 May 2020 11:23:44 +0200 Message-Id: <20200517092357.1469-7-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::141; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x141.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index a3a39681f8..c070081cbc 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,12 +1495,51 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(madd, 0) FLOAT_FMA(msub, float_muladd_negate_c) FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA +uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_madd_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ uint ## bits ## _t fs, \ From patchwork Sun May 17 09:23:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553989 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E89EB138A for ; Sun, 17 May 2020 09:29:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE0F5206D5 for ; Sun, 17 May 2020 09:29:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i8DJFbzW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE0F5206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFbR-0006pI-WF for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:29:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX2-0004HG-47 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:28 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:45702) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFWz-0001nj-Mv for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:26 -0400 Received: by mail-lj1-x244.google.com with SMTP id h4so6610543ljg.12 for ; Sun, 17 May 2020 02:24:24 -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 :mime-version:content-transfer-encoding; bh=cbkkh7kOu27EfvNkT8gehafOtZOmXDYce6iol7ZHVX4=; b=i8DJFbzWxrrn+lIh+75LhT6KJzXlapoP33MNXxC4a0QJUN7xmu9/vvidVDC/X1WGsv B1ZLLoFLMeeNkGeg860MRovf30+WbH1iWSnqSC+NETCWwcuqtjIafuElQ5vt/FFEnTUM gsK6j7yzF7PHJNY0KJi+UjQxcpvvYxvnyOAr+uf4KxdbkLFYnb+fX/s0eJfwFZZPQkJB aidSCCczDsQhr4+mKPdD5VX6JsD+U2NYK67uCRIJmLzJSzXC5CBcb7BD1tMGisfDBCW0 w5UYUW5sBEUhWv1HvIt/MJSmsMaIiWpcg0QcfMM179UtOWYvlyJRl6RR7fEk9vqGpDuB MTOA== 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=cbkkh7kOu27EfvNkT8gehafOtZOmXDYce6iol7ZHVX4=; b=OxjQhi34QTAzQgvRK5vssvSLmjbAHyXz3vmlnacSrAI1qLRGf8YNedgUNVoQy7h6l6 KS5Gpw4bkLQZ7Aaqg5PFH5N6GqBExfvCxjMc+ZpUzlTuX0nzkYwQIhX2Ed/ginyV4RK7 zjiLYi2GZAuUQEruK/mQID2zKgobFFjxVHE+mjXdRQjRZlvqgBITjNDR5UVcZWg+R7g5 FnkWtdjEFcIoPAXC92neCAi9R4ulxE/aMLccdXmvTodOTa36RD8Ucfu9+Oq+ftVjFYY9 /WksBxqcFkx1UeLA4es41RpOY6MB5FUtG3jzqwTCgUIMWz1Mh++0P25WuCgUVVNa1Ker BynQ== X-Gm-Message-State: AOAM5318N84YTmiBJpZfMWUwcxa85UNDXqxOZTkcz7O3NyTQXkXh3EiZ 6YzqdNH0MjhuTuOMsT7BU04p5H/F4vA= X-Google-Smtp-Source: ABdhPJye3hqu1UBcgzyTZ7jKrKMefGQGUlJuUBLay8ePFbPuy2De22YikekYl1jsSTHqIc2elkbMQw== X-Received: by 2002:a2e:2ac6:: with SMTP id q189mr7418390ljq.221.1589707463461; Sun, 17 May 2020 02:24:23 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:23 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 07/19] target/mips: fpu: Demacro MSUB. Date: Sun, 17 May 2020 11:23:45 +0200 Message-Id: <20200517092357.1469-8-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x244.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index c070081cbc..e37fc4075d 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(msub, float_muladd_negate_c) FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA @@ -1539,6 +1538,45 @@ uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_msub_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_msub_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Sun May 17 09:23:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DEDB713B4 for ; Sun, 17 May 2020 09:30:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71543206D4 for ; Sun, 17 May 2020 09:30:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iZlXRLKe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71543206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFct-0000D1-Hs for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:30:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX2-0004He-Ci for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:29 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:39088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX0-0001np-70 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:27 -0400 Received: by mail-lj1-x243.google.com with SMTP id u6so6628994ljl.6 for ; Sun, 17 May 2020 02:24:25 -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 :mime-version:content-transfer-encoding; bh=aVn12E0T5JzktEFTA5pyhzwavRrRDjMRjIN9w81ZdKk=; b=iZlXRLKe4HSRPzC++hqpgSTs8NZn6BE4ObcFSMOp6tkp5hTLCX1l+DMVtyy5kMEH4r YAh2DXVEmarlQtdv7a/UDc2QI3crENnt3XnMccRcJY4Yfdk+Xwpzz6PTVc/7SJivEyEM mebtbWud7QKwhcSAA1n4CPYHQDbMXOXYll8itOkJFUwu1TQAldZlTQPxuLqk6mwCHnam Mpihdgr2tQo/lguKiJFT6AohtWeQFj6hBbrAinsMI8vj/DkMfBd8x4N6hZbNcKa3Utwm A3oj8D4wohA1XrSyZU7sCsN2+l4WZsL4Qbbr3iMUlXDT9ZiF8Fl44LXll80L5xZpEP6z LTZQ== 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=aVn12E0T5JzktEFTA5pyhzwavRrRDjMRjIN9w81ZdKk=; b=RJqIrFV1e1g+DERV+qSeJNUV+KgbsYrHhO3pf/CCmSCDJSaIFDcQldNfcSvw71GYf9 O0LhC/ZUZs7N30Dx2zDT2RAHVA0vjTBdWrdAMayPaD3gPQpJJkJ2eNp0jqWljEPUu1nV v8/v3B25JFll2NPrMgsTbouvKgl1DwWh3RfcjcCnFrB2/mmPbCC+715rOim1wxOAKxF9 T2RAYBGmiJYhDuSBmrXL0levbO0itiNoYySdyVBkweSWG7FMQz3YiF4DdqWzWI3amcmE W2icp012wbLI+3BRaMK/xtpr/ezYnZXvT8sk2YIQJjUjgm3P3UQvaNi9K0OS65btSRr5 9ZHw== X-Gm-Message-State: AOAM532zRBYALymB04Hwnd/P1cslwAp57c0Z8PXrdYGHBJm2mrcJTOAK f/0Vov0khrEb+J0iajrkjogICl/FqTI= X-Google-Smtp-Source: ABdhPJzYNJSi5SRXTeeRmvztdG3k4Wa2HADnwXMc3z3vgDzQzTug6M2q8CcL6yHA3wYA795CZ2kliw== X-Received: by 2002:a2e:3e09:: with SMTP id l9mr546172lja.260.1589707464489; Sun, 17 May 2020 02:24:24 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:24 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 08/19] target/mips: fpu: Demacro NMADD. Date: Sun, 17 May 2020 11:23:46 +0200 Message-Id: <20200517092357.1469-9-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x243.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e37fc4075d..d4c065f281 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(nmadd, float_muladd_negate_result) FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA @@ -1577,6 +1576,49 @@ uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_nmadd_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float64_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_nmadd_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float32_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); + fstl0 = float32_chs(fstl0); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); + fsth0 = float32_chs(fsth0); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Sun May 17 09:23:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553973 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1BF27138A for ; Sun, 17 May 2020 09:25:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E7074206D5 for ; Sun, 17 May 2020 09:25:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dXC97yCb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7074206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:53130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFXn-0006Mx-21 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:25:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX4-0004Iq-2o for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:30 -0400 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]:39857) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX1-0001nx-SD for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:28 -0400 Received: by mail-lf1-x141.google.com with SMTP id h26so5388624lfg.6 for ; Sun, 17 May 2020 02:24:26 -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 :mime-version:content-transfer-encoding; bh=meiIJB+AmHAaVbmDxwspWHGXDAbXPn2CTH6+8Q6LmGo=; b=dXC97yCb9cqecgK6cfGveCUZ1sVAU9FxYGDCEvXt4gRdqav7wFrNl3xsHjtjSC+zOJ GVkcchtecp3akC7wXOevvv2fSgpFk/jAgG5/04fANC9aeOuDcosiQQV4GMWMXcRqiTxC Pug7XHR8YrThhk8qvj7KUIhXqZ3KbVTzQyDs+TlvUl4akaR0A2JHIeUvk0JwsKsD1xqU zV94DJfImaIq3+MoEW5+5RJATaA2S2Jw/s6FbRsuKw+OIRWnNsI1sx2EmZQaQ1J/lvu9 Rf/sNC9qi3DiX5+Cz9EUGV/ceWoI8cYSa+t3cWvI8RguzKHcfnMdDU1toGswQWRPiyR0 Oe5Q== 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=meiIJB+AmHAaVbmDxwspWHGXDAbXPn2CTH6+8Q6LmGo=; b=DqNVe6hUFHsKJYPK9H3lgJ0GO5qYPBr2vrcHYc5GLNzMZ0dAR0X168Vn6hCJ2Z0/LY JghWpG6PHsgKH/HWTEBw17FjFnBJBHtvMb0piYdaYMOROvNEMiYeeQnhHNalXJzDxytr J/ECrE1aKXQPDKN1bYlztp/Yf6TjjlzKLnRyPtR3+6qAUygq5nfwTNF3BnCKsBu4ttxR 8TvYbMVl+3txkKuZ9xFdK5pBq6Dw025zDYBPC4Xmiw44gKeem7a8nKZZh6DvkwRysjIr C12MNRYNSAeqEP5LeX9jZvtk5IWf+22FjBAXeVCdlBLyzE57z9blSutdQycgLDdK46YS qHHA== X-Gm-Message-State: AOAM531g7WrpPeyRZJi5NS6k/byjO3ZLZ62/ILRymTahM79HYvyYPTnv qGCBWPY02HW82yT0H9rQL89R9tedygw= X-Google-Smtp-Source: ABdhPJwW5YmSxeaGoceTSkkmUPfKcdht0Vbe1mj8+MyKX9wKl2//mL356SJ5f4Ge2XRpsoYiQHvNpw== X-Received: by 2002:a05:6512:20d:: with SMTP id a13mr4366764lfo.36.1589707465498; Sun, 17 May 2020 02:24:25 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:25 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 09/19] target/mips: fpu: Demacro NMSUB. Date: Sun, 17 May 2020 11:23:47 +0200 Message-Id: <20200517092357.1469-10-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::141; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x141.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index d4c065f281..927bac24ac 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1495,7 +1495,6 @@ uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ update_fcr31(env, GETPC()); \ return ((uint64_t)fsth0 << 32) | fst0; \ } -FLOAT_FMA(nmsub, float_muladd_negate_result | float_muladd_negate_c) #undef FLOAT_FMA uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, @@ -1619,6 +1618,49 @@ uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, return ((uint64_t)fsth0 << 32) | fstl0; } +uint64_t helper_float_nmsub_d(CPUMIPSState *env, uint64_t fst0, + uint64_t fst1, uint64_t fst2) +{ + fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float64_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint32_t helper_float_nmsub_s(CPUMIPSState *env, uint32_t fst0, + uint32_t fst1, uint32_t fst2) +{ + fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); + fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); + fst0 = float32_chs(fst0); + + update_fcr31(env, GETPC()); + return fst0; +} + +uint64_t helper_float_nmsub_ps(CPUMIPSState *env, uint64_t fdt0, + uint64_t fdt1, uint64_t fdt2) +{ + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; + uint32_t fsth0 = fdt0 >> 32; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; + uint32_t fsth1 = fdt1 >> 32; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; + uint32_t fsth2 = fdt2 >> 32; + + fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); + fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); + fstl0 = float32_chs(fstl0); + fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); + fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); + fsth0 = float32_chs(fsth0); + + update_fcr31(env, GETPC()); + return ((uint64_t)fsth0 << 32) | fstl0; +} + #define FLOAT_FMADDSUB(name, bits, muladd_arg) \ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ From patchwork Sun May 17 09:23:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553997 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1DC4D13B4 for ; Sun, 17 May 2020 09:32:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E802F206D5 for ; Sun, 17 May 2020 09:32:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j+alKDpR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E802F206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFeX-0001y2-5V for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:32:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX4-0004JG-8T for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:30 -0400 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]:46345) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX2-0001o3-6j for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:29 -0400 Received: by mail-lf1-x143.google.com with SMTP id v5so5345915lfp.13 for ; Sun, 17 May 2020 02:24:27 -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 :mime-version:content-transfer-encoding; bh=LEEebxVW8gD5Jf3WtTY6qNXWnlQDM14seyCqM6owgfg=; b=j+alKDpRKwnz1FeH9q/q9/WZ+XnHzKdxThKLpLMyt7hflckTGDZ/hb3nbEKvk7pG6v iL4JlVcjR3Whtu4bFdRGQNbVhB5RdfZlZeI+qD6IuuOpqth2ul2+Gt2YEIe7kH1AuUcy iljIpYYmmPE+XLT6QILV9vZGEkKkGdocKXMWVgqmMcb3hGtikEB4Ba/F2xoSb919dVUP BIotFks2glCS1MuCQ4dU3J3WGzSMZ9585KQHvP7jmwek8Bh4CUOHVdcTfsYQlwkHsgrx 1gpqPgAKCOsvWYLZvVRlE59mnM6BTZauVtFgTyv1reKw0Pm/61LOoVksiUkMlULM2rmG gNcQ== 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=LEEebxVW8gD5Jf3WtTY6qNXWnlQDM14seyCqM6owgfg=; b=je0eRpd2g//tKvxGquJnxHiCZwf1B+bPOWV4CWEUDyUaoQA0LJxWyqEV/f+RnAvJtR dl+YEeGIklN8YjNdCw9DVo98BDc8CZLTcI6Ty8slYaH6PN6iLCboPdbLxCLvTeLrseHk l5NlPst0BZ81kmUZz0mKlHz6CbYf6e+8yZjUn5AY/aiAg1vXvucmF2qNa7ZAQRZoHd09 5ibRYfvr9u0OHp3OpYrKEBK7lwJpxSv9UeB2raRSLH+SkNa5Gt9dY3P4v2WwJ2dJ506/ S5nFubUR4iQ37FSYWrpO34ujrMSZAsj4E5GgQjMRm8sDQ/phXht8dKwb+R7fhePtOFsw +atw== X-Gm-Message-State: AOAM531nuPhMcXGatbJ2ZnPN1i68jxylupeiNt9t0EWPGcWxBAjxrrBU fg15Axj7FFG9Ilf9ANyolYZ3tiZ9IMo= X-Google-Smtp-Source: ABdhPJybN+xKYOaY5c0v2aoPFuPuiGj599f0ilLLKb4Ir71wXTmeBKsbJwZ4QFigpVIX5hglbdM+rg== X-Received: by 2002:a19:4854:: with SMTP id v81mr3578192lfa.189.1589707466651; Sun, 17 May 2020 02:24:26 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:26 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 10/19] target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros Date: Sun, 17 May 2020 11:23:48 +0200 Message-Id: <20200517092357.1469-11-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::143; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x143.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing ., these macros are not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 50 ---------------------------------------- 1 file changed, 50 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 927bac24ac..e8e50e4bc0 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1446,56 +1446,6 @@ FLOAT_MINMAX(mina_d, 64, minnummag) #undef FLOAT_MINMAX /* ternary operations */ -#define UNFUSED_FMA(prefix, a, b, c, flags) \ -{ \ - a = prefix##_mul(a, b, &env->active_fpu.fp_status); \ - if ((flags) & float_muladd_negate_c) { \ - a = prefix##_sub(a, c, &env->active_fpu.fp_status); \ - } else { \ - a = prefix##_add(a, c, &env->active_fpu.fp_status); \ - } \ - if ((flags) & float_muladd_negate_result) { \ - a = prefix##_chs(a); \ - } \ -} - -/* FMA based operations */ -#define FLOAT_FMA(name, type) \ -uint64_t helper_float_ ## name ## _d(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1, \ - uint64_t fdt2) \ -{ \ - UNFUSED_FMA(float64, fdt0, fdt1, fdt2, type); \ - update_fcr31(env, GETPC()); \ - return fdt0; \ -} \ - \ -uint32_t helper_float_ ## name ## _s(CPUMIPSState *env, \ - uint32_t fst0, uint32_t fst1, \ - uint32_t fst2) \ -{ \ - UNFUSED_FMA(float32, fst0, fst1, fst2, type); \ - update_fcr31(env, GETPC()); \ - return fst0; \ -} \ - \ -uint64_t helper_float_ ## name ## _ps(CPUMIPSState *env, \ - uint64_t fdt0, uint64_t fdt1, \ - uint64_t fdt2) \ -{ \ - uint32_t fst0 = fdt0 & 0XFFFFFFFF; \ - uint32_t fsth0 = fdt0 >> 32; \ - uint32_t fst1 = fdt1 & 0XFFFFFFFF; \ - uint32_t fsth1 = fdt1 >> 32; \ - uint32_t fst2 = fdt2 & 0XFFFFFFFF; \ - uint32_t fsth2 = fdt2 >> 32; \ - \ - UNFUSED_FMA(float32, fst0, fst1, fst2, type); \ - UNFUSED_FMA(float32, fsth0, fsth1, fsth2, type); \ - update_fcr31(env, GETPC()); \ - return ((uint64_t)fsth0 << 32) | fst0; \ -} -#undef FLOAT_FMA uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, uint64_t fst1, uint64_t fst2) From patchwork Sun May 17 09:23:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36DAB157C for ; Sun, 17 May 2020 09:26:42 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DFCC206D5 for ; Sun, 17 May 2020 09:26:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rvdh5uon" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DFCC206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFZA-0001LM-VG for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX5-0004MU-J1 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:31 -0400 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]:41988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX3-0001oE-WA for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:30 -0400 Received: by mail-lf1-x144.google.com with SMTP id x27so5260795lfg.9 for ; Sun, 17 May 2020 02:24:28 -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 :mime-version:content-transfer-encoding; bh=w2OdNVDRCHhqd+l8vRPrEWsQJ/Qc25fF1W1YvWmwiFQ=; b=Rvdh5uonvoKn6GA6sgk/VNrVkz9cvNjdYjToDKXlDZHPZGJV+o15xEp2P0ax9nPcVx h4DVjBxlZc6JkrmAdZcjgy0uS2E9a0BHnPiZxdT7uThv1xJj9I8GCeWfQ0gLmV12VfgF aB2wZ0HIfBDFUzuxbc0p1ihqBXUNIr2Tg55HAH5Fl3MpqAoYGkPdRHFgrvjwIyNtVf1V 7FC0HJ4+RdRSJENzjUJxiWVDswtJ7xQUkoxMyZm4469301y360rizwt2OBLOxavvdRJP cSEMXaGV/Xik4ChP63bojBZwesogqHbRL9oZzgcJtC0vlMUOhI3JR/gj1wgEWanY9HTT NOIA== 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=w2OdNVDRCHhqd+l8vRPrEWsQJ/Qc25fF1W1YvWmwiFQ=; b=KCqGRmDGjql7IghEU8I145e6C/fMhWAFdKSmeyzbyiKccyYunsmSJMze/ajkdudX1j DUMhn9KqS3gAnzun+p7/NCRBFdumZvFKVdC5TbnZhhOGyYd5Y6FaqsKdo2xNmffJs2ky DCEGAaOyf1DrUnLEe6qLZm9pFAsFgnz02Km3J1Wuk0+8IAdQRLbij9D7joaBF75oYm84 3DrUl+493uc9miyoU37P9UkoZrrwKSBNxqzjDLPc9r943rU4X43iMV+GFL0m5976NJo7 GCWQpp2iq9a8syvliEeUFLUWg+MT/NimAITSkZeLJW7VVXNwtUQCj3AuOQDb1hQHWvGw xZLg== X-Gm-Message-State: AOAM530NQZzlTQwZ/0+8j1EsQU2jDsSREnLcn6CP9xZQieRje1h/c5wT LyQM5R2aibru2j7sYJkbyzWQ/XHBRuk= X-Google-Smtp-Source: ABdhPJxErLD50h6f+RcOrwN/wuJWlzI2b8Xame3UM8lo/EonhGbfmMDx5naMLDQDcJ5L4Jw6dVVPIA== X-Received: by 2002:a05:6512:14c:: with SMTP id m12mr8066580lfo.165.1589707467678; Sun, 17 May 2020 02:24:27 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:27 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 11/19] target/mips: fpu: Demacro CLASS. Date: Sun, 17 May 2020 11:23:49 +0200 Message-Id: <20200517092357.1469-12-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::144; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x144.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 70 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e8e50e4bc0..b3903f5357 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1165,10 +1165,76 @@ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ return float_ ## name(arg, &env->active_fpu.fp_status); \ } -FLOAT_CLASS(class_s, 32) -FLOAT_CLASS(class_d, 64) #undef FLOAT_CLASS +uint64_t float_class_d(uint64_t arg, float_status *status) +{ + if (float64_is_signaling_nan(arg, status)) { + return FLOAT_CLASS_SIGNALING_NAN; + } else if (float64_is_quiet_nan(arg, status)) { + return FLOAT_CLASS_QUIET_NAN; + } else if (float64_is_neg(arg)) { + if (float64_is_infinity(arg)) { + return FLOAT_CLASS_NEGATIVE_INFINITY; + } else if (float64_is_zero(arg)) { + return FLOAT_CLASS_NEGATIVE_ZERO; + } else if (float64_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_NEGATIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_NEGATIVE_NORMAL; + } + } else { + if (float64_is_infinity(arg)) { + return FLOAT_CLASS_POSITIVE_INFINITY; + } else if (float64_is_zero(arg)) { + return FLOAT_CLASS_POSITIVE_ZERO; + } else if (float64_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_POSITIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_POSITIVE_NORMAL; + } + } +} + +uint64_t helper_float_class_d(CPUMIPSState *env, uint64_t arg) +{ + return float_class_d(arg, &env->active_fpu.fp_status); +} + +uint32_t float_class_s(uint32_t arg, float_status *status) +{ + if (float32_is_signaling_nan(arg, status)) { + return FLOAT_CLASS_SIGNALING_NAN; + } else if (float32_is_quiet_nan(arg, status)) { + return FLOAT_CLASS_QUIET_NAN; + } else if (float32_is_neg(arg)) { + if (float32_is_infinity(arg)) { + return FLOAT_CLASS_NEGATIVE_INFINITY; + } else if (float32_is_zero(arg)) { + return FLOAT_CLASS_NEGATIVE_ZERO; + } else if (float32_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_NEGATIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_NEGATIVE_NORMAL; + } + } else { + if (float32_is_infinity(arg)) { + return FLOAT_CLASS_POSITIVE_INFINITY; + } else if (float32_is_zero(arg)) { + return FLOAT_CLASS_POSITIVE_ZERO; + } else if (float32_is_zero_or_denormal(arg)) { + return FLOAT_CLASS_POSITIVE_SUBNORMAL; + } else { + return FLOAT_CLASS_POSITIVE_NORMAL; + } + } +} + +uint32_t helper_float_class_s(CPUMIPSState *env, uint32_t arg) +{ + return float_class_s(arg, &env->active_fpu.fp_status); +} + /* binary operations */ uint64_t helper_float_add_d(CPUMIPSState *env, From patchwork Sun May 17 09:23:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11554001 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B40B113B4 for ; Sun, 17 May 2020 09:33:34 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88CDE206D5 for ; Sun, 17 May 2020 09:33:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VD17Uy9Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88CDE206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:58440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFfp-0003hs-PZ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:33:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX6-0004OD-3l for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:33 -0400 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]:41308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX4-0001oK-V8 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:31 -0400 Received: by mail-lf1-x144.google.com with SMTP id a9so5383452lfb.8 for ; Sun, 17 May 2020 02:24:29 -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 :mime-version:content-transfer-encoding; bh=YIyeyf4CRuuipu/MCNsonP1ZNqoTXUAtMHmKuATIrmc=; b=VD17Uy9ZWVaZFYv5cwkEaHAZTWA5FTM9Tr3U0nTmlZeqT2lNG+9NfqNmXZ/vTuVna2 ru+FcYLg5pWIPE8JubglpOPnkgwfXHf39KYeiFSx+fHAjwwRe4KNZIOEAsGKMwUsYUXX VvS2bVuNlLCz73DNc7l5g8g+FRpZNDV2X9r0dv79zJCC5nhgmMgWf6uMKRwvavFW31qz t2vQzG7PXSpzPrq7d3IT/Ov6kyW6z0pBlb/gbua3q1JCWU/PaAUfJEmLpJwwNcxeGWq+ XiBxbZACBfO4OF8YVR1pj9ZCNm3k390QJTVlCIO/kvIH3oMwTK4NhKoVFGoUA73KnkF0 bYGQ== 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=YIyeyf4CRuuipu/MCNsonP1ZNqoTXUAtMHmKuATIrmc=; b=NAgL+DfehnLJuTVOzDE+516B487t9RcN9tIuRWW/JLhQne2lihnvjMcZJkDkocYjeU P9Vg8ZdbPZP8OiB52KPWessjtwhX0nHjyss+Kf2XeBpQC7RR19dTHUj1E/cy5mzwqOaI /6Oyz6imgQ0k+9z6+q4DACpXHUV/CtwojDd9zPA3A3MoXO/3Hnx4mBlaauTCH+1apAZp 3G8k0wtCeX5ejKab50sLR5mqSZMB+cKhLOrNRazJWe9k7RyReZllq2r59aInNIk5RlNC UVC5lQrIUNKDSK26xk1qiV9olIj9JwzyIo0OYLNHu8LvaX6P8cGChCJ7nRypdkDyOHl9 qhQQ== X-Gm-Message-State: AOAM533Lq/mK/n9GpQo8tcACYN9/OKR8D1Vj8LiV5kRGxaL2BlkGQCIw VI0Wdr/bJCyT9trOPtyPtfgRIIpuv8Y= X-Google-Smtp-Source: ABdhPJzij94TNUGLRM8rBTaNzIxAqbuBxN6pIuvIb+2RwGRTKoU2lQRRalhpmx+pMaukizpzggaCUA== X-Received: by 2002:ac2:4113:: with SMTP id b19mr7960982lfi.143.1589707468659; Sun, 17 May 2020 02:24:28 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:28 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 12/19] target/mips: fpu: Remove now unused FLOAT_CLASS macro Date: Sun, 17 May 2020 11:23:50 +0200 Message-Id: <20200517092357.1469-13-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::144; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x144.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing CLASS., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index b3903f5357..e227e53f70 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1128,45 +1128,6 @@ FLOAT_RINT(rint_d, 64) #define FLOAT_CLASS_POSITIVE_SUBNORMAL 0x100 #define FLOAT_CLASS_POSITIVE_ZERO 0x200 -#define FLOAT_CLASS(name, bits) \ -uint ## bits ## _t float_ ## name(uint ## bits ## _t arg, \ - float_status *status) \ -{ \ - if (float ## bits ## _is_signaling_nan(arg, status)) { \ - return FLOAT_CLASS_SIGNALING_NAN; \ - } else if (float ## bits ## _is_quiet_nan(arg, status)) { \ - return FLOAT_CLASS_QUIET_NAN; \ - } else if (float ## bits ## _is_neg(arg)) { \ - if (float ## bits ## _is_infinity(arg)) { \ - return FLOAT_CLASS_NEGATIVE_INFINITY; \ - } else if (float ## bits ## _is_zero(arg)) { \ - return FLOAT_CLASS_NEGATIVE_ZERO; \ - } else if (float ## bits ## _is_zero_or_denormal(arg)) { \ - return FLOAT_CLASS_NEGATIVE_SUBNORMAL; \ - } else { \ - return FLOAT_CLASS_NEGATIVE_NORMAL; \ - } \ - } else { \ - if (float ## bits ## _is_infinity(arg)) { \ - return FLOAT_CLASS_POSITIVE_INFINITY; \ - } else if (float ## bits ## _is_zero(arg)) { \ - return FLOAT_CLASS_POSITIVE_ZERO; \ - } else if (float ## bits ## _is_zero_or_denormal(arg)) { \ - return FLOAT_CLASS_POSITIVE_SUBNORMAL; \ - } else { \ - return FLOAT_CLASS_POSITIVE_NORMAL; \ - } \ - } \ -} \ - \ -uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ - uint ## bits ## _t arg) \ -{ \ - return float_ ## name(arg, &env->active_fpu.fp_status); \ -} - -#undef FLOAT_CLASS - uint64_t float_class_d(uint64_t arg, float_status *status) { if (float64_is_signaling_nan(arg, status)) { From patchwork Sun May 17 09:23:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B9B560D for ; Sun, 17 May 2020 09:26:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 709C0206D5 for ; Sun, 17 May 2020 09:26:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F7BspipO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 709C0206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:33422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFZA-0001Ma-JM for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX7-0004OU-Rg for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:33 -0400 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:35234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX5-0001oY-B3 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:33 -0400 Received: by mail-lf1-x142.google.com with SMTP id 82so5410456lfh.2 for ; Sun, 17 May 2020 02:24:30 -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 :mime-version:content-transfer-encoding; bh=y+crpwaRbz+NuIRuZ2Ykd3V1TrXmhpx6yRUQr18fFhI=; b=F7BspipOSEGzE/ofO/51uncWB5CsqZ1GOflLsUlXccQE83AFVLHeiJ43rzoYjdd3VH h0gm8+AfXz+79jMi8DD/f4od7l5epwGTSHC0N36Nd+zwWiayiY7eDFcvATHLWJ0m6Q/A z5y2WljKOQndY5wkx72/hvG37up9kDi+XsdgZih91phvr+Mv1Ejabd12u4IabdpgCDtP IHA+mzJee3KJdafqALEOhpKDD/Uu6jKBUK9bnQNnyKeJcxJ9qveBSZrs6ZfYNVMcoLGp KEGqExPV8V7ldiwllzzwDqBgl93Xys+tySxeYNCP+FH2e6HCLXrQL5AcWwrGMFPhes9T jLWQ== 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=y+crpwaRbz+NuIRuZ2Ykd3V1TrXmhpx6yRUQr18fFhI=; b=ofK5uIx9YNzzqkac1ce6oIkePFHq5xH4brccIdmivzr2XSO4zrJPOkwmeDviGymXIj e+6nJrqU7we3D76t/3PlpNWmPH34ElRegkQUBE2hnApJTvCJEaoq8DtwKP5IE9VCw58C KE7bpLH/HgrCOYVYtLZu0eC4F05cIKqsnqGEQP0V8oy9xGOGzbnAbfk+XrkG5ObYTCBY oDGQnTtGESHT3QUutxVUbo3bVVwS6PKEcPg0jUclloHBgZ5jOZ25/meDTTfsM+d4lceW sJqm9raZQXbrk6GOTl6sTAu03RhZreAdj69KWqwGtrte7etYDZv5tZyw4sqayZ71ZXuK w9ng== X-Gm-Message-State: AOAM53244ysh8QZOdt5lsTUSIaiZztDXACabulejq7hSljkK1lviAmWk TRwOzpJZPeZjlMdA0J3dnsZm5IvFX5k= X-Google-Smtp-Source: ABdhPJxXIXnkIpGVGhonE0i/D49lsCpOGN/9C3OwCybGfZpBuay0Dtjn7IuJXaBcWpAHT9guguP6Tw== X-Received: by 2002:ac2:55b2:: with SMTP id y18mr820120lfg.55.1589707469712; Sun, 17 May 2020 02:24:29 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:29 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 13/19] target/mips: fpu: Demacro RINT. Date: Sun, 17 May 2020 11:23:51 +0200 Message-Id: <20200517092357.1469-14-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::142; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lf1-x142.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index e227e53f70..dae1331f23 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1113,10 +1113,26 @@ uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ return fdret; \ } -FLOAT_RINT(rint_s, 32) -FLOAT_RINT(rint_d, 64) #undef FLOAT_RINT +uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) +{ + uint64_t fdret; + + fdret = float64_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + +uint32_t helper_float_rint_s(CPUMIPSState *env, uint32_t fs) +{ + uint32_t fdret; + + fdret = float32_round_to_int(fs, &env->active_fpu.fp_status); + update_fcr31(env, GETPC()); + return fdret; +} + #define FLOAT_CLASS_SIGNALING_NAN 0x001 #define FLOAT_CLASS_QUIET_NAN 0x002 #define FLOAT_CLASS_NEGATIVE_INFINITY 0x004 From patchwork Sun May 17 09:23:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553987 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A97CA60D for ; Sun, 17 May 2020 09:27:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 813A020727 for ; Sun, 17 May 2020 09:27:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CFVd6Pon" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 813A020727 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFaL-0004Le-MI for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:27:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX8-0004P3-4W for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:34 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:45701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX6-0001oe-8K for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:33 -0400 Received: by mail-lj1-x242.google.com with SMTP id h4so6610694ljg.12 for ; Sun, 17 May 2020 02:24:31 -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 :mime-version:content-transfer-encoding; bh=lJgCSZt5mHFIRGTCzDEMalJcIzhFOtdVx1BtWwULXEk=; b=CFVd6PontEqbELKqDoBl54WJWW4OQbfNagJQcckHI/21L/u8bRONARD9mvXjarXmjV AKHw2lTgPoOOU7eHTwU2Bn5AmvV5T9lcoTq3btOSxo5KO9F/7gGd8hVp8XDIKQ2kulIH +qMRPHTvQ/bjjkPm5vvEkZXa+jOHQ65frhZQuAKq/+WXGrN407+WiFso2CTZpf5srqlx Goo5vIeH74vsA0vXGd4cnV2Y05YCMBi2Dg0+F3wDISgXiESwSRFnnH8Qp2NbemucgFEC Sc6dyi4WoGA4Vhc/6ahkTGp+w9L/uwicQMKEtBifVDW8btD+DjC7kLzG4o4NChVlbn5t xWTQ== 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=lJgCSZt5mHFIRGTCzDEMalJcIzhFOtdVx1BtWwULXEk=; b=h1Yiccp7sdP6AclTiNClBQGxVVuviqGAvJROr1G4aTKwf5fLvvS1NnEDCoqftG1yA2 yBge5mW5zzhu5Fabv8a3StG9Qn/kAbIsuRRF1Dz+6bCUvQgt7kbEsNt4igml9gufQTaw e/cX+2JqZFxAG3gfhLsooQw7u3N1UK5cSlu8D5KWPACQmVaLg7PqNZW81jO8X5vJcDu7 j6BxgKJSEsTsO81+/aq7pzLHxjV5zodQ76wOjtvKU3l+JKXSh5PfgaU80NyjdTC7Oogc bvsnYgWQPAs0ATTHHEmR/S8IXpRP8c2foKnV69qz/66CATaYX5GIqic3BvNzITMdxAkI BxEA== X-Gm-Message-State: AOAM531Zt9NpX33gLn/Pz83JmoP6u5bb2ueC4U8DEyNfZDGARUFlGPg0 aMTfFvImyjBRy34Iy5JQ2HpZS2KPhg4= X-Google-Smtp-Source: ABdhPJynvweKo6U5WCEqyUyMF7v/nFgPHCguvsG4XJZqM0HD8SgStioq8hYsvj79cW4njkcAusHzRA== X-Received: by 2002:a2e:3e15:: with SMTP id l21mr6044098lja.250.1589707470723; Sun, 17 May 2020 02:24:30 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:30 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 14/19] target/mips: fpu: Remove now unused FLOAT_RINT macro Date: Sun, 17 May 2020 11:23:52 +0200 Message-Id: <20200517092357.1469-15-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::242; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x242.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" After demacroing RINT., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index dae1331f23..56ba49104e 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1102,19 +1102,6 @@ uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) return ((uint64_t)fsth2 << 32) | fst2; } -#define FLOAT_RINT(name, bits) \ -uint ## bits ## _t helper_float_ ## name(CPUMIPSState *env, \ - uint ## bits ## _t fs) \ -{ \ - uint ## bits ## _t fdret; \ - \ - fdret = float ## bits ## _round_to_int(fs, &env->active_fpu.fp_status); \ - update_fcr31(env, GETPC()); \ - return fdret; \ -} - -#undef FLOAT_RINT - uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) { uint64_t fdret; From patchwork Sun May 17 09:23:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553991 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBD2B138A for ; Sun, 17 May 2020 09:29:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1F92206D5 for ; Sun, 17 May 2020 09:29:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ka5OwIkg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1F92206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFbg-0006y1-21 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:29:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFX9-0004Ri-U4 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:35 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:41128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX7-0001op-QU for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:35 -0400 Received: by mail-lj1-x243.google.com with SMTP id v16so2569070ljc.8 for ; Sun, 17 May 2020 02:24:33 -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 :mime-version:content-transfer-encoding; bh=bFeqPWm2QsPGoTt7fEQgUrf7uzCq2N6hwh31edqpp1E=; b=ka5OwIkgFVbe4N6g6/BPiOVPZUd6N1t5JNqubmIYuD+A+19M1VAUNIHD0vFwA00FcS I5uN41J53LAQVsihZjHFxfjXHUtjylZPmrLXnL6Bx6HJm+vYinl/8gzZVsu5a2/vQDDn M0wOrXLr46pwOKjTXeUI8VDLoUB51uT10URHeVASm8tXABZAGveo01qFQrUdiGcrdb6F i7wshwg1ykqGwhvolto5RQPOJeZpz4k3qEzftEAeitkIFqcbVrDOBLR3uas4NR4vIBUh KJPSwmEVhJuSSm812oQsYerSlIosseqO8RxOSlJH8ijKBD4wVgkKw1MFetD3o2STb2O3 O42A== 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=bFeqPWm2QsPGoTt7fEQgUrf7uzCq2N6hwh31edqpp1E=; b=ba0j0Enen3zOhvlW2fUUx+8nvT87zNqDvdkI3q75Aj1Uk1T8DITmTh7FPAXqXFuhbN 8AC8LbuUqEc67gk05wf+ygJNEx7EvysIwqN1EM2mIDZZZYzwsA9Kry2Outr3I5e5Pw+I 1YkSm0r+0i/fRhN2HxP+D2rYnSWlld6GMU6kMKbA+0To5t1B+MqpbW1+T/qFzaBKFeQO zyq5nRlk2ds5eFe8GTuGItwGq7pqukNncNrDuOd9WCTanQHqC95/DblVUp5m9AsuXKaV /seCw5Xf/PRYLhydohYHShNl/1Bh/nL+JRW0wi1l15ouQr7Q67LgM6ZrOH+yqQHzdxGe h5Xg== X-Gm-Message-State: AOAM530xkbfWUMSu1d36wWcKzwni7MoSqoEyGUnOFJqbh4vE6plYmrO7 JYPAgw80H/keMourIcvifkk1dzEkHiY= X-Google-Smtp-Source: ABdhPJw2YWnyfUcL+S4K3BW/QHtnVXGXAeKnvwYo3hXgDdReEbFKiulGiX+FO7NocaB99JTagyu9vA== X-Received: by 2002:a2e:3c10:: with SMTP id j16mr7011782lja.2.1589707471783; Sun, 17 May 2020 02:24:31 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:31 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 15/19] target/mips: fpu: Name better paired-single variables Date: Sun, 17 May 2020 11:23:53 +0200 Message-Id: <20200517092357.1469-16-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x243.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use consistently 'l' and 'h' for low and high halves. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 56ba49104e..dbb8ca5692 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -1059,14 +1059,14 @@ uint32_t helper_float_recip1_s(CPUMIPSState *env, uint32_t fst0) uint64_t helper_float_recip1_ps(CPUMIPSState *env, uint64_t fdt0) { - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_div(float32_one, fdt0 & 0XFFFFFFFF, - &env->active_fpu.fp_status); + fstl2 = float32_div(float32_one, fdt0 & 0XFFFFFFFF, + &env->active_fpu.fp_status); fsth2 = float32_div(float32_one, fdt0 >> 32, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rsqrt1_d(CPUMIPSState *env, uint64_t fdt0) @@ -1091,15 +1091,15 @@ uint32_t helper_float_rsqrt1_s(CPUMIPSState *env, uint32_t fst0) uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) { - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_sqrt(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); + fstl2 = float32_sqrt(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); fsth2 = float32_sqrt(fdt0 >> 32, &env->active_fpu.fp_status); - fst2 = float32_div(float32_one, fst2, &env->active_fpu.fp_status); + fstl2 = float32_div(float32_one, fstl2, &env->active_fpu.fp_status); fsth2 = float32_div(float32_one, fsth2, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) @@ -1367,19 +1367,19 @@ uint32_t helper_float_recip2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) uint64_t helper_float_recip2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst2 = fdt2 & 0XFFFFFFFF; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; uint32_t fsth2 = fdt2 >> 32; - fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); - fst2 = float32_chs(float32_sub(fst2, float32_one, + fstl2 = float32_chs(float32_sub(fstl2, float32_one, &env->active_fpu.fp_status)); fsth2 = float32_chs(float32_sub(fsth2, float32_one, &env->active_fpu.fp_status)); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_rsqrt2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) @@ -1404,51 +1404,51 @@ uint32_t helper_float_rsqrt2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) uint64_t helper_float_rsqrt2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst2 = fdt2 & 0XFFFFFFFF; + uint32_t fstl2 = fdt2 & 0XFFFFFFFF; uint32_t fsth2 = fdt2 >> 32; - fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); - fst2 = float32_sub(fst2, float32_one, &env->active_fpu.fp_status); + fstl2 = float32_sub(fstl2, float32_one, &env->active_fpu.fp_status); fsth2 = float32_sub(fsth2, float32_one, &env->active_fpu.fp_status); - fst2 = float32_chs(float32_div(fst2, FLOAT_TWO32, + fstl2 = float32_chs(float32_div(fstl2, FLOAT_TWO32, &env->active_fpu.fp_status)); fsth2 = float32_chs(float32_div(fsth2, FLOAT_TWO32, &env->active_fpu.fp_status)); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_addr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst1 = fdt1 & 0XFFFFFFFF; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; uint32_t fsth1 = fdt1 >> 32; - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_add(fst0, fsth0, &env->active_fpu.fp_status); - fsth2 = float32_add(fst1, fsth1, &env->active_fpu.fp_status); + fstl2 = float32_add(fstl0, fsth0, &env->active_fpu.fp_status); + fsth2 = float32_add(fstl1, fsth1, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } uint64_t helper_float_mulr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) { - uint32_t fst0 = fdt0 & 0XFFFFFFFF; + uint32_t fstl0 = fdt0 & 0XFFFFFFFF; uint32_t fsth0 = fdt0 >> 32; - uint32_t fst1 = fdt1 & 0XFFFFFFFF; + uint32_t fstl1 = fdt1 & 0XFFFFFFFF; uint32_t fsth1 = fdt1 >> 32; - uint32_t fst2; + uint32_t fstl2; uint32_t fsth2; - fst2 = float32_mul(fst0, fsth0, &env->active_fpu.fp_status); - fsth2 = float32_mul(fst1, fsth1, &env->active_fpu.fp_status); + fstl2 = float32_mul(fstl0, fsth0, &env->active_fpu.fp_status); + fsth2 = float32_mul(fstl1, fsth1, &env->active_fpu.fp_status); update_fcr31(env, GETPC()); - return ((uint64_t)fsth2 << 32) | fst2; + return ((uint64_t)fsth2 << 32) | fstl2; } #define FLOAT_MINMAX(name, bits, minmaxfunc) \ From patchwork Sun May 17 09:23:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11554003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCB3613B4 for ; Sun, 17 May 2020 09:34:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91CC0206D5 for ; Sun, 17 May 2020 09:34:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EviypoJE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91CC0206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFgr-0004cG-PQ for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:34:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFXB-0004W3-QD for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:37 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:43722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX9-0001ou-8K for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:37 -0400 Received: by mail-lj1-x243.google.com with SMTP id l19so6623444lje.10 for ; Sun, 17 May 2020 02:24:34 -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 :mime-version:content-transfer-encoding; bh=k9dCNJhoGWGfuroGDxBMJ68nEj9FrDwnLWLbmQBcmzU=; b=EviypoJE2fw11rg9d7cOApWxrPG9WjyHyQ4nej9/xzjmUWyLByq9Yg1pHUS0rahRoO pDJ1/TpQAgY1K0pE94YF1vFBPRcn8EY8EtWhRetrKJ1aEHqG4R3qsCUuKWhGHBHtgcKq V+fh4z6yQW4zXhYccG8n8GK2ryvQNcLB0xle6iLh/GFsN1v919XiEX2kBIlATMV4jQNG HK05DzNLFT/1CSOmrOC/1Rw/VZ1QfYu5TJesAFQJEopi5jsTPPekXwGQFRiDiVPYD9He sgDbY8a7NWEgrI1DAcSsMAnWW7A+MYRa6MiQNkJFiRQaCRcJ+iDw+OpL+Gl3pbcQjkat wkeQ== 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=k9dCNJhoGWGfuroGDxBMJ68nEj9FrDwnLWLbmQBcmzU=; b=cjNxX6pwvUl7Dn2Mg71gv8jjzjgZjf2ikwva20gJ7lyw9eb3fx/qG1l1k3SBVQtogj 47feHF8H+E8a16KhsT7NeznTzWaKh+rXD/eKb/vWbieIoy8a31WfHc3UiG/IQe2NPsm2 IZzPD109xgAWpQc0dOOGkhLnxuHITFno0hTcTz8/to8J6b6itgk1duquf+GfF0HpmEiD m4qLRKbTsLkTh1YKZnuWkbL5uXNZejxFq7iFzwg3Ew4r2xZ4PMA4/vHVNp/FE9J27bPi Iqm83Zr8YkzXciautliBqO0PIPy1mjdtwdqMVMd9AKJ48f3B19AYzBI7U2GT1SqrGU/z KdxQ== X-Gm-Message-State: AOAM533yqE3K6Z00nTemRHOx1n1+NpjvJiQvtEE7AnkK8r8jF7alyxIB wtudfVWNsNru7GYE24w5K1xoG05tDuM= X-Google-Smtp-Source: ABdhPJxncxpKj7eqvQmSQJdZnEjHeLSlqMO6KhAk4jAVOLvnNN3S1s3aMHPWh2ZEVWfabaFMe3hCOQ== X-Received: by 2002:a2e:8805:: with SMTP id x5mr7540844ljh.223.1589707472973; Sun, 17 May 2020 02:24:32 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:32 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 16/19] target/mips: fpu: Refactor conversion from ieee to mips exception flags Date: Sun, 17 May 2020 11:23:54 +0200 Message-Id: <20200517092357.1469-17-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x243.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The original coversion function is used for regular and MSA floating point instructions handling. Since there are some nuanced differences between regular and MSA floating point exception handling, provide two instances of the conversion function, rather than just a single common one. Inline both instances of this function instances for the sake of performance. Improve variable naming in surrounding code for clarity. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 55 +++++++++++++++------------- target/mips/internal.h | 1 - target/mips/msa_helper.c | 77 +++++++++++++++++++++++++++------------- 3 files changed, 82 insertions(+), 51 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index dbb8ca5692..7a3a61cab3 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -189,43 +189,48 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt) } } -int ieee_ex_to_mips(int xcpt) +static inline int ieee_to_mips_xcpt(int ieee_xcpt) { - int ret = 0; - if (xcpt) { - if (xcpt & float_flag_invalid) { - ret |= FP_INVALID; - } - if (xcpt & float_flag_overflow) { - ret |= FP_OVERFLOW; - } - if (xcpt & float_flag_underflow) { - ret |= FP_UNDERFLOW; - } - if (xcpt & float_flag_divbyzero) { - ret |= FP_DIV0; - } - if (xcpt & float_flag_inexact) { - ret |= FP_INEXACT; - } + int mips_xcpt = 0; + + if (ieee_xcpt & float_flag_invalid) { + mips_xcpt |= FP_INVALID; + } + if (ieee_xcpt & float_flag_overflow) { + mips_xcpt |= FP_OVERFLOW; } - return ret; + if (ieee_xcpt & float_flag_underflow) { + mips_xcpt |= FP_UNDERFLOW; + } + if (ieee_xcpt & float_flag_divbyzero) { + mips_xcpt |= FP_DIV0; + } + if (ieee_xcpt & float_flag_inexact) { + mips_xcpt |= FP_INEXACT; + } + + return mips_xcpt; } static inline void update_fcr31(CPUMIPSState *env, uintptr_t pc) { - int tmp = ieee_ex_to_mips(get_float_exception_flags( - &env->active_fpu.fp_status)); + int ieee_exception_flags = get_float_exception_flags( + &env->active_fpu.fp_status); + int mips_exception_flags = 0; + + if (ieee_exception_flags) { + mips_exception_flags = ieee_to_mips_xcpt(ieee_exception_flags); + } - SET_FP_CAUSE(env->active_fpu.fcr31, tmp); + SET_FP_CAUSE(env->active_fpu.fcr31, mips_exception_flags); - if (tmp) { + if (mips_exception_flags) { set_float_exception_flags(0, &env->active_fpu.fp_status); - if (GET_FP_ENABLE(env->active_fpu.fcr31) & tmp) { + if (GET_FP_ENABLE(env->active_fpu.fcr31) & mips_exception_flags) { do_raise_exception(env, EXCP_FPE, pc); } else { - UPDATE_FP_FLAGS(env->active_fpu.fcr31, tmp); + UPDATE_FP_FLAGS(env->active_fpu.fcr31, mips_exception_flags); } } } diff --git a/target/mips/internal.h b/target/mips/internal.h index 1bf274b3ef..684356e309 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -224,7 +224,6 @@ uint32_t float_class_s(uint32_t arg, float_status *fst); uint64_t float_class_d(uint64_t arg, float_status *fst); extern unsigned int ieee_rm[]; -int ieee_ex_to_mips(int xcpt); void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask); static inline void restore_rounding_mode(CPUMIPSState *env) diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c index 4065cfe4f7..c520405929 100644 --- a/target/mips/msa_helper.c +++ b/target/mips/msa_helper.c @@ -5419,54 +5419,81 @@ static inline void check_msacsr_cause(CPUMIPSState *env, uintptr_t retaddr) #define CLEAR_IS_INEXACT 2 #define RECIPROCAL_INEXACT 4 -static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) + +static inline int ieee_to_mips_xcpt_msa(int ieee_xcpt) { - int ieee_ex; + int mips_xcpt = 0; - int c; + if (ieee_xcpt & float_flag_invalid) { + mips_xcpt |= FP_INVALID; + } + if (ieee_xcpt & float_flag_overflow) { + mips_xcpt |= FP_OVERFLOW; + } + if (ieee_xcpt & float_flag_underflow) { + mips_xcpt |= FP_UNDERFLOW; + } + if (ieee_xcpt & float_flag_divbyzero) { + mips_xcpt |= FP_DIV0; + } + if (ieee_xcpt & float_flag_inexact) { + mips_xcpt |= FP_INEXACT; + } + + return mips_xcpt; +} + +static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) +{ + int ieee_exception_flags; + int mips_exception_flags = 0; int cause; int enable; - ieee_ex = get_float_exception_flags(&env->active_tc.msa_fp_status); + ieee_exception_flags = get_float_exception_flags( + &env->active_tc.msa_fp_status); /* QEMU softfloat does not signal all underflow cases */ if (denormal) { - ieee_ex |= float_flag_underflow; + ieee_exception_flags |= float_flag_underflow; + } + if (ieee_exception_flags) { + mips_exception_flags = ieee_to_mips_xcpt_msa(ieee_exception_flags); } - - c = ieee_ex_to_mips(ieee_ex); enable = GET_FP_ENABLE(env->active_tc.msacsr) | FP_UNIMPLEMENTED; /* Set Inexact (I) when flushing inputs to zero */ - if ((ieee_ex & float_flag_input_denormal) && + if ((ieee_exception_flags & float_flag_input_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) { if (action & CLEAR_IS_INEXACT) { - c &= ~FP_INEXACT; + mips_exception_flags &= ~FP_INEXACT; } else { - c |= FP_INEXACT; + mips_exception_flags |= FP_INEXACT; } } /* Set Inexact (I) and Underflow (U) when flushing outputs to zero */ - if ((ieee_ex & float_flag_output_denormal) && + if ((ieee_exception_flags & float_flag_output_denormal) && (env->active_tc.msacsr & MSACSR_FS_MASK) != 0) { - c |= FP_INEXACT; + mips_exception_flags |= FP_INEXACT; if (action & CLEAR_FS_UNDERFLOW) { - c &= ~FP_UNDERFLOW; + mips_exception_flags &= ~FP_UNDERFLOW; } else { - c |= FP_UNDERFLOW; + mips_exception_flags |= FP_UNDERFLOW; } } /* Set Inexact (I) when Overflow (O) is not enabled */ - if ((c & FP_OVERFLOW) != 0 && (enable & FP_OVERFLOW) == 0) { - c |= FP_INEXACT; + if ((mips_exception_flags & FP_OVERFLOW) != 0 && + (enable & FP_OVERFLOW) == 0) { + mips_exception_flags |= FP_INEXACT; } /* Clear Exact Underflow when Underflow (U) is not enabled */ - if ((c & FP_UNDERFLOW) != 0 && (enable & FP_UNDERFLOW) == 0 && - (c & FP_INEXACT) == 0) { - c &= ~FP_UNDERFLOW; + if ((mips_exception_flags & FP_UNDERFLOW) != 0 && + (enable & FP_UNDERFLOW) == 0 && + (mips_exception_flags & FP_INEXACT) == 0) { + mips_exception_flags &= ~FP_UNDERFLOW; } /* @@ -5474,11 +5501,11 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * divide by zero */ if ((action & RECIPROCAL_INEXACT) && - (c & (FP_INVALID | FP_DIV0)) == 0) { - c = FP_INEXACT; + (mips_exception_flags & (FP_INVALID | FP_DIV0)) == 0) { + mips_exception_flags = FP_INEXACT; } - cause = c & enable; /* all current enabled exceptions */ + cause = mips_exception_flags & enable; /* all current enabled exceptions */ if (cause == 0) { /* @@ -5486,7 +5513,7 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * with all current exceptions */ SET_FP_CAUSE(env->active_tc.msacsr, - (GET_FP_CAUSE(env->active_tc.msacsr) | c)); + (GET_FP_CAUSE(env->active_tc.msacsr) | mips_exception_flags)); } else { /* Current exceptions are enabled */ if ((env->active_tc.msacsr & MSACSR_NX_MASK) == 0) { @@ -5495,11 +5522,11 @@ static inline int update_msacsr(CPUMIPSState *env, int action, int denormal) * with all enabled exceptions */ SET_FP_CAUSE(env->active_tc.msacsr, - (GET_FP_CAUSE(env->active_tc.msacsr) | c)); + (GET_FP_CAUSE(env->active_tc.msacsr) | mips_exception_flags)); } } - return c; + return mips_exception_flags; } static inline int get_enabled_exceptions(const CPUMIPSState *env, int c) From patchwork Sun May 17 09:23:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553995 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B68060D for ; Sun, 17 May 2020 09:30:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21808206D4 for ; Sun, 17 May 2020 09:30:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gLV3WUEg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21808206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFcz-0000MI-Ay for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:30:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFXA-0004UQ-Sa for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:37 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:40205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFX9-0001p3-M2 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:36 -0400 Received: by mail-lj1-x243.google.com with SMTP id g1so6622617ljk.7 for ; Sun, 17 May 2020 02:24:35 -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 :mime-version:content-transfer-encoding; bh=L66Agc2lHgpy7FO0yh6pn/rfQ2aSoQ2VmphzAuOdIik=; b=gLV3WUEg62/kdtWNpvoTJSlJH7qX2tGv+pwUBmrjwFW0aCqglsHGH1muv/uHT/bhXP 0ydyvC5ol32O3/u+Vdpcu8Gyr8mQ0wOqRx6fx1cA8ZLKTV4u+S0utjvRW04qwJyhfAaJ vtPwvXTfBLXteqvZH6nXGrRGcbvre+aEq9WHYANEE1BpRdtqscIJy6x/sqf5LIvD0Gmr Sp1z3btuDOFkxTdxZZ1YRUseV2aY2m+iKtcoNAs3noiDwm/yEV1QfO/Yb4C63p/qGRpp 8pieBOeZNhZGWw4kHnY/G421Q8/fYgkhduXRmMvbfjt/0QzMa1bQ5uWxB90dnBmJtQt0 rUhw== 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=L66Agc2lHgpy7FO0yh6pn/rfQ2aSoQ2VmphzAuOdIik=; b=GGrSXIrIXQn/D9YtBk/kojbDEdOFJ9QkOHyU0SSSHgFtE/mFyddv7zdYjXB/zDpUg2 pW7Gh+M6UeUWi/Y4+6oCKCHEnVgXGWugJJDtD1UyHvdKR7cNGCtm+DoFKlgE+9k4FjRN ajS2y/wsIhtLalgq6Gya0a2v35Eg/DYiMROk4ZDrtXzesI59IXsfwG9jjaBl9gk6yjPQ sC7rkkMRcIa+Wbu+O87lFMEmgU5MFqILNC0XUaUzp0gq7BpPBw+qaI3f9N4bdFiQsiOi 1zL9t/qYesZeTJRZJTqmtd2iGGpwOOsCiIrrEXnnB4sFr6YDsuekv7+xAAKjAOlYdguC hMpA== X-Gm-Message-State: AOAM533/BtoJvBYx1MwCzP0yfbgGB2s/BSe9ZvPEq9i2qLQcrY62pOrF 9W+0+TvhmsAjyZdLft1LksHhZsPpedk= X-Google-Smtp-Source: ABdhPJyNxUDKloW7hJl2o3zhl32Vr599/y+B7y/qw+D3U/7OrqbeyKNbmr6MFdcDv2L4TBR+Bl+X0Q== X-Received: by 2002:a2e:a417:: with SMTP id p23mr7659908ljn.19.1589707474097; Sun, 17 May 2020 02:24:34 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:33 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 17/19] hw/mips: Add some logging for bad register offset cases Date: Sun, 17 May 2020 11:23:55 +0200 Message-Id: <20200517092357.1469-18-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x243.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Log the cases where a guest attempts read or write using bad register offset. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- hw/mips/mips_malta.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index e4c4de1b4e..88869b828e 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -427,10 +427,9 @@ static uint64_t malta_fpga_read(void *opaque, hwaddr addr, break; default: -#if 0 - printf("malta_fpga_read: Bad register offset 0x" TARGET_FMT_lx "\n", - addr); -#endif + qemu_log_mask(LOG_GUEST_ERROR, + "malta_fpga_read: Bad register offset 0x" + TARGET_FMT_lx "\n", addr); break; } return val; @@ -515,10 +514,9 @@ static void malta_fpga_write(void *opaque, hwaddr addr, break; default: -#if 0 - printf("malta_fpga_write: Bad register offset 0x" TARGET_FMT_lx "\n", - addr); -#endif + qemu_log_mask(LOG_GUEST_ERROR, + "malta_fpga_write: Bad register offset 0x" + TARGET_FMT_lx "\n", addr); break; } } From patchwork Sun May 17 09:23:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11553999 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 37BE160D for ; Sun, 17 May 2020 09:32:19 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D5F4206D5 for ; Sun, 17 May 2020 09:32:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NnLaCGFe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D5F4206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFec-000283-87 for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:32:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFXD-0004c5-D4 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:39 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:38591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFXB-0001pA-H1 for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:39 -0400 Received: by mail-lj1-x22d.google.com with SMTP id e25so6631964ljg.5 for ; Sun, 17 May 2020 02:24: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 :mime-version:content-transfer-encoding; bh=VkY06hFmUtrhwfHs0njKUa5fecjb4LGKMIk7vsimrnU=; b=NnLaCGFelfBEwo3SGKXHBwZ30VbzOiF8cLNLG0U5M4nAB4tnEueOIalfTLt1AMslll LWO8BQ5AUIqp0jxg0fdUhUayi2XHPQwMlO9ROIEybPXOor+/qqfavLh0ENr3vOI+GLsr yuYlRVh+du5JTHtBnxDALck6yBcfk9cObRJQv/ui6vINbNByWSVaQrTwbhG+hj5B7OKS atL3HbiwZChNYbvTyFploy4bpyQHn0iGrxR4gERrNFjQd676naubbdz550l9pn6+oR08 EOVyRj+Hl/GMXSQqVL1+1p/2magJGI30FUY/QUJ4ARwFldvZ1weNfPqMUY6KY+7VEOpw ucSw== 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=VkY06hFmUtrhwfHs0njKUa5fecjb4LGKMIk7vsimrnU=; b=F1+hu2Rmj0QD4EAP2BtrFl2CC4MQ+K4zyGA1zTfWdYsbDAs3v/Goxoie2P4Mg+oFS5 IaSfsGobK0ZC/9YF8pnLnHxWFo6nIMpa2czqKRcX3K+ysWO3Txqo+xcfYf+GGeWHGvU1 zqnaSOt9C0rtoYtFUO3/RJFoG3pEfgwwZKwuoTWH3C82k4yETJac3EZA5HY6Lz5R41Cq WUquxyGbvmuihJTKzFuAxxIDFX/Wo49J2H2CqtWR0LpfjGi86UcXsZxP/TdOR7dCleq0 IUm/pt4HuLVYrXLQJxNxKjIQ8M6juzntiVXrFS0hj17zYy8a3L+vJ2ndh9HeNyr1LpZO d3vw== X-Gm-Message-State: AOAM530pyHp+NurOeaqcj9NDvqA59yL8xJ57fZEB7NtzZ4Ca2e6+C95E 2O/RpqdsHh6cVzJsjtp9WtaiTePAvzA= X-Google-Smtp-Source: ABdhPJzphs5ydoJmcJsheIvhuWLi2EK9xPGTnYYM7RhCMw1vR6w1b1ESO9QNHxfmKliOtRUtsYLZfw== X-Received: by 2002:a05:651c:1025:: with SMTP id w5mr7199636ljm.113.1589707475285; Sun, 17 May 2020 02:24:35 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:34 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 18/19] MAINTAINERS: Change Aleksandar Rikalo's email address Date: Sun, 17 May 2020 11:23:56 +0200 Message-Id: <20200517092357.1469-19-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x22d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Aleksandar Rikalo wants to use a different email address from now on. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé --- .mailmap | 3 ++- MAINTAINERS | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.mailmap b/.mailmap index 6412067bde..e3628c7a66 100644 --- a/.mailmap +++ b/.mailmap @@ -42,7 +42,8 @@ Justin Terry (VM) Justin Terry (VM) via Qemu-devel Aleksandar Markovic Aleksandar Markovic -Aleksandar Rikalo +Aleksandar Rikalo +Aleksandar Rikalo Anthony Liguori Anthony Liguori James Hogan Leif Lindholm diff --git a/MAINTAINERS b/MAINTAINERS index 1f84e3ae2c..8d5562c5c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -212,7 +212,7 @@ F: disas/microblaze.c MIPS TCG CPUs M: Aleksandar Markovic R: Aurelien Jarno -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Maintained F: target/mips/ F: default-configs/*mips* @@ -1041,7 +1041,7 @@ MIPS Machines ------------- Jazz M: Hervé Poussineau -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Maintained F: hw/mips/mips_jazz.c F: hw/display/jazz_led.c @@ -1062,7 +1062,7 @@ F: tests/acceptance/machine_mips_malta.py Mipssim M: Aleksandar Markovic -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Odd Fixes F: hw/mips/mips_mipssim.c F: hw/net/mipsnet.c @@ -1070,7 +1070,7 @@ F: hw/net/mipsnet.c R4000 M: Aleksandar Markovic R: Aurelien Jarno -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Obsolete F: hw/mips/mips_r4k.c @@ -1085,7 +1085,7 @@ F: include/hw/isa/vt82c686.h Boston M: Paul Burton -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Maintained F: hw/core/loader-fit.c F: hw/mips/boston.c @@ -2582,7 +2582,7 @@ F: disas/i386.c MIPS TCG target M: Aleksandar Markovic R: Aurelien Jarno -R: Aleksandar Rikalo +R: Aleksandar Rikalo S: Maintained F: tcg/mips/ From patchwork Sun May 17 09:23:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 11554005 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 372C2913 for ; Sun, 17 May 2020 09:35:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B638C2065F for ; Sun, 17 May 2020 09:35:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Lp+cpK5W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B638C2065F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:34532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaFhx-0005as-NI for patchwork-qemu-devel@patchwork.kernel.org; Sun, 17 May 2020 05:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaFXD-0004bK-7D for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:39 -0400 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]:41127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaFXC-0001pJ-Ch for qemu-devel@nongnu.org; Sun, 17 May 2020 05:24:38 -0400 Received: by mail-lj1-x241.google.com with SMTP id v16so2569161ljc.8 for ; Sun, 17 May 2020 02:24:38 -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 :mime-version:content-transfer-encoding; bh=tW+0eLzQ2UZfvVWbxFduozLUGGyjb7gucIG22bozEe0=; b=Lp+cpK5WMRiqblHp6OAv6rZ2mwtg0ZO7zPd1e9RbMnwwkQ2PnqYSYA4v3s/+X2U9/F 40wSpwmcJWuZwu/gf9FK0+pLT0TTE3qP4wUqDVIo9iLhmEhmUud2tp3yqCB2h0GCrde7 O/gYI4zxZ2NzCcpKQnSx4dVZHxKIAicoaOSGuR2k8JK2vWdLmJ8MLdfLEwr2+Uzo+4OE zmsO4SnmY39mcD9BbmQEAMxeWF6ofDFdZcsG/X6A9dMITVfAc5dbpbQ/hnKh4GpZewaK nDpD+UDkzaEfzejom3VtQHEc23Ng7QrVSQVNyxmckdUtlFZlhGbIfVosDbC1RL90kK5d 7RTA== 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=tW+0eLzQ2UZfvVWbxFduozLUGGyjb7gucIG22bozEe0=; b=Ty9Q+9tCEGK2vIKMLKLPdBizc6YCAGd33twSYnaPolFbuSirISc3YG6uiJNjQIpQFM 4wW22FAuiKUMxWJuXfA0nwHf+E5yt3W1zns8tXMgorrpTYumV8/6UnpwIG8UGk3rvopk uNecK3zLsc/08rctbc1rWK3Z3v4l7hsgp2eU7CYYpd/hDjEs1lU/um96h4om8uxfVrFF fZKiLd/3uRwKmfWC3TywK/hAReM7QxBMqsdf7dJ+qcPuZOSLV3/7hUMRr4MKzOq7Am0Y 13gdFRDjitLPsMFHGPwgGjnFPwcvozZ53WrS10eao0vRMaEf0i181MOAyjcljnhxgkhU u6Nw== X-Gm-Message-State: AOAM533ONUkzQsb7vO023+bhwmHd4VvNqNZZBRWmq9AHdCvPpk1/D9iX q7FSepiolXcuukoJuLOlhUG/voIBC0s= X-Google-Smtp-Source: ABdhPJxvtqr42mpUCESmUuLH4SxgsZayN274ovP7cQbRlJ4Sz2qR0lwBFiEJP7xS00I26LZrwt6XdQ== X-Received: by 2002:a2e:a58e:: with SMTP id m14mr7127671ljp.95.1589707476379; Sun, 17 May 2020 02:24:36 -0700 (PDT) Received: from localhost.localdomain ([109.245.227.98]) by smtp.gmail.com with ESMTPSA id l2sm3872138ljg.89.2020.05.17.02.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 02:24:36 -0700 (PDT) From: Aleksandar Markovic To: qemu-devel@nongnu.org Subject: [PATCH v4 19/19] hw/mips: Rename malta/mipssim/r4k/jazz files in hw/mips Date: Sun, 17 May 2020 11:23:57 +0200 Message-Id: <20200517092357.1469-20-aleksandar.qemu.devel@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> References: <20200517092357.1469-1-aleksandar.qemu.devel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::241; envelope-from=aleksandar.qemu.devel@gmail.com; helo=mail-lj1-x241.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: aleksandar.rikalo@syrmia.com, Aleksandar Markovic , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Machine file names should not have prefix "mips_". Folong2 machine source file will be handled in a separate patch, to avoid conflicts. That patch is pending integration into the main tree. Signed-off-by: Aleksandar Markovic CC: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/mips/Makefile.objs | 8 ++++---- hw/mips/{mips_jazz.c => jazz.c} | 0 hw/mips/{mips_malta.c => malta.c} | 0 hw/mips/{mips_mipssim.c => mipssim.c} | 0 hw/mips/{mips_r4k.c => r4k.c} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename hw/mips/{mips_jazz.c => jazz.c} (100%) rename hw/mips/{mips_malta.c => malta.c} (100%) rename hw/mips/{mips_mipssim.c => mipssim.c} (100%) rename hw/mips/{mips_r4k.c => r4k.c} (100%) diff --git a/hw/mips/Makefile.objs b/hw/mips/Makefile.objs index 525809af07..1d767ed9a8 100644 --- a/hw/mips/Makefile.objs +++ b/hw/mips/Makefile.objs @@ -1,8 +1,8 @@ obj-y += addr.o mips_int.o -obj-$(CONFIG_R4K) += mips_r4k.o -obj-$(CONFIG_MALTA) += gt64xxx_pci.o mips_malta.o -obj-$(CONFIG_MIPSSIM) += mips_mipssim.o -obj-$(CONFIG_JAZZ) += mips_jazz.o +obj-$(CONFIG_R4K) += r4k.o +obj-$(CONFIG_MALTA) += gt64xxx_pci.o malta.o +obj-$(CONFIG_MIPSSIM) += mipssim.o +obj-$(CONFIG_JAZZ) += jazz.o obj-$(CONFIG_FULONG) += mips_fulong2e.o obj-$(CONFIG_MIPS_CPS) += cps.o obj-$(CONFIG_MIPS_BOSTON) += boston.o diff --git a/hw/mips/mips_jazz.c b/hw/mips/jazz.c similarity index 100% rename from hw/mips/mips_jazz.c rename to hw/mips/jazz.c diff --git a/hw/mips/mips_malta.c b/hw/mips/malta.c similarity index 100% rename from hw/mips/mips_malta.c rename to hw/mips/malta.c diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mipssim.c similarity index 100% rename from hw/mips/mips_mipssim.c rename to hw/mips/mipssim.c diff --git a/hw/mips/mips_r4k.c b/hw/mips/r4k.c similarity index 100% rename from hw/mips/mips_r4k.c rename to hw/mips/r4k.c