lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH bpf-next 6/8] arm32, bpf: add support for 64 bit division instruction
Date
On Wed, Sep 06 2023, Russell King (Oracle) wrote:

> On Wed, Sep 06, 2023 at 09:29:19AM +0000, Puranjay Mohan wrote:
>> On Tue, Sep 05 2023, Russell King (Oracle) wrote:
>>
>> > On Tue, Sep 05, 2023 at 09:06:19PM +0000, Puranjay Mohan wrote:
>> Actually, there can also be a situation where rd[1] != ARM_R0 && rd[1] != ARM_R2,
>> so should I do it like:
>>
>> if (rd[1] != ARM_R0 && rd[1] != ARM_R2) {
>> emit(ARM_POP(BIT(ARM_R0) | BIT(ARM_R1)), ctx);
>> emit(ARM_POP(BIT(ARM_R2) | BIT(ARM_R3)), ctx);
>> } else if (rd[1] != ARM_R0) {
>> emit(ARM_POP(BIT(ARM_R0) | BIT(ARM_R1)), ctx);
>> emit(ARM_ADD_I(ARM_SP, ARM_SP, 8), ctx);
>> } else if (rd[1] != ARM_R2) {
>> emit(ARM_ADD_I(ARM_SP, ARM_SP, 8), ctx);
>> emit(ARM_POP(BIT(ARM_R2) | BIT(ARM_R3)), ctx);
>> } else {
>> emit(ARM_ADD_I(ARM_SP, ARM_SP, 16), ctx);
>> }
>
> Are you sure all four states are possible?

ohh!

I just realized that the last else will never run.
rd[1] can never be equal to both ARM_R0 and ARM_R2.
Will fix it in V3 as I already sent out the V2.

I need to learn to leave patches on the list for few days before re-spinning.

Thanks,
Puranjay

\
 
 \ /
  Last update: 2023-09-06 22:02    [W:0.078 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site