Re: [PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

2024-11-13 Thread Shahab Vahedi
> The original code checks 'if (ARC_CC_AL)', which is always true since > ARC_CC_AL is a constant. This makes the check redundant and likely > obscures the intention of verifying whether the jump is conditional. > > Updates the code to check cond == ARC_CC_AL instead, reflecting the intent > to dif

Re: [PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

2024-11-13 Thread Vadim Fedorenko
On 13/11/2024 13:41, Hardevsinh Palaniya wrote: The original code checks 'if (ARC_CC_AL)', which is always true since ARC_CC_AL is a constant. This makes the check redundant and likely obscures the intention of verifying whether the jump is conditional. Updates the code to check cond == ARC_CC_A

[PATCH v2] ARC: bpf: Correct conditional check in 'check_jmp_32'

2024-11-13 Thread Hardevsinh Palaniya
The original code checks 'if (ARC_CC_AL)', which is always true since ARC_CC_AL is a constant. This makes the check redundant and likely obscures the intention of verifying whether the jump is conditional. Updates the code to check cond == ARC_CC_AL instead, reflecting the intent to differentiate

Re: [PATCH] ARC: bpf_jit_arcv2: Remove redundant condition check

2024-11-13 Thread Shahab Vahedi
Hardev wrote: > Shahab wrote:  > > > > Vadim wrote: > > > > > > > > > The original code is obviously optimized out, but the intention, I > > > believe, was to check if the jump is conditional or not. > > > So the proper fix should change the code to check cond: > > > > > > - if (ARC_CC_AL) >