From patchwork Tue Jul 30 01:11:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 815266 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp109922wrs; Mon, 29 Jul 2024 19:16:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhXkow0WTpA0Vcsl+Y2N1oDU3RpCKuoL2RtvoQWOB50+d9dOiEqQ8s9bK0xqMDKkctG6Jva2M7jBvj+MXToHdy X-Google-Smtp-Source: AGHT+IEbH/6Pvyb6E1BPjwCSyMyyjiG9iKRF81OJ4ZMrJUFpNuYpOGnTwlZ7O1NbfvWxR5vEPcCy X-Received: by 2002:a05:620a:4307:b0:79f:22e:94a6 with SMTP id af79cd13be357-7a1e524c75bmr1140051585a.23.1722305787666; Mon, 29 Jul 2024 19:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722305787; cv=none; d=google.com; s=arc-20160816; b=EZ6ubDBU39gvITxt81757sTkkoqvB9lUfuSLNN9kZoxXpbRmJBI2qopnUNDHj+B7Ma BihtNi083DwE420ebF7Hoy74ABQmgS2EaIquHvNtfltfhhyG5+lZ5Ml68cXHCTc7mbQG xJ2vpu4/c5PVzlTEtf1b5EB2QgjyoYkUIqsGC+Ks2srEW4701iE7DdCbIL1Wt285JbWf jZB0ib/UDfdLD+JjPmaZ+6FTdPk6TTzl370b27xj/+aXTGzAxAu5ENV+25R4nz6l7Pvp UFDsg6raK+SJVfVB1Nmi7YvB/p6P95dsUWALw8KWzQv/NzKl48b6ByOzEGRqkZyphuJC HJSQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pH+41rL90lFjbVWqrfAC1Tzfsae8MNVaqTWvWuyk3aM=; fh=LX+cLgtw9TJIDgDgLWvTr3l2mLDE8DLsNMKbDBRfU58=; b=wdUEonpSwmAUfQybhxUkTIhnfwB72HrFvFi77nSBXbXCE69qcD5jKBFpqs0W/3C+rN oT3kQpgR/KpjaoY6GzJfVJGcAGkNkSB4SiNgGeGglyihhZQvxhvuPzrdv2hgDhMO+g2q 06vJSLLDmHYrzX9miYqRsjr8olAj3hR8TUNZ8QnWh2dpWh7PzSt2ho726KKYPsStwQ0V gZzIbAXfvXhA0F+x7i7T1fVZdGyaYAQM3UiDL1g4eLFxLNCbYb+CLkonWFpL4OQKNZOe Vh8tI2nuj8siF30FDNdALpgK2ksZ4V9kwFLC+3ALoSC+s1HKbrRYSog8BcVYFrtXolwJ /sJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WoSRAcf9; 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 af79cd13be357-7a1d7474db8si1162416585a.626.2024.07.29.19.16.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 19:16:27 -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=WoSRAcf9; 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 1sYcOg-0008J4-Ef; Mon, 29 Jul 2024 22:15:30 -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 1sYcOf-0008E1-4C for qemu-devel@nongnu.org; Mon, 29 Jul 2024 22:15:29 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYcOd-0005Op-DY for qemu-devel@nongnu.org; Mon, 29 Jul 2024 22:15:28 -0400 Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7a103ac7be3so2266765a12.3 for ; Mon, 29 Jul 2024 19:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722305726; x=1722910526; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pH+41rL90lFjbVWqrfAC1Tzfsae8MNVaqTWvWuyk3aM=; b=WoSRAcf9cnJN3yCilx5XNjA4wos0JTF8TrlhYe3RCMjB166Enspeiy4BL6XtzN+Ck/ owaUNjIDiboxYuezc/41syLkHwvA2qG8lNP7oOooY52+szhI/zzK2KsPgtV4V9OiNQPg WIIK3ms75MLKrZ95VNBcYsZlbDI4/fjaOcZwwJETsjVt4gnNkZVCR63mx6BRfwRwiSIR kgVcrMrX2JPnIS/j6bZkKsvVD5yD2vZNN1TvQKcGoVheaHKqXleU+Gyb7E+06/mndYHW 49TdQgeWFYTEgk3LAoDqTqWxHSS4I0bzvxqA3rvHnEDwzqd9a73QOtEnNf3AQEAnXY1W 8Bgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722305726; x=1722910526; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pH+41rL90lFjbVWqrfAC1Tzfsae8MNVaqTWvWuyk3aM=; b=ogFpPs1xcWoackUuzb4nXVVVnDNKF3x1QKQP7qGEphdqWd54mqr/nNkjXJyliMR0aJ HjXS4A64voa0gQrp46ZuqwH6Xr+iyrPbrS5YqOfx6smTTJg4Gs0zz54ReONbxoJLI1JS J7sPE15MgcfZUF261s6+SYYQooLFJb5zjS+2hZfZc1hXG0sWVF64pjdOo8zDPFZBkDTQ xwYakm/TFwh4tsar/6MA1uA4IllX75aLAyu4+aC5GHW/FRu43CITox9/vC7Mzv9sU9m+ wL2H26jQe4ik7OjtQ/Yx/Thj4ws9NVleC/8bmha5CBRIeWtnoH1/OBLNKbjeG1PMnWBg QMLg== X-Gm-Message-State: AOJu0YxjAWZQBBTjhsivyj4lc7WtsLXyWXGdKRAtHsdPZ/GDA5eVa6zc zKdtqYWQO3xqISfDFd92NSZdO3SF86+6hW7/jwWW0flZORXuO8hj+dIzYmjbZDmHZ4tTnTsLNjh D+JE= X-Received: by 2002:a05:6e02:20e1:b0:39a:ea89:22ec with SMTP id e9e14a558f8ab-39aec2d76a3mr110796085ab.9.1722301930485; Mon, 29 Jul 2024 18:12:10 -0700 (PDT) Received: from stoup.. ([203.56.128.103]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7a9f7c6ff4bsm6750206a12.4.2024.07.29.18.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 18:12:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Thomas Huth Subject: [PULL 1/5] target/rx: Use target_ulong for address in LI Date: Tue, 30 Jul 2024 11:11:57 +1000 Message-ID: <20240730011202.480829-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240730011202.480829-1-richard.henderson@linaro.org> References: <20240730011202.480829-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x536.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;