Re: [oss-drivers] [PATCH AUTOSEL 5.0 192/262] nfp: bpf: correct the behavior for shifts by zero

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

 



On Wed, 27 Mar 2019 14:00:47 -0400, Sasha Levin wrote:
> From: Jiong Wang <jiong.wang@xxxxxxxxxxxxx>
> 
> [ Upstream commit db0a4b3b6b83a081a9ec309cc8178e5c9b4706a5 ]
> 
> Shifts by zero do nothing, and should be treated as nops.
> 
> Even though compiler is not supposed to generate such instructions and
> manual written assembly is unlikely to have them, but they are legal
> instructions and have defined behavior.
> 
> This patch correct existing shifts code-gen to make sure they do nothing
> when shift amount is zero except when the instruction is ALU32 for which
> high bits need to be cleared.
> 
> For shift amount bigger than type size, already, NFP JIT back-end errors
> out for immediate shift and only low 5 bits will be taken into account for
> indirect shift which is the same as x86.
> 
> Reviewed-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx>
> Signed-off-by: Jiong Wang <jiong.wang@xxxxxxxxxxxxx>
> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

Nope.



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux