From patchwork Wed Jul 24 04:56:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 814123 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2603398wro; Tue, 23 Jul 2024 21:57:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWOVD1cH84zQO5qkZn6NJCk1keZ4htnbemWlqu8JZvvDF+YxC5WOLsuMPyLuKoSyCvMjfhaqbMAnthTDi5osG7E X-Google-Smtp-Source: AGHT+IFBu8wJ50ewiMU/9FPRHNVjHCqcVDz8G5kxpkyOENJ3K6aUtI4mhQ4n6wJmgFaMOFI446T6 X-Received: by 2002:a05:620a:4141:b0:79f:18f1:b6e6 with SMTP id af79cd13be357-7a1ccb3b159mr117072485a.10.1721797063163; Tue, 23 Jul 2024 21:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721797063; cv=none; d=google.com; s=arc-20160816; b=AMkhMKS2LT6rdcN7tepIjMbFrfLxv6qSsF36wYZzNXfm/p1Yw9Xu/RqI1iLpzXVL40 5ajsL/6uGwHKRch+h5Lrl6os6adiAHMMh5/3WmS0bzfQCcd/yZP2mdlg8bcpEgy6JB44 8g4szhA0nacON5zoZTFHpOSmj0YZJEq0nUpWqf1GZ5wM6Hz7N9FtxmDsVA/PMN/iiLh1 Y5TnFGPc4J498GwzlqzSebrdq2lLIGgYB6mWcL9cWa4yUEQmZI7XO+8FT+ON1yvubBJn QKZJH7lNmP92upu1LhPrsYu19juFyKb5cOPk4lhPt5PaGWFGa+IGSmFezQtVVOzY6daO 6NPg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=K/CnMhuvnZ2rqnpBp7fJkM6WGv4i8Jdhm4C9UBOmEGg=; fh=I8xFnX5KDVq4DYzvRAZAxMbsrFFEMdxcbdwLV44W9IY=; b=mdnjmqPpyP4vy3QLEwuO4VvzZgpsDoxOiZsxvns0c5ogenVib6Fn/c7NO5gbzgZ+da SmU4ZpMHIi0dQaVZQe0HfDpCfMrOkwU+MEcSf0V2uFSozNJm3KsxhrCxs9Mjg7kQ60IB pbmbhDw/oPUG7EulEEtuFQ5wbxCa/TWMfRbVhtGtByQ8z86G1T66UHBVxJ0kv9C83sdP Q6N56E1levlUJeXvn0zMokYLWgFIAiiC3V/izgYrhXbswEcBGVO8l7mpkoVlNQr02F0r +UFuzoG46ih21AMVGlB+K0lH3s92WU7IH3vYvpnulxc0kjPJzZncF5k5p5rjXXcE96wR WL4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xkNpfyc/"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44f9cdbb640si121093101cf.306.2024.07.23.21.57.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2024 21:57:43 -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="xkNpfyc/"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWU3u-0001e0-W4; Wed, 24 Jul 2024 00:57:15 -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 1sWU3r-0001d7-JL for qemu-devel@nongnu.org; Wed, 24 Jul 2024 00:57:11 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWU3n-0002J2-P8 for qemu-devel@nongnu.org; Wed, 24 Jul 2024 00:57:09 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-7a2123e9ad5so347695a12.1 for ; Tue, 23 Jul 2024 21:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721797026; x=1722401826; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=K/CnMhuvnZ2rqnpBp7fJkM6WGv4i8Jdhm4C9UBOmEGg=; b=xkNpfyc/KL8PuliyGRqFhAGTZasFbGiulKn56dK1Slrkr3w0wEsrC2jMOAvboUnrdO +OcZL5kX5jmOjzlKn6KoRnCsINe/vmbAXJn7+TJpv0UZ/Vc8pvMIrdv6Wn/Z6kubU0hH WW0doMaTFkm06gAlgwsEyByadRU1VaZE36PMeJaseUbQNRV1nCaN+GXfezs2BcPKkpab fUaGbzsUf/JDCIsvkC5lfPgdtSjoH87kWpffnii8B6hi7yF/QP0jnTpJiWRv6eN5Mu53 kFJZ1vWkQT7SVpuA9dL7XxZs9xRFLtgh9Nq1sdy0WkX3HZf0pZbpElspl7tL1hmg7EBZ pdXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721797026; x=1722401826; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K/CnMhuvnZ2rqnpBp7fJkM6WGv4i8Jdhm4C9UBOmEGg=; b=jFyRJAakdXERECSwcCS18D1HS1I+T6S3oF8HY/0HIgT1TqucHQjX4ujDDEeOUHpNJa A4OupG3/M9pH1qG02wHOM69/CdcjFX1+tTntm//yeyPhLqbO4XlZVa76lsqQfBIBBtkG BtUOunVKsN0zICFdUx0L86vGGqZrLola/H7He9vLpkLa6cIUVKmtjVZMxL9glw5/tCZG tKXYPieWUSdvypAhAyt2WIFkoKFbThRFPFr4Fhi4HrHeMf88R8IHRwjj8H943cjrS8XQ 56Zkzl+A7tOZJQAm//ARpqrxubpI1mVRnFM/xUt4RoAL0QhTbqwHM1t6j+dSBkpuPKs5 aK8g== X-Gm-Message-State: AOJu0YyXdhQ8JOMEcAQ3PtHU1HaHUArxAZH+dzi/pnNmFdQKiq049zdP v0NXEpnd4ha5uOdvHoC7/XsIjjAF/AMe/CWfpzYSjxcBdkFrYBkezcOGoUkUZan17IPM/EgXoTi UBrwi9A== X-Received: by 2002:a17:90b:33cb:b0:2c9:75a7:5c25 with SMTP id 98e67ed59e1d1-2cdb9443005mr1255550a91.15.1721797026084; Tue, 23 Jul 2024 21:57:06 -0700 (PDT) Received: from stoup.. ([203.56.128.103]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2cd8f73bd52sm994975a91.1.2024.07.23.21.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 21:57:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: thuth@redhat.com Subject: [PATCH] target/rx: Use target_ulong for address in LI Date: Wed, 24 Jul 2024 14:56:59 +1000 Message-ID: <20240724045659.160684-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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 Using int32_t meant that the address was sign-extended to uint64_t when passing to translator_ld*, triggering an assert. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2453 Signed-off-by: Richard Henderson Tested-by: Thomas Huth --- target/rx/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/rx/translate.c b/target/rx/translate.c index 9b81cf20b3..9aade2b6e5 100644 --- a/target/rx/translate.c +++ b/target/rx/translate.c @@ -85,7 +85,8 @@ static uint32_t decode_load_bytes(DisasContext *ctx, uint32_t insn, static uint32_t li(DisasContext *ctx, int sz) { - int32_t tmp, addr; + target_ulong addr; + uint32_t tmp; CPURXState *env = ctx->env; addr = ctx->base.pc_next;