get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2225869/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2225869,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2225869/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421-mips-octeon-missing-insns-v2-v2-4-a0791df188c9@gmail.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260421-mips-octeon-missing-insns-v2-v2-4-a0791df188c9@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-21T17:27:31",
    "name": "[v2,04/13] target/mips: use explicit i64 TCG ops for Octeon translation",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1c1d69d330fd9fd28fb5588e28ffad6d71096f11",
    "submitter": {
        "id": 66301,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/66301/?format=api",
        "name": "James Hilliard",
        "email": "james.hilliard1@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260421-mips-octeon-missing-insns-v2-v2-4-a0791df188c9@gmail.com/mbox/",
    "series": [
        {
            "id": 500858,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500858/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=500858",
            "date": "2026-04-21T17:27:27",
            "name": "target/mips: add missing Octeon user-mode support",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500858/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225869/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225869/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=hwfD3oZN;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0Tqj5sTcz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 03:29:21 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wFEtR-000434-Fr; Tue, 21 Apr 2026 13:28:13 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <james.hilliard1@gmail.com>)\n id 1wFEtB-0003nT-Sx\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 13:27:59 -0400",
            "from mail-oa1-x36.google.com ([2001:4860:4864:20::36])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <james.hilliard1@gmail.com>)\n id 1wFEt6-0006hS-GW\n for qemu-devel@nongnu.org; Tue, 21 Apr 2026 13:27:55 -0400",
            "by mail-oa1-x36.google.com with SMTP id\n 586e51a60fabf-41708f6c3feso2904203fac.3\n for <qemu-devel@nongnu.org>; Tue, 21 Apr 2026 10:27:44 -0700 (PDT)",
            "from mac.localdomain (97-118-149-104.hlrn.qwest.net.\n [97.118.149.104]) by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-42b8fe2c52bsm12209290fac.0.2026.04.21.10.27.42\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 21 Apr 2026 10:27:42 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776792463; x=1777397263; darn=nongnu.org;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=mfdyYv/dTUTBorCKUtHWx0TpDUjZosLCy+lrLFfRytI=;\n b=hwfD3oZNj2o4QL5AwNjmvhyX9LrVVc1JHOtQdbSQWMEsfFHTqFVdUraN7RQHD/11tk\n /cO7tDf/G0wcFhykfUJIjogURpgnL9IgX73bFZ7pTbLdyI1bUDhkSnOeak/ykj3v3lX6\n 1irxuaCWwLFnnAnMcrzOsi2+HAX5D6ZR0UPjo+dAr7QbtNjNi3NpbrjBVdGEQzCuFlH2\n kkkhpn7xzt9Z/oY9Xnxh2zyXOtHzG7ekjEut72jOjrgcjNKtutpuS2SYGCEQwGSN9XNw\n NahIr12lZeA5Tlid0a1X20A92jEua/KXXoL6szTanxYFKEkzMx7aAqf+KoINpvO9/410\n jUfg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776792463; x=1777397263;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=mfdyYv/dTUTBorCKUtHWx0TpDUjZosLCy+lrLFfRytI=;\n b=DoI3h45dbKqUfWLelEr9aDvPN8LeLo6Ig6O+xQb2Jau3shsaKXkVMDdZ98Eu6jeGww\n LCWPVDIVn7G+Ixb37yij88ZAQe8MKw5s8lObAs319zNWOE2WVU+yZPCOvPnqSSc+GRdR\n sD6lSo/WLjZ71ckOol58c69AegQKgZHH7gPU1d7YmqQpsauGaP7oOqLOoDHk9KvWn+WX\n GfSN0nQw+ya+4nX4V0GFfpx84Z0nwR6ZxoVCAa13K2gT2mYxcXz+44f3Q6kwLSq3yP69\n JIMUO8ZXw/VXROhKV6SSci55u+4WthDsa9QfkqIqvV7E+0wU8CUgd/WVYd67Us43Stcx\n vOQg==",
        "X-Gm-Message-State": "AOJu0Yxs+zT0CJ8bDylV9kSQiKEVHmq7XWhPLFrTHnnb5tjU5ukfooF1\n GQ3C7oRrY8gEKOIk2EJwTlW45w3kzWoH+ol3uL+CKjnJd8jh5j5aAdS8",
        "X-Gm-Gg": "AeBDietJN9aqtpzaB0D4dCaa6hbSdZQz1g8q9igDOsYJz/+JCRvIMbPrtDXMw61vPUb\n sXKbWf9N/IdtWeVugzMpDyQM2I7YQ1Tk98myciYXhpNLauAPs6Sh0U2zZE/6tBMWGgwEo1VqkjV\n AVFZlrgQI6kqKV7KQdygmskj1JVzmvjN+Jb7zAXktLGqXD/SM8YXpC9uTenysqGASSYqnMRWv0a\n qMNR76LNTh5XQruuDSyOYPOTfZ/wc3pZNZOfxIjSRA7vi1NbkkJT0LSET6zCh0tT3CnWd0LSGQn\n DYPPuIHBi/a0qRaY4az6nj7Ev0569CXw3uRqwpwWoZjS/pCc+DWvboUJwTLJ1E7o42g7JqrM+2g\n XVUaCX93TgIM6CQKcmxtA+4LIihPGVwIZC66+itnm9ZCjla0Ri7eZffrdEp0gnw6kwzyro6nFGR\n 1K3ykJZKPVnSk0HEGVIxDWESpqXKnYzhPD+GN02t4WhcAMwQ70HB6TJFwhugi3D5m2Pbb7tm6gx\n C9ApmtjriibUDj0yG2Fixx3M2YV3sUaJ79oTcvveee7dUEocooczkCO26Z9rel4ooZ0AvdZ3mkl\n iQdiMjwJGnrJEYi1",
        "X-Received": "by 2002:a05:6870:44d1:b0:3f1:6d93:4386 with SMTP id\n 586e51a60fabf-42abf2171f5mr11561447fac.1.1776792462967;\n Tue, 21 Apr 2026 10:27:42 -0700 (PDT)",
        "From": "James Hilliard <james.hilliard1@gmail.com>",
        "Date": "Tue, 21 Apr 2026 11:27:31 -0600",
        "Subject": "[PATCH v2 04/13] target/mips: use explicit i64 TCG ops for Octeon\n translation",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "\n <20260421-mips-octeon-missing-insns-v2-v2-4-a0791df188c9@gmail.com>",
        "References": "\n <20260421-mips-octeon-missing-insns-v2-v2-0-a0791df188c9@gmail.com>",
        "In-Reply-To": "\n <20260421-mips-octeon-missing-insns-v2-v2-0-a0791df188c9@gmail.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Laurent Vivier <laurent@vivier.eu>,\n  Pierrick Bouvier <pierrick.bouvier@linaro.org>, =?utf-8?q?Philippe_Mathieu?=\n\t=?utf-8?q?-Daud=C3=A9?= <philmd@linaro.org>,\n  Aurelien Jarno <aurelien@aurel32.net>,\n  Jiaxun Yang <jiaxun.yang@flygoat.com>,\n  Aleksandar Rikalo <arikalo@gmail.com>, Huacai Chen <chenhuacai@kernel.org>,\n  James Hilliard <james.hilliard1@gmail.com>",
        "X-Mailer": "b4 0.15.2",
        "Received-SPF": "pass client-ip=2001:4860:4864:20::36;\n envelope-from=james.hilliard1@gmail.com; helo=mail-oa1-x36.google.com",
        "X-Spam_score_int": "-17",
        "X-Spam_score": "-1.8",
        "X-Spam_bar": "-",
        "X-Spam_report": "(-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n 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": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "Octeon instructions are only available on 64-bit CPUs. Use explicit i64\nTCG temporaries and operations in the existing Octeon translator paths,\nand reject 64-bit-only forms when decoding for a non-64-bit target.\n\nThis matches the architectural restriction directly and avoids depending\non target_ulong width in translator code that is only valid for MIPS64.\n\nSigned-off-by: James Hilliard <james.hilliard1@gmail.com>\n---\n target/mips/tcg/octeon_translate.c | 76 +++++++++++++++++++++++---------------\n 1 file changed, 47 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/target/mips/tcg/octeon_translate.c b/target/mips/tcg/octeon_translate.c\nindex fce01eb196..73090ce6d8 100644\n--- a/target/mips/tcg/octeon_translate.c\n+++ b/target/mips/tcg/octeon_translate.c\n@@ -13,9 +13,15 @@\n /* Include the auto-generated decoder.  */\n #include \"decode-octeon.c.inc\"\n \n+static bool octeon_check_64(DisasContext *ctx)\n+{\n+    check_mips_64(ctx);\n+    return ctx->base.is_jmp == DISAS_NEXT;\n+}\n+\n static bool trans_BBIT(DisasContext *ctx, arg_BBIT *a)\n {\n-    TCGv p;\n+    TCGv_i64 p;\n \n     if (ctx->hflags & MIPS_HFLAG_BMASK) {\n         LOG_DISAS(\"Branch in delay / forbidden slot at PC 0x%\" VADDR_PRIx \"\\n\",\n@@ -25,14 +31,14 @@ static bool trans_BBIT(DisasContext *ctx, arg_BBIT *a)\n     }\n \n     /* Load needed operands */\n-    TCGv t0 = tcg_temp_new();\n+    TCGv_i64 t0 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n \n-    p = tcg_constant_tl(1ULL << a->p);\n+    p = tcg_constant_i64(1ULL << a->p);\n     if (a->set) {\n-        tcg_gen_and_tl(bcond, p, t0);\n+        tcg_gen_and_i64(bcond, p, t0);\n     } else {\n-        tcg_gen_andc_tl(bcond, p, t0);\n+        tcg_gen_andc_i64(bcond, p, t0);\n     }\n \n     ctx->hflags |= MIPS_HFLAG_BC;\n@@ -43,15 +49,15 @@ static bool trans_BBIT(DisasContext *ctx, arg_BBIT *a)\n \n static bool trans_BADDU(DisasContext *ctx, arg_BADDU *a)\n {\n-    TCGv t0, t1;\n+    TCGv_i64 t0, t1;\n \n     if (a->rd == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n-    t1 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n+    t1 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n     gen_load_gpr(t1, a->rt);\n \n@@ -63,15 +69,19 @@ static bool trans_BADDU(DisasContext *ctx, arg_BADDU *a)\n \n static bool trans_DMUL(DisasContext *ctx, arg_DMUL *a)\n {\n-    TCGv t0, t1;\n+    TCGv_i64 t0, t1;\n+\n+    if (!octeon_check_64(ctx)) {\n+        return true;\n+    }\n \n     if (a->rd == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n-    t1 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n+    t1 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n     gen_load_gpr(t1, a->rt);\n \n@@ -82,74 +92,78 @@ static bool trans_DMUL(DisasContext *ctx, arg_DMUL *a)\n \n static bool trans_EXTS(DisasContext *ctx, arg_EXTS *a)\n {\n-    TCGv t0;\n+    TCGv_i64 t0;\n \n     if (a->rt == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n-    tcg_gen_sextract_tl(t0, t0, a->p, a->lenm1 + 1);\n+    tcg_gen_sextract_i64(t0, t0, a->p, a->lenm1 + 1);\n     gen_store_gpr(t0, a->rt);\n     return true;\n }\n \n static bool trans_CINS(DisasContext *ctx, arg_CINS *a)\n {\n-    TCGv t0;\n+    TCGv_i64 t0;\n \n     if (a->rt == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n-    tcg_gen_deposit_z_tl(t0, t0, a->p, a->lenm1 + 1);\n+    tcg_gen_deposit_z_i64(t0, t0, a->p, a->lenm1 + 1);\n     gen_store_gpr(t0, a->rt);\n     return true;\n }\n \n static bool trans_POP(DisasContext *ctx, arg_POP *a)\n {\n-    TCGv t0;\n+    TCGv_i64 t0;\n+\n+    if (a->dw && !octeon_check_64(ctx)) {\n+        return true;\n+    }\n \n     if (a->rd == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n     gen_load_gpr(t0, a->rs);\n     if (!a->dw) {\n         tcg_gen_andi_i64(t0, t0, 0xffffffff);\n     }\n-    tcg_gen_ctpop_tl(t0, t0);\n+    tcg_gen_ctpop_i64(t0, t0);\n     gen_store_gpr(t0, a->rd);\n     return true;\n }\n \n static bool trans_seqne(DisasContext *ctx, const arg_cmp3 *a)\n {\n-    TCGv t0, t1;\n+    TCGv_i64 t0, t1;\n \n     if (a->rd == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n-    t1 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n+    t1 = tcg_temp_new_i64();\n \n     gen_load_gpr(t0, a->rs);\n     gen_load_gpr(t1, a->rt);\n \n     if (a->ne) {\n-        tcg_gen_setcond_tl(TCG_COND_NE, cpu_gpr[a->rd], t1, t0);\n+        tcg_gen_setcond_i64(TCG_COND_NE, cpu_gpr[a->rd], t1, t0);\n     } else {\n-        tcg_gen_setcond_tl(TCG_COND_EQ, cpu_gpr[a->rd], t1, t0);\n+        tcg_gen_setcond_i64(TCG_COND_EQ, cpu_gpr[a->rd], t1, t0);\n     }\n     return true;\n }\n@@ -166,23 +180,23 @@ static bool trans_SNE(DisasContext *ctx, arg_cmp3 *a)\n \n static bool trans_seqnei(DisasContext *ctx, const arg_cmpi *a)\n {\n-    TCGv t0;\n+    TCGv_i64 t0;\n \n     if (a->rt == 0) {\n         /* nop */\n         return true;\n     }\n \n-    t0 = tcg_temp_new();\n+    t0 = tcg_temp_new_i64();\n \n     gen_load_gpr(t0, a->rs);\n \n     /* Sign-extend to 64 bit value */\n     int64_t imm = a->imm;\n     if (a->ne) {\n-        tcg_gen_setcondi_tl(TCG_COND_NE, cpu_gpr[a->rt], t0, imm);\n+        tcg_gen_setcondi_i64(TCG_COND_NE, cpu_gpr[a->rt], t0, imm);\n     } else {\n-        tcg_gen_setcondi_tl(TCG_COND_EQ, cpu_gpr[a->rt], t0, imm);\n+        tcg_gen_setcondi_i64(TCG_COND_EQ, cpu_gpr[a->rt], t0, imm);\n     }\n     return true;\n }\n@@ -199,6 +213,10 @@ static bool trans_SNEI(DisasContext *ctx, arg_cmpi *a)\n \n static bool trans_lx(DisasContext *ctx, arg_lx *a, MemOp mop)\n {\n+    if (mop == MO_UQ && !octeon_check_64(ctx)) {\n+        return true;\n+    }\n+\n     gen_lx(ctx, a->rd, a->base, a->index, mop);\n \n     return true;\n",
    "prefixes": [
        "v2",
        "04/13"
    ]
}