Article View: comp.arch
Article #818Re: Large constants in RISC
From: Scott Lurndal
Date: Thu, 19 Nov 2026 23:19
Date: Thu, 19 Nov 2026 23:19
16 lines
1880 bytes
1880 bytes
Stefan Monnier <monnier@iro.umontreal.ca> writes: >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. Consider the case where one is creating the 64-bit address (virtual or physical) of a hardware component, or a VDSO.
Technical Details
Message-ID:
<7uLLS.701$b6r7.107@fx16.iad>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mailReferences:
<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> <jwv1p8hhqmy.fsf-monnier+comp.arch@gnu.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx16.iad.POSTED!not-for-mail X-newsreader: xrn 9.03-beta-14-64bit Sender: scott@dragon.sl.home (Scott Lurndal) From: scott@slp53.sl.home (Scott Lurndal) Reply-To: slp53@pacbell.net Subject: Re: Large constants in RISC Newsgroups: comp.arch 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> <jwv1p8hhqmy.fsf-monnier+comp.arch@gnu.org> Lines: 16 Message-ID: <7uLLS.701$b6r7.107@fx16.iad> X-Complaints-To: abuse@usenetserver.com NNTP-Posting-Date: Thu, 19 Nov 2026 23:19:31 UTC Organization: UsenetServer - www.usenetserver.com Date: Thu, 19 Nov 2026 23:19:31 GMT X-Received-Bytes: 1659