From patchwork Mon Oct 23 18:13:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 737294 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1665911wrl; Mon, 23 Oct 2023 11:18:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIroDxwFMDRN67d/I1ei5qzrBPmqt+sv6pD1F5oi5snbIXCRdil0Nu/eQQLsefVPYS6MUs X-Received: by 2002:ac8:7f0b:0:b0:417:fe9c:6dce with SMTP id f11-20020ac87f0b000000b00417fe9c6dcemr12885494qtk.25.1698085116474; Mon, 23 Oct 2023 11:18:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698085116; cv=none; d=google.com; s=arc-20160816; b=kQ/CAZ1uoPBoihUAzsiYgwrpk5EfM2P+9pEll7RGJFYWKtqkcQXr2z4vdtbWvYhBTM tq6mirSdMr+KFlc+Wxa0HZ4L2oyL8hbkZubom8BFFFw156rW7KzfJHZKo4gILwsl3nlK RX98BQ07I1umeZvINZsGtt98HBvfsqfKUgMl9sgnL5ljpE6JRnzJ9MT0XsSObrPKGGXK fJyuCMQQk/WsRv6jddTDZ0ZuWYaXsciAWwaEdknKtEHmUjLpE5NtcJ5oShb6tlxJj2j7 ogfgb9w2aWHPcTW+uuBANL5U/P9KNIsmLGTKfVWfv/V5HCzs+jgLeMtMmUiEc0G+Y9yY Unsw== 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=MhCC9XTd6nS9RO+tM5LcavZGdQ2zIqBqYuneDU4EEqo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=fCSV2Tt+Re1UjQQ0pWmSSgLGnugu7XNrG8iz925rRqfev1eXXnL9qZJLownAWQgC1H kF3BmLG03DfpxPcG8yuWPpscxeiQUOLZiD9CVM6HlUr0eLw2AkibtqJ+XqmAwLEChB79 bcoDVm3ioktdCHfQe4lF5dkFEczGfIbDTGv+5fcnRxICSzPzKRKLnLbV3Zeyu14ZVKYr WASCE/Hhdmziksybwx60Ja8NK3MYtXA316YCOGDMbG+uuajkfdIaRdE3cZSbZxz7nfZ0 xRHj8LxmZiv3C+Z6ppVtvxlYEzn4LolGY5iLDct+vu2e+IVj2IPhkMOZeFGgafexjmLr X41w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EbQFiyYu; 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 s11-20020a05622a178b00b0041981d576c3si5519387qtk.595.2023.10.23.11.18.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Oct 2023 11:18:36 -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=EbQFiyYu; 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 1quzRI-00061o-AJ; Mon, 23 Oct 2023 14:14:08 -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 1quzRD-0005ja-W5 for qemu-devel@nongnu.org; Mon, 23 Oct 2023 14:14:04 -0400 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quzRC-0008Ic-GD for qemu-devel@nongnu.org; Mon, 23 Oct 2023 14:14:03 -0400 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-58441865ffaso1326698eaf.1 for ; Mon, 23 Oct 2023 11:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698084841; x=1698689641; 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=MhCC9XTd6nS9RO+tM5LcavZGdQ2zIqBqYuneDU4EEqo=; b=EbQFiyYu1JIWNdonw6t1qltXCI1VT/lz2m34STwT3n7F5RrcLOLguQ9Eq8kGd92aeW pRZ5JAhxcgToafDdK6rQAY8q8MOiYnyaABG1YxpOH+HYbSvh/7ETXNYUIY3GpWEdNMUe QPiz3Bqb8wfVQcNzkJrcM8cvTJ0oC9f/+nPkAxRjIsahB6QejGVKPnnE+e1QjCdYW7z/ 5tEXlK3vi0bG/NWUy3jbJ3F/NbkTmXnoHHVLyhl2hgN2VxZnzKLiPBMQbUON2PtFzERy FAAy1O1Is/aQdfntwfA+8vYo+sH6RQa1vKA11qbv2IJ+PeRqxn+MXLxeAJCs5GOorsUT Du1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698084841; x=1698689641; 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=MhCC9XTd6nS9RO+tM5LcavZGdQ2zIqBqYuneDU4EEqo=; b=qOUEgKYJNNCcqwPz49/a1InaXX9Yjq3LlilWF97ruQ7F5k65pNUqsnCnVuT0kThldt vZO429Ob5hUQe+l9zyuQABkH48yEZP3Z4yMgGVv2TFfkzoSYSeTYsNE2F4WItLTScPwQ PvxrcvlFEFohTKlJpMHOXzDC1XR4aBAbnyYY3XLhA177hs5zMJiDGhv6FXt7ezfHR/pr kSndAIE8/a95BzE1/O76bDYNtNfk1bLBAhE/jDo5TgZH8QBSSYb8eDZhoHvb/3Q7muLK z99WHFrCPHHpKaOt4yNyZEwW1bwXh0wCaN5GGGdbUQc12071ccGb1KBfPiX5OA+rWUx/ fqPg== X-Gm-Message-State: AOJu0Yy/9ZQDGGC//ahreRJS/7rk1IwA2bEXNS0VxmJ3uegOIGGKiQ7d IioRq8Z2B54aiGGTiudXuvOVakQ7/GjzA/9c35U= X-Received: by 2002:a05:6359:593:b0:168:e9d2:6568 with SMTP id ee19-20020a056359059300b00168e9d26568mr1568841rwb.25.1698084841422; Mon, 23 Oct 2023 11:14:01 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id v10-20020a65568a000000b005b83bc255fbsm5205137pgs.71.2023.10.23.11.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 11:14:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v3 34/38] target/i386: Use tcg_gen_ext_tl Date: Mon, 23 Oct 2023 11:13:25 -0700 Message-Id: <20231023181329.171490-35-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::c36; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc36.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: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/i386/tcg/translate.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 18d06ab247..587d88692a 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -701,33 +701,11 @@ static inline void gen_op_movl_T0_Dshift(DisasContext *s, MemOp ot) static TCGv gen_ext_tl(TCGv dst, TCGv src, MemOp size, bool sign) { - switch (size) { - case MO_8: - if (sign) { - tcg_gen_ext8s_tl(dst, src); - } else { - tcg_gen_ext8u_tl(dst, src); - } - return dst; - case MO_16: - if (sign) { - tcg_gen_ext16s_tl(dst, src); - } else { - tcg_gen_ext16u_tl(dst, src); - } - return dst; -#ifdef TARGET_X86_64 - case MO_32: - if (sign) { - tcg_gen_ext32s_tl(dst, src); - } else { - tcg_gen_ext32u_tl(dst, src); - } - return dst; -#endif - default: + if (size == MO_TL) { return src; } + tcg_gen_ext_tl(dst, src, size | (sign ? MO_SIGN : 0)); + return dst; } static void gen_extu(MemOp ot, TCGv reg)