From patchwork Mon Oct 23 18:13:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 737293 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1665864wrl; Mon, 23 Oct 2023 11:18:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFWdoKCibpd1gu0O4vM8V+mpCYEz4N9o6LXzr4OuS461YVeWrwsXKmPJFPxojo4HS28mpDt X-Received: by 2002:a05:6214:2266:b0:63f:80a0:4eea with SMTP id gs6-20020a056214226600b0063f80a04eeamr15460459qvb.24.1698085110642; Mon, 23 Oct 2023 11:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698085110; cv=none; d=google.com; s=arc-20160816; b=SRFj0kPZ1S1nbcfdeEQcIfZK4nqqY5YKwswRS+YkKMP7cYqWpPsR0CIX/6XV917jDh gDYl5koiTBTc7pnKPp+J/pJJkCMMa4kbmsXW6snuuDu1Nk608CYlRN+5Kr3GIvB505c8 3rRn18YOGF6QviT+QMoH6wv7L2gQWMJVB80pwqHdYEy0jCiXKJ1DKYoKYVEY9siaDCnc L9nqlvVJBEaDSw+Hq8NJ6olkemlajaEX5JTUJvIoFXeeylG7ESukkYbhfL9zsEHdGgVZ b95Ox2WLmEY467edohHz/f9qT5r60rB5mwEFmIwKi4j8tE9dmaairMfji1YHqv2oSZcm Y2hg== 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=zHmmFYF02i+OnY3fmwj8/XxXt0JUUTrQhyiW4ERnoxY=; fh=CYNKLrQn3/SkOzHVC+Oxp/KpGWhDzIr0x67bL1yAbP0=; b=GquKyzWqehmBrvR0O2EqXvyYSRJj9681Js9J7CC6o0L80PoWYQZnnAKkdqxGxEUrQw Brh6vbRnqWyWMoIgbV8qlX46Crfq4ugRLXXzAlsd9Ay7Gp5f3yu60xP7wUhRMblpQxd4 d3fqZZYJkxba46X0Wk81tmfvpBTQg9dVGTY83uvtSFUy8vs6jCmoer+WjZtdLsprJVoI hQYDQISxvgWhr90jXWEYC5TFeTSFN04jtPVBNCRmRxZTb7aMpYegJ21WuxIttTsG8K5p RXNAkctJMxUPgzWK+rAQIS5cdTmUmk+PfduY1vo0K6lQo7coskCVIhLbA8cHW8q1C45O lgoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xDyj7uBi; 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 m17-20020a05622a055100b004180387dcc0si5858329qtx.605.2023.10.23.11.18.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2023 11:18:30 -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=xDyj7uBi; 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 1quzRf-0006dl-Em; Mon, 23 Oct 2023 14:14:31 -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 1quzRI-00060e-58 for qemu-devel@nongnu.org; Mon, 23 Oct 2023 14:14:08 -0400 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quzRG-0008JV-JG for qemu-devel@nongnu.org; Mon, 23 Oct 2023 14:14:07 -0400 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-581f78a0206so2091588eaf.2 for ; Mon, 23 Oct 2023 11:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698084845; x=1698689645; 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=zHmmFYF02i+OnY3fmwj8/XxXt0JUUTrQhyiW4ERnoxY=; b=xDyj7uBiwUX+P9mTK1Cp7jOH4ec6tKeGipsnCJgTLNDln6sy3EfDpLleAXVZFrE4QB WExisMIM/wkJ3D410EeGeyR4WFYKycsmlvn+IiKQiWXvpWPL7zCuLfKT+A+GNC68SL0M ZkWiv9N0KD0AtbVrJ8CZlNkNxMFaL3gecWUo4atLF88x8P7v2CHU96/WcrKkDAlc/c65 syGAwYKcoxCces1BkycTrfqkM7I4F71E7zI+l2LP7hTcrC+55RXr6+kCBZ/WMcFG0i52 8aDJwonznUyMNYJKvcu+2J6RmKrIyDWYu+aHZTIFBmRPvaKSpEEVjCT/J3Ts1r5/j7OJ W6tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698084845; x=1698689645; 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=zHmmFYF02i+OnY3fmwj8/XxXt0JUUTrQhyiW4ERnoxY=; b=FWQuGxejSNQ0Xf5pHjQs9mheZe1xLJbQuv/WFSPUbhID+eRNcEeCzi+w19r1txWFLd s3DXNEHDTwfrW1vJXXFsFzyz2sv+Y7rdxV83dXtMNru0u0TeFs3C7MJApU38YpQ3OnYv z6Gep4JHYKhf/4zyzZNg5Ba1Z7FwAZvt3US/fn89hw+2ILu/IrKDukckV2B3JV6IR9Qt F/ZWXn1BUOdzWGNg0bN6wupr7BF5HjUWieI7vztLizwN8FvVMNR3UcvJ0Nq+rlTJkkeg lTBQUxlniBnpbSL2KF1MRwLtVJOWz6EXHUcmxsLsYixhyyYofqSJeHzyLg3+QXHBNWd7 a6eA== X-Gm-Message-State: AOJu0YwZW1c+jMfH3TG1mH0yomYSjLqsiz0O2JRfrximqZgxjGPe0OZi UywL3RR39aisOIscM5im7SH7+1uu0AfCD36MAM4= X-Received: by 2002:a05:6359:5c20:b0:168:e177:b2bf with SMTP id pu32-20020a0563595c2000b00168e177b2bfmr3032364rwb.5.1698084845220; Mon, 23 Oct 2023 11:14:05 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id v10-20020a65568a000000b005b83bc255fbsm5205137pgs.71.2023.10.23.11.14.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 11:14:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Max Filippov Subject: [PULL v3 38/38] target/xtensa: Use tcg_gen_sextract_i32 Date: Mon, 23 Oct 2023 11:13:29 -0700 Message-Id: <20231023181329.171490-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023181329.171490-1-richard.henderson@linaro.org> References: <20231023181329.171490-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c33; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc33.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 Reviewed-by: Max Filippov Signed-off-by: Richard Henderson --- 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,