Re: [PATCH] x86: add 'runtime constant' infrastructure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 10 Jun 2024 at 16:35, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>
> ... which can be compacted down to a single instruction:
>
>     addq $bimm,%rax

We'll burn that bridge when  we get to it. I'm not actually seeing any
obvious for 32-bit immediates, except as part of some actual operation
sequence (ie you might have a similar hash lookup to the d_hash() one,
except using a mask rather than a shift).

When would you ever add a constant, except when that constant is an
address?  And those kinds of runtime constant addresses would always
be the full 64-bit - I don't think 32-bit is interesting enough to
spend any effort on.

(Yes, you can get 32-bit rip-address constants if you start doing
things like conditional link addresses, but that's what things like
static_call() is for - not this runtime constant code)

                Linus




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux