From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) (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 7D3CC3164D5 for ; Tue, 16 Sep 2025 15:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758038286; cv=none; b=sFL03wc74q/vscuybpH06+R/daGF1a5346nHeGPyRQQhVSblYkqPxzbFFx0XNtHapJmS7tLx972fN4PIIWlB11Jtzlj4TAKDbAJWe0zhZfkmEBhVlayNc6X5WI4HMALzg8gvbnqWswQahBCYOYSS00C0XX8+JEBe7qFwQDBVC7U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758038286; c=relaxed/simple; bh=Lkz1a0hNvpN7W0wwoKP8/sFakFJpPjrqCti/f6WCUfY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cpq7hLXCFgUzZx2mn8E0xZcuXdAvPwI+YnLyu4PJ5LY+f0E92/nOGa7eawaRkChzXm11Fivto4RIM+gVrnr0Cdx6IxwPPlhz5PkTgV0G0fDrRZ/52ri476Ld8RmrLr7SOoPSP2etZIgHrzwa/BnvqnyFc6Sa9+hCOlJlUKgFp5w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org; spf=pass smtp.mailfrom=goodmis.org; arc=none smtp.client-ip=216.40.44.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=goodmis.org Received: from omf07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8C9A2139FF1; Tue, 16 Sep 2025 15:58:02 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rostedt@goodmis.org) by omf07.hostedemail.com (Postfix) with ESMTPA id CAF2520033; Tue, 16 Sep 2025 15:57:59 +0000 (UTC) Date: Tue, 16 Sep 2025 11:58:01 -0400 From: Steven Rostedt To: Fangrui Song Cc: Indu Bhagat , Jan Beulich , Rainer Orth , "linux-toolchains@vger.kernel.org" , Jens Remus , Sterling Augustine , Pavel Labath , Andrii Nakryiko , Josh Poimboeuf , Serhei Makarov , Binutils Subject: Re: Unaligned access trade-offs for SFrame FRE layout Message-ID: <20250916115801.622c629b@batman.local.home> In-Reply-To: References: <9d104c46-855c-4b36-8226-1f59b59e455c@suse.com> <26895e7a-5d54-4c89-aeb4-bcd094ba081d@suse.com> <1308e9fa-90c8-4c52-b53d-afd24542b4c8@suse.com> <76b8c89e-5d80-48da-aff1-580d539d1b87@oracle.com> <20250915120742.7ff2f781@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: 1gcpkaa9nizqr19azk96jpz9oq36kzui X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: CAF2520033 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Session-ID: U2FsdGVkX1/jeZO16l8kJQfOh/QQELBlvOY+zrx7Wgw= X-HE-Tag: 1758038279-459133 X-HE-Meta: U2FsdGVkX1+rALm73r3UWevqNYA/rOWtosnFyU8m9FtZv+UiY5MbaenbfOXi9CNvHsc+c37e+IR5Uv/MnezkBt4vLhJMUhcmVz2IJ9XsxLknFPFzo3WzcI8jOyLvw438FN9xGV1WheBZ0q798DS35EbdrvcWD7F/Q7YU8aqLjBYZS6w6sFB8MM3tT7eptvq6Pf5eiYgMG4sz39aQC/xtd0Rvq/4sBFY+1EhUCn5l97Pyz4EjOBnLdLq4bb599DRwf5AhpWQ4TTtEGTfShubZXyO3XAYdDfqfwLDbLzG5zcJpqrS4tfkzp6w5/rJiOPXsmGQAB3H99tnM7VekQ/9EzKwJSbXLiarx9CgMmwYgS0jULXmAv6LMWEdqFzVtPcBG On Mon, 15 Sep 2025 23:05:09 -0700 Fangrui Song wrote: > From a linker and binary utilities perspective, I'd even suggest > adopting a universal little-endian format regardless of the target > system's native endianness. > This would eliminate the need for endianness templates in the C++ code > and simplify toolchain implementation across platforms. > > On the big-endian z/Architecture, this is efficient: the LOAD REVERSED > instructions are used by the bswap versions in the following program, > not even requiring extra instructions. > #define WIDTH(x) \ > typedef __UINT##x##_TYPE__ [[gnu::aligned(1)]] uint##x; \ > uint##x load_inc##x(uint##x *p) { return *p+1; } \ > uint##x load_bswap_inc##x(uint##x *p) { return __builtin_bswap##x(*p)+1; }; \ > uint##x load_eq##x(uint##x *p) { return *p==3; } \ > uint##x load_bswap_eq##x(uint##x *p) { return __builtin_bswap##x(*p)==3; }; \ > > WIDTH(16); > WIDTH(32); > WIDTH(64); I would like to hear the comments from Jens on this, as he's adapting SFrames for the s390 which I believe is big-endian. -- Steve