From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05FF517A31C for ; Mon, 20 Apr 2026 15:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700698; cv=none; b=i2Nv40IVlG9NGnmk3XLz68zZb0QRCVR3HBZg5zW5jsadqGODpjlqx+KPBuyEW7o81BSXo7678E4Or6E+k/cbFDhcZOtVX2gjOwMiFPy4HH+PxIKM45VzTk8Oucw5FItbjOfl2e5u1vzCN9R+y6e65CO8aLyHTnJRHtn8jEq5pDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776700698; c=relaxed/simple; bh=WeQrNH+8tZ788Sdhs+9QZmPpCzChujYYL1I3zK1FxWA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YyjMEl+AiFFGEDPd8ItSoh14PPcSfoiS8TVGw26f1v07Hf44JQjH6HVl35y19DGOOSVGRlAmK+pzo8Z7Q9Q6kTOPyQupeviN9fOa70XIWyqb16ZRX8JiPU03nFYDnDX8XhfZnpU9zsQMAo+efO51Yt44fZjhafaoLtxZ3iQsT6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=bsE+8p5X; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="bsE+8p5X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1776700688; bh=WeQrNH+8tZ788Sdhs+9QZmPpCzChujYYL1I3zK1FxWA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bsE+8p5XdaciLFDDt7zmrFvcx5VzijWfHmZWU0eUZQRWbmknd3kTv3nP3jRIK0GTr PsgZsWFyKTVUWm1L3DUFYYImPUl1yAOfZYYc3MJ3GtQonRWEbMJTd+XIdnjQlyOqrF qH4W0zubrr4SOMmsek20/9tYcFpDqiodnprV5NZA= Date: Mon, 20 Apr 2026 17:58:07 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: David Laight Cc: Willy Tarreau , Daniel Palmer , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/7] tools/nolibc: handle 64-bit system call arguments on MIPS N32 Message-ID: <00d91bf0-b01e-473e-a48c-d944ce0a3d86@t-8ch.de> References: <20260418-nolibc-largefile-v1-0-b91f0775bac3@weissschuh.net> <20260418-nolibc-largefile-v1-5-b91f0775bac3@weissschuh.net> <20260418121442.6ca95de1@pumpkin> <20260419223507.1dc5554a@pumpkin> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260419223507.1dc5554a@pumpkin> Hi David, On 2026-04-19 22:35:07+0100, David Laight wrote: > On Sun, 19 Apr 2026 17:30:13 +0200 > Willy Tarreau wrote: > > On Sat, Apr 18, 2026 at 01:54:55PM +0200, Thomas Weißschuh wrote: (...) > I would suggest using "+r" for the in-out registers; and [arg5] for the > ones that get pushed, reliably counting to 7 is hard :-) Yeah, we could do this. As the code barely changes I am not convinced it makes a big difference, though. It wouldn't be part of this patchset anyways. If you want to send a patch, please go ahead :-) > Related to one of the other patches, I can't imagine how N32 getting > a 64bit value truncated would be a qemu bug. > Just seems wrong - isn't the cpu just running in 64bit mode ? That is true for QEMU "system" mode. And there everything works correctly. But the bug exists in QEMU "user" mode. This does not simulate a CPU. Instead a single executable is executed on the host by converting code and system calls on demand. That translation is architectures/ABI-specific and the N32 implementation uses 32-bit variables. (...) Thomas