From nobody Tue Feb 10 06:07:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 as permitted sender) client-ip=209.85.128.43; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f43.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1626037287; cv=none; d=zohomail.com; s=zohoarc; b=LIBYsTnf87evd2fbNtCVMIE9KH/0kzZeblsL4HOEIbhvWE7U8otWjn4LmdP7liJTwL+9+7myMmKTvnGCHXUhr1Q9BB2J5vQ2SlqIHN+0PODMPUS1VwedQJVgB/o+AfGaviw7uEYDn6aFNPh5Lv6/rlobxY3kBich9PDLxteexVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626037287; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Trkx+yVXbGbO/3qpNg9NqMMf32IKPJHWstTgFyfkCA4=; b=EGLDtHHS2oINaoeGZqYDU1m8nvtwvoGN3GDXrB2zUVKiV6hpWB9w0yjjDgqOw789s8I4+qWWy+97+wcdbfcBYPh3+NKVxId53dHlUF/0iBcVSEtIApKlpvRhJNuBqDYYLXXBF6NNpVjlAC+uwWP4RA31VkNfFlFUwltAOaPqg2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.zohomail.com with SMTPS id 1626037287747188.00481766531527; Sun, 11 Jul 2021 14:01:27 -0700 (PDT) Received: by mail-wm1-f43.google.com with SMTP id q18-20020a1ce9120000b02901f259f3a250so10011834wmc.2 for ; Sun, 11 Jul 2021 14:01:26 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (abayonne-654-1-142-116.w86-222.abo.wanadoo.fr. [86.222.93.116]) by smtp.gmail.com with ESMTPSA id s6sm1736564wrt.45.2021.07.11.14.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jul 2021 14:01:24 -0700 (PDT) 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=Trkx+yVXbGbO/3qpNg9NqMMf32IKPJHWstTgFyfkCA4=; b=KMnIUKv56OsQiY76irBGOpPJjlwql7KWx5XXBHOBkrJOnSj2GLZIFDHXgkK+aIZ1ZR FokF4aSyphj0AuQwl2nRAAn2BMLfhoBpRb24Fh0JI+SFu/Kqwc4MVWzqX26cegrjrpqm SuudtHi09KpZ16fB9bO4QwW6xHYZxxB2CncZIMDzAoBMxTchdH9mvPL9tjyyZW75DgLw B+fmgOkMrKQC/Whoq1/tCWRmCSFPHR5ED+8Yiob6x9X2ecKzeqygp96AP7k6eDfEO/6U 1uhErVMznxK1k7pzYuaS1ty+RZJz3YMje1X7rzmnVQ8Ol/VeMfGQ/8Tcy3KhKufQkWmB jS2Q== 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=Trkx+yVXbGbO/3qpNg9NqMMf32IKPJHWstTgFyfkCA4=; b=GpDVx9H9mBjQMEdWYZGYlytbdx0Ixugw+yvoXH2s8neffdjG5k/+55zkIo2RiJ56sg A+Q8bTUwFEhD47dJzoEV3SNbSGsg7qkjmI4z07k+M4Fb1ILkQqmCxghDZCsy5OKslGR4 o4g2PsB0g5BgQr2nr5ho1IJE87CCQyTgTpHtxaHt7E9W3KmRQdnO/WaO4K6mH2QnJC4z so+/Ni70RS9/G2c+6tp55AItjPx+pfsuT4XlP8I8XXGEpVMs3fNwSjNlqGac1lL3VjhW RXcUafwXjJMHec2pzCrdv020jnL0YmNY11eSJiGm4yHmQJJG79llTRasW5b/1itFzb+P w9pw== X-Gm-Message-State: AOAM530A94WrajcnHgp+fsZovNW/B2j94kX2BeWDQZwfQbThFWTWZUvs abDRuMD3bqZQ4kyQMaBSRYQ= X-Google-Smtp-Source: ABdhPJzXNdHxK5s6kOlWoNXNGPZbx5tvC768K/YDKmXukLKdV1HQ508FVZ7pEcHoOLqi92nf0IgSRg== X-Received: by 2002:a1c:2182:: with SMTP id h124mr6614993wmh.44.1626037285375; Sun, 11 Jul 2021 14:01:25 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Fredrik Noring , Mark Cave-Ayland , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 12/19] target/mips/tx79: Introduce SQ opcode (Store Quadword) Date: Sun, 11 Jul 2021 23:00:09 +0200 Message-Id: <20210711210016.2710100-13-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210711210016.2710100-1-f4bug@amsat.org> References: <20210711210016.2710100-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) X-ZM-MESSAGEID: 1626037289274100001 Introduce the SQ opcode (Store Quadword). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20210214175912.732946-27-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/tcg/tx79.decode | 1 + target/mips/tcg/tx79_translate.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/target/mips/tcg/tx79.decode b/target/mips/tcg/tx79.decode index 0af5c6d0ed1..03a25a5096d 100644 --- a/target/mips/tcg/tx79.decode +++ b/target/mips/tcg/tx79.decode @@ -70,3 +70,4 @@ PCPYH 011100 00000 ..... ..... 11011 101001 @= rt_rd # SPECIAL =20 LQ 011110 ..... ..... ................ @ldst +SQ 011111 ..... ..... ................ @ldst diff --git a/target/mips/tcg/tx79_translate.c b/target/mips/tcg/tx79_transl= ate.c index d9193b4d86e..395d6afa1f1 100644 --- a/target/mips/tcg/tx79_translate.c +++ b/target/mips/tcg/tx79_translate.c @@ -369,6 +369,33 @@ static bool trans_LQ(DisasContext *ctx, arg_itype *a) return true; } =20 +static bool trans_SQ(DisasContext *ctx, arg_itype *a) +{ + TCGv_i64 t0 =3D tcg_temp_new_i64(); + TCGv addr =3D tcg_temp_new(); + + gen_base_offset_addr(ctx, addr, a->base, a->offset); + /* + * Clear least-significant four bits of the effective + * address, effectively creating an aligned address. + */ + tcg_gen_andi_tl(addr, addr, ~0xf); + + /* Lower half */ + gen_load_gpr(t0, a->rt); + tcg_gen_qemu_st_i64(t0, addr, ctx->mem_idx, MO_TEQ); + + /* Upper half */ + tcg_gen_addi_i64(addr, addr, 8); + gen_load_gpr_hi(t0, a->rt); + tcg_gen_qemu_st_i64(t0, addr, ctx->mem_idx, MO_TEQ); + + tcg_temp_free(addr); + tcg_temp_free(t0); + + return true; +} + /* * Multiply and Divide (19 instructions) * ------------------------------------- --=20 2.31.1