powerpc/bpf ppc32: Fix BPF_SUB when imm == 0x80000000

Special case handling of the smallest 32-bit negative number for BPF_SUB.

Fixes: 51c66ad849a703 ("powerpc/bpf: Implement extended BPF on PPC32")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/7135360a0cdf70adedbccf9863128b8daef18764.1633464148.git.naveen.n.rao@linux.vnet.ibm.com

authored by Naveen N. Rao and committed by Michael Ellerman 548b7627 48164fcc

+1 -1
+1 -1
arch/powerpc/net/bpf_jit_comp32.c
··· 357 357 PPC_LI32(_R0, imm); 358 358 EMIT(PPC_RAW_ADDC(dst_reg, dst_reg, _R0)); 359 359 } 360 - if (imm >= 0) 360 + if (imm >= 0 || (BPF_OP(code) == BPF_SUB && imm == 0x80000000)) 361 361 EMIT(PPC_RAW_ADDZE(dst_reg_h, dst_reg_h)); 362 362 else 363 363 EMIT(PPC_RAW_ADDME(dst_reg_h, dst_reg_h));