🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #817

Re: Large constants in RISC

#817
From: Stefan Monnier
Date: Thu, 19 Nov 2026 13:59
15 lines
2162 bytes
aph@littlepinkcloud.invalid [2026-11-19 09:42:51] wrote:
> In a way, it does. Most large constants I see are addresses.
> AArch64 (almost) always has a 48-bit user space, so except for
> floating-point doubles and the very occasional large integer, constant
> loads look like
>
>  mov x0, 42857; movk x0, 0x60b8, lsl 16; movk x0, 0xaaaa, lsl 32

Interesting.  I would have expected that most AArch64 code is position
independent (e.g. for address space randomization purposes), so I wonder
in which circumstances we end up with such instruction sequences to
build hardcoded addresses.


=== Stefan
Technical Details
Message-ID: <jwv1p8hhqmy.fsf-monnier+comp.arch@gnu.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11d76uq$11cdc$1@paganini.bofh.team> <11d7ct8$17akn$1@dont-email.me> <11d7ih2$11orr$1@paganini.bofh.team> <11d9d0d$1rsce$1@dont-email.me> <11d9tq8$1b9c1$2@paganini.bofh.team> <2026Nov14.201017@mips.complang.tuwien.ac.at> <6af911ea.18530156@news.eternal-september.org> <SYScnWsR3rgGWWP3nZ2dnZfqn_WdnZ2d@supernews.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: comp.arch
Subject: Re: Large constants in RISC
Date: Thu, 19 Nov 2026 08:59:04 -0500
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <jwv1p8hhqmy.fsf-monnier+comp.arch@gnu.org>
References: <11d76uq$11cdc$1@paganini.bofh.team>
	<11d7ct8$17akn$1@dont-email.me> <11d7ih2$11orr$1@paganini.bofh.team>
	<11d9d0d$1rsce$1@dont-email.me> <11d9tq8$1b9c1$2@paganini.bofh.team>
	<2026Nov14.201017@mips.complang.tuwien.ac.at>
	<6af911ea.18530156@news.eternal-september.org>
	<SYScnWsR3rgGWWP3nZ2dnZfqn_WdnZ2d@supernews.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 19 Nov 2026 22:57:31 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2850997"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18jG7z78MG71fkniS3EP1RbnDVfp0Yw0g8="; posting-host="bde061568587eec53279ab752ae4f6c9"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:XxwN8umPg8Y/AtWROG3kwo9loQc=
	sha1:onnIF3DpdWXE6SZOIJFnPMKE94o= sha256:xZCmEhj4cOKtSUurp3vEPr8LuyQoAoWCnlcHVI6OkQA=
	sha1:dvtG8izHoJhYE/aRiMx5V+geVCA= sha256:KN7Sw7RS1SCqd1Bn1pRk/ttTHPL2wsM5ctsY2JZTeDA=
In-Reply-To: <SYScnWsR3rgGWWP3nZ2dnZfqn_WdnZ2d@supernews.com> (message from aph@littlepinkcloud.invalid on Thu, 19 Nov 2026 09:42:51 +0000)