From patchwork Sun Oct 30 22:28:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 620034 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2452528pvb; Sun, 30 Oct 2022 15:36:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5XYJnzNaauj3VD/9zpaIPDnmSJUewf3LCJ4fi/4ESJ6r4IYJwqD4XjG5ruRQsEsRyAY2S3 X-Received: by 2002:a0c:9122:0:b0:4b1:80fc:c405 with SMTP id q31-20020a0c9122000000b004b180fcc405mr8700458qvq.120.1667169411337; Sun, 30 Oct 2022 15:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667169411; cv=none; d=google.com; s=arc-20160816; b=rQl2eXFSgLfSmih8RfVLdIx9rGvUHrPDG+jpvyq+Af/ObTKMGFJisvI5zNNhir7hdD SWlfLFuXYuqPunPwZvLMisWKQqH0zYZM/od8iYM8LbCi2rU5ayFvyDsLvbqQGUsUorZc aixGprYGlQBbzSWjR+xhvOdxLuwVyGLyFYFPEot5jG4ManRpdCofd2yTHIh1Q7togHug fEI77auK0Di+TNpqZLdgDdJes2wIsUdrSeRbL9OpBADsKbcTegxY9sh2vpI71yrRRh1F zkFlvtGqfzT+9WRR3uM6kfFpXaAGKFZ2rSE2hgK15ZhncxjJvS2eDgUaswQc6p7ChBU/ BIvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=orPCsNrTP/gLYMurzkm8ANHpZ5tyfCimePBIzWAMz6Y=; b=E56Op4wzrAzj5F7K3rX8j4TzlPz+lfLE4OFgQY+evBMlDPgdxwrCY8r2QhJjPs2lYc ka+M7/ssXEi36FTQx1h4lscKRXdyVq4owf2UpltbMXSDBIF63zAT3JF9xlxd5xj4VsVE 6gevey+4q2M4A9eJqcvJSRQlpooQq8F7/DzbW93qqVDymIKmdFZNTHoJ9xVdAJjZRnSh tZHglzj0wyIoachdyCP58TPggwgFAa5+EWZMZzEuznPOtBonU5qJ+MvK4AQU89lOpjHk edBgO3uK7onNrR2sRTJuoWnwRAv1rOsKz89xV7fX0MGxZ3O2RMCVU1jXv8RLcHuSMwUp O4SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l1eRlcKq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id if11-20020a0562141c4b00b004ad0f5cf00esi268363qvb.117.2022.10.30.15.36.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Oct 2022 15:36:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=l1eRlcKq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opGqg-0008Hs-F0; Sun, 30 Oct 2022 18:32:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opGqN-0007qp-EQ for qemu-devel@nongnu.org; Sun, 30 Oct 2022 18:31:52 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opGqL-0008BD-S2 for qemu-devel@nongnu.org; Sun, 30 Oct 2022 18:31:51 -0400 Received: by mail-wr1-x42a.google.com with SMTP id o4so13671649wrq.6 for ; Sun, 30 Oct 2022 15:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=orPCsNrTP/gLYMurzkm8ANHpZ5tyfCimePBIzWAMz6Y=; b=l1eRlcKqkp2Ib+x/GPepxu3k/vJa4uDIadBX6maw+GLl0UlPcinWTRw1bFqm7cNL8A +Pp7TDybvZ9Kk0Oulo986m+UFAATajkGamymqBm142wCJYCwh4k7ZjS5WEbgpbjCWCuw HXQab5E5cOQAfP/Nj1SkJEsnyUzAizeEok08eOkTNyqgEOmjG2NrQVI/WyzSC/olYXfi b4Pffr3JslUR+gKsdwkFJoJTXowmXIPcGoPKtfjDmHPrDamOnSEyswMBUen4bOzU66bc lGnbjEhpQUBAoI4I9hKkJcpxbDO6x7SisvsOl9BA71orl5DxtI7j3EAFKJkvbFsr97w4 SKAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=orPCsNrTP/gLYMurzkm8ANHpZ5tyfCimePBIzWAMz6Y=; b=Xmwcb1uA8s/tRPR9fMKzJBaP4bYZtAMjJ6sL6SbJoRzmK6LVvcsM7QIlkuQUMVkafU PK8h2NNRSjkR6srqYkDLD/yQaVbf4m5C6orWqujK/9guqFwMT4LjjUfTUnUxLYz+7zMJ vgJ+MMfY/8c6u59waW+eCmBj45XrG3jmqsuO36lNwi+RWSjDdtpUSuQwlWI9iqwxYs0N OgqAWPYWve2oC6ldVGC/sroUPAUsTjFw2wPvoJEGTtFLlFT78KF4xsXtylk1qPfJPtmc EWAiT68ziqpytBD1FcHF/TSpglGQzq1q5Vu3T33omVcTXKSculCnc1pIeiHVGDb4IIxt higQ== X-Gm-Message-State: ACrzQf3F02Gmc6ITUCGdmdG6LNCYFVtZLWTeFVoGunGcWPmCYe3yhN7n cixiztN5YUMM5Zaw+GcZr+4rqQVGsoq8cg== X-Received: by 2002:a5d:6c6b:0:b0:225:dde:ab40 with SMTP id r11-20020a5d6c6b000000b002250ddeab40mr6062380wrz.690.1667169107570; Sun, 30 Oct 2022 15:31:47 -0700 (PDT) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id m24-20020a7bca58000000b003cf47fdead5sm5370356wml.30.2022.10.30.15.31.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 30 Oct 2022 15:31:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aleksandar Rikalo , Huacai Chen , Stefan Pejic , Jiaxun Yang , Aurelien Jarno , Paul Burton , Milica Lazarevic , Richard Henderson Subject: [PULL 28/55] disas/nanomips: Delete wrapper functions Date: Sun, 30 Oct 2022 23:28:14 +0100 Message-Id: <20221030222841.42377-29-philmd@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221030222841.42377-1-philmd@linaro.org> References: <20221030222841.42377-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Milica Lazarevic Following functions just wrap the decode_gpr_gpr3() function: - encode_rs3_and_check_rs3_ge_rt3() - encode_rs3_and_check_rs3_lt_rt3() Therefore those have been deleted. Calls to these two functions have been replaced with calls to decode_gpr_gpr3. Signed-off-by: Milica Lazarevic Reviewed-by: Richard Henderson Message-Id: <20220912122635.74032-15-milica.lazarevic@syrmia.com> Signed-off-by: Philippe Mathieu-Daudé --- disas/nanomips.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/disas/nanomips.cpp b/disas/nanomips.cpp index b90be5744e..170f5c5c17 100644 --- a/disas/nanomips.cpp +++ b/disas/nanomips.cpp @@ -505,20 +505,6 @@ static int64 neg_copy(uint64 d) } -/* strange wrapper around gpr3 */ -static uint64 encode_rs3_and_check_rs3_ge_rt3(uint64 d) -{ -return decode_gpr_gpr3(d); -} - - -/* strange wrapper around gpr3 */ -static uint64 encode_rs3_and_check_rs3_lt_rt3(uint64 d) -{ - return decode_gpr_gpr3(d); -} - - static uint64 encode_count3_from_count(uint64 d) { IMGASSERTONCE(d < 8); @@ -2958,7 +2944,7 @@ static std::string BEQC_16_(uint64 instruction, Dis_info *info) uint64 rs3_value = extract_rs3_6_5_4(instruction); uint64 u_value = extract_u_3_2_1_0__s1(instruction); - std::string rs3 = GPR(encode_rs3_and_check_rs3_lt_rt3(rs3_value)); + std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); std::string u = ADDRESS(u_value, 2, info); @@ -3244,7 +3230,7 @@ static std::string BNEC_16_(uint64 instruction, Dis_info *info) uint64 rs3_value = extract_rs3_6_5_4(instruction); uint64 u_value = extract_u_3_2_1_0__s1(instruction); - std::string rs3 = GPR(encode_rs3_and_check_rs3_ge_rt3(rs3_value)); + std::string rs3 = GPR(decode_gpr_gpr3(rs3_value)); std::string rt3 = GPR(decode_gpr_gpr3(rt3_value)); std::string u = ADDRESS(u_value, 2, info);