From patchwork Thu Oct 19 18:29:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 735600 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1669402wro; Thu, 19 Oct 2023 11:37:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE9mn8QSOIHf+LSwcCB4djM7h64tC2jz+6tiYjAHasqziV4QLxGmaDVfydsSVlKUZIzRdB9 X-Received: by 2002:a0d:edc6:0:b0:59b:cfe1:bcf1 with SMTP id w189-20020a0dedc6000000b0059bcfe1bcf1mr3150442ywe.44.1697740636341; Thu, 19 Oct 2023 11:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697740636; cv=none; d=google.com; s=arc-20160816; b=rBBLk3Llze72KLTKBEfDORwMGj+vrYpvNiXqoAKLqu7ZW/OJLOd4p+8JwH1x2FlRyT lSNWF8/Dn46tmCq+Y9HJRh1RFjrWfHS+//tTr02WuUeiMF5KKFnkWDUwuFIO0t4LgC3O QSqgQqBW3lxmf9zjZnNgknA5J8SHI79u27/7IR7/qMLaDc4PKe5cYkDyosuZi/yrLgEm /dCJQgyA/eueeu9nlzTJQs1RYs9+mheQqiNxd0u34LlmMOlvv+PisL+nJNwHMusgiwA2 W6hksTE8il467zdxgJfecmU3m6aPVEIB6gOjKeu7O2BBwysk3RYeLEMhph0kXT859ib6 Savw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=wAV0MQyuUvJwJtAe5PEULJLUpPvnw9Xv2CxQWX7wnBg=; fh=rp4SvMZyvufgLOIbJsYRQQ45Pxd1jVTSEU6q8ruBOWo=; b=BEk+6qINlB9h8fT6EPR/YThOLLZJh5h8MO9EhKeNKdGQnBoFOnaM/Jx9G8zVx5ylSF YEAahWxF/ldNq5aPyef9C+LpA3G8QLwK7gzpmAmYf1Ygm6rq/g7CElsSbjJ+yBeDL3Wk Dm8sbZS5bMoJAeNKJKFLYY/2PabEIW+mlxiRE6EOi+QdcGxgO6vdjAhuZZIp0zxbjrr7 ITp61hQ332S+OkPvVmmAAGbxpgs6AORbgKohzPdLF5RasQJ3EL7LkygGSRREBsLHkQ0d c89ZiNUS24vqD030R0ce7CAw/LXVVIHJs+S5TACdgYclm93Pi/uHKDJWdCNkcFkeJ1an ykGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mT2edJl4; 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 u11-20020a05620a454b00b00767247d8e3esi14582qkp.654.2023.10.19.11.37.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 11:37:16 -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=mT2edJl4; 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 1qtXmF-0001mS-A2; Thu, 19 Oct 2023 14:29:47 -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 1qtXm6-0001HY-0W for qemu-devel@nongnu.org; Thu, 19 Oct 2023 14:29:38 -0400 Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtXm3-00071b-LF for qemu-devel@nongnu.org; Thu, 19 Oct 2023 14:29:37 -0400 Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-57b5f0d658dso6870eaf.0 for ; Thu, 19 Oct 2023 11:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697740174; x=1698344974; darn=nongnu.org; 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=wAV0MQyuUvJwJtAe5PEULJLUpPvnw9Xv2CxQWX7wnBg=; b=mT2edJl4xwQl7S+FH+YhboxieIPTU/i/2D/Fi1gLIctRubxCAUiAQt2pbg6zdjaV4o Cfr4VMZ2A9KHpjDCjaPy9KImyM7rbsCBCjI/yq+vGnRd2W80i+OIM2QJAD2QSHuySNoJ YMLJtjXZMc8eCKAfErLsLYT0g0LzChm2rNRizLUDmRZaBtVjgHfGtYfW/WUogF1cAyz1 jE+DsuKNGVOLETfq84sTxH6RMMZkNEeximTV7g3ldzHVXbW+zdJ+o4mOV7xTGFs4wyJM 4vKV5693eCeDuKDcmvonpy4CAIJoaC4CMtVcanyXz6HAuG2CIApJxtMPj0wHxkxorRAx vBLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697740174; x=1698344974; 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=wAV0MQyuUvJwJtAe5PEULJLUpPvnw9Xv2CxQWX7wnBg=; b=rEpfMjquwqhlgOaQ6x4A6IKgQrW3d/tLA4FhaDTRkQqW0uYUe/KNVfwsqAXrxEMlYo dbU+cngBY+4jAKhaGmcGzaXfzSGFu910C4YsxLdklYwqJFVA5nzU6b5UBtLKDAQxJTMK XARhI7gGT0CiX+25yyVC9AVhQK4v/Cl5pCjB78N3IfsVAJYv0CKmZeZzhTBUj+kzkVwQ rlPNpEjzrukFXa1eh5trP7nvMBuxmVrYSnC1m+27yJHfe9Uy0zTxeTuP9cFMdy7aUsyZ NqCKo4kDKcJrHMdOhC16TJcOb3CVra3/Tv/n7s19rOzjpFSad2fq9Q1hdX7LlAE5Oxqx TdPQ== X-Gm-Message-State: AOJu0YzmQ3MLQmZQajFZlt9bQVKnqT7Rt7KgIy8qPaRNxyjAbn3NCf5S pEu9mNI8yrRGyGUIVX8RPbNEXBjjU6fRVR7mQc4= X-Received: by 2002:a05:6359:5d26:b0:14d:b8d3:97e5 with SMTP id ps38-20020a0563595d2600b0014db8d397e5mr2656647rwb.20.1697740174416; Thu, 19 Oct 2023 11:29:34 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id e1-20020a630f01000000b005b856fab5e9sm72216pgl.18.2023.10.19.11.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 11:29:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, qemu-arm@nongnu.org, laurent@vivier.eu, ysato@users.sourceforge.jp, kbastian@mail.uni-paderborn.de, jcmvbkbc@gmail.com Subject: [PATCH 7/7] target/xtensa: Use tcg_gen_sextract_i32 Date: Thu, 19 Oct 2023 11:29:21 -0700 Message-Id: <20231019182921.1772928-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019182921.1772928-1-richard.henderson@linaro.org> References: <20231019182921.1772928-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c29; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc29.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé --- target/xtensa/translate.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 54bee7ddba..de89940599 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -2262,17 +2262,7 @@ static void translate_salt(DisasContext *dc, const OpcodeArg arg[], static void translate_sext(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - int shift = 31 - arg[2].imm; - - if (shift == 24) { - tcg_gen_ext8s_i32(arg[0].out, arg[1].in); - } else if (shift == 16) { - tcg_gen_ext16s_i32(arg[0].out, arg[1].in); - } else { - TCGv_i32 tmp = tcg_temp_new_i32(); - tcg_gen_shli_i32(tmp, arg[1].in, shift); - tcg_gen_sari_i32(arg[0].out, tmp, shift); - } + tcg_gen_sextract_i32(arg[0].out, arg[1].in, 0, arg[2].imm + 1); } static uint32_t test_exceptions_simcall(DisasContext *dc,