summaryrefslogtreecommitdiff
path: root/fs/openpromfs/Makefile
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2019-02-01 22:39:28 +0000
committerAlexei Starovoitov <ast@kernel.org>2019-02-01 18:03:49 -0800
commitdb0a4b3b6b83a081a9ec309cc8178e5c9b4706a5 (patch)
treecad7d695dc119461d22422b78d0033dea8fe90e4 /fs/openpromfs/Makefile
parent2a1181540952ed0c2b91928f414c388ffe66d2b6 (diff)
nfp: bpf: correct the behavior for shifts by zero
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@netronome.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'fs/openpromfs/Makefile')
0 files changed, 0 insertions, 0 deletions