From nobody Wed Nov 19 00:14:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613325686; cv=none; d=zohomail.com; s=zohoarc; b=ghL8O1hbUkdZrSRyZjaw5fbkW8pKBZu/m2c63XBqAH8V9im5iOiJ+nnRzeJxZPxhuoLkaJbyzyQVx0/iomSXlHHgreJJo1DLgpklNvlI4A1VTJ0hDLJ+rE3kOAU7lnfvGejXEhLC2CD8HRFugqvPICMndyd3Tn7Erq/F/8TiGpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613325686; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OHI9+2iJLTvRrWFTQN2s8ImAvRqlxsnv2mLO+JxxUWA=; b=hE/UTlMZeEssEjy1vFQqB18BLk7m3GZcrxIowkE05aWm3AyQ2Ng31izwkPOP1xPkLBICYIGSPCwoSfMyGZ+zkWkeO4VcsmLO8oz1Jg/huB9MaEEtsfBr6XGDSnGthc1PfUnat5kckohfNbjQGKA2DBORULRjvslOlPwMhVp9LUg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 1613325686489416.9705796403713; Sun, 14 Feb 2021 10:01:26 -0800 (PST) Received: by mail-wm1-f53.google.com with SMTP id z63so540963wmg.4 for ; Sun, 14 Feb 2021 10:01:26 -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 d15sm16117354wru.80.2021.02.14.10.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 10:01:24 -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=OHI9+2iJLTvRrWFTQN2s8ImAvRqlxsnv2mLO+JxxUWA=; b=H5Br+EJ7FHHEJL5ifZ7ef5dlAsBMr9Zl4Ry0J2stKzhQWhcNHmAtbkaLPbfkdTRcrM sS4ALuIaY7ggtNjvoVuz5OcEPy8rpiBwy1wZGQh9IypFMQucmL8kEl4itAa0j6zG91cJ +EAScVVN7eC/iKdUw5rQNr4c6R9FwbdElBwKh2aHHxoy9qkwsmpJul/lf2WjmMKJvWZZ xw73Mdol7USRfYfCfEOmRofW56ZtveWqu02+Rj0XwcPziXPFQzw4nzbQ3N/1LRGAt0Tq 9+GDLgSQzakgyIZ2wykCkz9KSzbAR7iRyL382/vECig55I0i0U6bOjSu4aZ2hHnEbBL5 aEUA== 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=OHI9+2iJLTvRrWFTQN2s8ImAvRqlxsnv2mLO+JxxUWA=; b=oQ2DCmXvj3u49BUEAKLEYobQD3hC836VpR7/CwXWIhq7KVCQjDcsai9xTijQc1L1k8 GGfu9dV0WtaqYtJw3b0Ag65aqzdI7Dgw2G2JECDTYxr+bcQ/y9yCOGjpVwdVzYbNPYKR aYsQigi+/uxBxcQacvOhBCK4cbT0R+4P2QZWZCMwaEk3FLY0olS2WZlrmu4aB/ywsZqX 1eTuZcq0GhJm1CXdA1W13rSRuxz+wbqigNUFmejQi01je/V7lgJlRyQYvfdFvY32+8QH KGOh4lOeYL1fgOq43KE4nSVJ5uLtUoTOGHUdUCsaddFPR9RWtKoFwc+A4bbvNAHgc+Bx XYmg== X-Gm-Message-State: AOAM532lk/jNj6mtnOKyvZdbpNN8M5EbKRoAw+X3CZTJ2bBZCRNcDC+B SNtXwD1e4M0FljkvoTW3Yto= X-Google-Smtp-Source: ABdhPJxvSDW8F1/5k9Lq5SpQr/y819cLaiv48VAcuLz01Vc73xr28V2TYBrKs3h0J4/gRzV+RdT8RQ== X-Received: by 2002:a1c:f203:: with SMTP id s3mr11048487wmc.152.1613325685147; Sun, 14 Feb 2021 10:01:25 -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 26/42] target/mips/tx79: Introduce SQ opcode (Store Quadword) Date: Sun, 14 Feb 2021 18:58:56 +0100 Message-Id: <20210214175912.732946-27-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 SQ opcode (Store Quadword). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/mips/tx79.decode | 1 + target/mips/tx79_translate.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/target/mips/tx79.decode b/target/mips/tx79.decode index b5396f48c2d..f1cb7ebfa3c 100644 --- a/target/mips/tx79.decode +++ b/target/mips/tx79.decode @@ -73,3 +73,4 @@ PCPYH 011100 00000 ..... ..... 11011 101001 @= rt_rd # SPECIAL =20 LQ 011110 ..... ..... ................ @ldst +SQ 011111 ..... ..... ................ @ldst diff --git a/target/mips/tx79_translate.c b/target/mips/tx79_translate.c index 293efd7bd06..386bae7808b 100644 --- a/target/mips/tx79_translate.c +++ b/target/mips/tx79_translate.c @@ -411,6 +411,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 halve */ + gen_load_gpr(t0, a->rt); + tcg_gen_qemu_st_i64(t0, addr, ctx->mem_idx, MO_TEQ); + + /* Upper halve */ + 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.26.2