lkml.org 
[lkml]   [2022]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH bpf-next v6 2/4] arm64: Add LDR (literal) instruction
From
On 7/6/2022 12:39 AM, Will Deacon wrote:
> On Sat, Jun 25, 2022 at 12:12:53PM -0400, Xu Kuohai wrote:
>> Add LDR (literal) instruction to load data from address relative to PC.
>> This instruction will be used to implement long jump from bpf prog to
>> bpf rampoline in the follow-up patch.
>
> typo: trampoline
>

will fix

>>
>> The instruction encoding:
>>
>> 3 2 2 2 0 0
>> 0 7 6 4 5 0
>> +-----+-------+---+-----+-------------------------------------+--------+
>> | 0 x | 0 1 1 | 0 | 0 0 | imm19 | Rt |
>> +-----+-------+---+-----+-------------------------------------+--------+
>>
>> for 32-bit, variant x == 0; for 64-bit, x == 1.
>>
>> branch_imm_common() is used to check the distance between pc and target
>> address, since it's reused by this patch and LDR (literal) is not a branch
>> instruction, rename it to aarch64_imm_common().
>
> nit, but I think "label_imm_common()" would be a better name.
>

will rename

> Anyway, I checked the encodings and the code looks good, so:
>
> Acked-by: Will Deacon <will@kernel.org>
>
> Will
> .

\
 
 \ /
  Last update: 2022-07-06 03:44    [W:0.055 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site