From nobody Wed Nov 19 00:18:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) client-ip=209.85.221.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613325641; cv=none; d=zohomail.com; s=zohoarc; b=Mvf1iLNAVZ9D+vX5a+KZPWnE3kw2H3erQXv+8w3TC5G9Y1XDJZBIJACLPnkWaFItyJHZQRiLT3uOtew7e5sQ3N6VbPzf35IBJSCHr83uRv7lF2jjkBeSfLrifnVhNHdHJId3g2gjoIkVD2SirrBiH5huJIUFIeZ6SGKj9SqyyZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613325641; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U+V4mgoYQ8a3cKweLkQIShkW02XCP8ivJVee8UjrEHo=; b=UYqipXdaB5J3S1lwdEndC8vhatBA3ZMNM3RGC1iwpC4LXW0mbw4xLcUVyJcOherxiUVceE13xPk64se7SkzyRsy8QoLTOc4aOUcWl4m6F58P/g/UG1RszUGowS41Up6BTCOQSvTQ9tZEKdlF2mnpFxdur3XITzdXxpUnvfGQ5a4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.zohomail.com with SMTPS id 1613325641665544.691270687232; Sun, 14 Feb 2021 10:00:41 -0800 (PST) Received: by mail-wr1-f41.google.com with SMTP id n8so6074415wrm.10 for ; Sun, 14 Feb 2021 10:00:40 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id o13sm27880973wrs.45.2021.02.14.10.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 10:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U+V4mgoYQ8a3cKweLkQIShkW02XCP8ivJVee8UjrEHo=; b=dlxzrA+zv+GRNm37c1NMndsCwHA7t/eXJkN+TKLQ7L8gf1qet5HCUdeRy5SkIs+vPf mRmq/F9leZx2LnVN5YQ5pkhU2J8u4PDXxPBnFr19zLjHvTMP/xwacLumOs2z7MSAUfLZ 5Wii+rFtl4zk+yLtDiuxLSyU9r5yQwI/DaTCyoFkO1o9vDd2YR/l3u5ug0d2OJ5SgV4O gFK4R3PqlHH4kPiQ5C2aAzSaY+jZOBSY85n8IUaNKRGUn9KwGEN3SGPmnWFVFSHiNUD4 S2O2g4/4VW+dA17wizBM1h9GQCgTJqSaRjZrbu0dcnMFV4lr8qWZasnVXr+boigIJ2Uf qzkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U+V4mgoYQ8a3cKweLkQIShkW02XCP8ivJVee8UjrEHo=; b=ZHdWzM+Eg8Val+AAfBOvdKPMiFPMm46aa/Nhcvn5hMugS/kr2xRWVNoV09GNT8c63y 22GMpyEnqnwIvh3Ju/tPAnpFysOWj22naSXNHq0b/+MwjEnJwCOk7f9tSr+zlVA5d06f rtWxE+8H0UsnV1rL/xNnEikwCtZ7BHcOc0w9+5hny9TBz+G6S7ap3ADG2htOO9aapjRw lFzbG7LYJhqHl+lEcuieUHqIQSr/cBxAbjgrCE1RgAfiLLzYZNDITHVeK/X2fWVIr0Wl xuRG64M1e6G3Qu9ceTUihSu+2NwEVG/2G9kZ+527yjv0On8F2rmeoQQGjgHhYjRmfcZk wX+g== X-Gm-Message-State: AOAM530udas1l8yQ3EZUflkvheVc0A1+OOPulnOrRhrKTGYRW/1Moaty aCM8D6rVGOvKQfc2yd3Xt4M= X-Google-Smtp-Source: ABdhPJzJKdSKdL74uaZXjTmaKRj0UWLWKTYZmp5FpyuI2vjxI/3BtMw8vUQbjIcgIwDFwfssLRkyjw== X-Received: by 2002:a05:6000:1543:: with SMTP id 3mr15024308wry.254.1613325639825; Sun, 14 Feb 2021 10:00:39 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fredrik Noring , Laurent Vivier , Jiaxun Yang , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Maciej W. Rozycki" , Thomas Huth , Aurelien Jarno , Richard Henderson , Aleksandar Rikalo Subject: [RFC PATCH 17/42] target/mips/tx79: Introduce PEXTUW (Parallel Extend Upper from Word) Date: Sun, 14 Feb 2021 18:58:47 +0100 Message-Id: <20210214175912.732946-18-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210214175912.732946-1-f4bug@amsat.org> References: <20210214175912.732946-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Introduce the PEXTUW opcode (Parallel Extend Upper from Word). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tx79.decode | 4 ++++ target/mips/tx79_translate.c | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/target/mips/tx79.decode b/target/mips/tx79.decode index d1c07c7d901..ead5f8281e5 100644 --- a/target/mips/tx79.decode +++ b/target/mips/tx79.decode @@ -35,6 +35,10 @@ PSUBW 011100 ..... ..... ..... 00001 001000 = @rs_rt_rd PSUBH 011100 ..... ..... ..... 00101 001000 @rs_rt_rd PSUBB 011100 ..... ..... ..... 01001 001000 @rs_rt_rd =20 +# MMI1 + +PEXTUW 011100 ..... ..... ..... 10010 101000 @rs_rt_rd + # MMI2 =20 PCPYLD 011100 ..... ..... ..... 01110 001001 @rs_rt_rd diff --git a/target/mips/tx79_translate.c b/target/mips/tx79_translate.c index 23146f6bfac..0a2fb28600b 100644 --- a/target/mips/tx79_translate.c +++ b/target/mips/tx79_translate.c @@ -332,6 +332,32 @@ static bool trans_PNOR(DisasContext *ctx, arg_rtype *a) * PEXTLW rd, rs, rt Parallel Extend Lower from Word */ =20 +/* Parallel Extend Upper from Word */ +static bool trans_PEXTUW(DisasContext *ctx, arg_rtype *a) +{ + TCGv_i64 ax, bx; + + if (a->rd =3D=3D 0) { + /* nop */ + return true; + } + + ax =3D tcg_temp_new_i64(); + bx =3D tcg_temp_new_i64(); + + gen_load_gpr_hi(ax, a->rs); + gen_load_gpr_hi(bx, a->rt); + + tcg_gen_deposit_i64(cpu_gpr[a->rd], bx, ax, 32, 32); + tcg_gen_shri_i64(bx, bx, 32); + tcg_gen_deposit_i64(cpu_gpr_hi[a->rd], ax, bx, 0, 32); + + tcg_temp_free(bx); + tcg_temp_free(ax); + + return true; +} + /* * Others (16 instructions) * ------------------------ --=20 2.26.2