aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2014-06-03 07:05:55 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-06-04 16:50:40 -0400
commitb4f16c938eed87aac733972e735c5bea700948aa (patch)
treef787494fd666909c5a748679f4d1e2fa18a1022d /arch/mips
parent5e888e8fb55cf3da870b85d04fef6bfe0d57c974 (diff)
MIPS: BFP: Simplify code slightly.
This keeps the if condition slightly simpler - it's going to become ore complication. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/net/bpf_jit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index 98e9d2395598..a67b9753330b 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -1240,7 +1240,10 @@ jmp_cmp:
1240 emit_half_load(r_A, r_skb, off, ctx); 1240 emit_half_load(r_A, r_skb, off, ctx);
1241#ifdef CONFIG_CPU_LITTLE_ENDIAN 1241#ifdef CONFIG_CPU_LITTLE_ENDIAN
1242 /* This needs little endian fixup */ 1242 /* This needs little endian fixup */
1243 if (!cpu_has_mips_r2) { 1243 if (cpu_has_mips_r2) {
1244 /* R2 and later have the wsbh instruction */
1245 emit_wsbh(r_A, r_A, ctx);
1246 } else {
1244 /* Get first byte */ 1247 /* Get first byte */
1245 emit_andi(r_tmp_imm, r_A, 0xff, ctx); 1248 emit_andi(r_tmp_imm, r_A, 0xff, ctx);
1246 /* Shift it */ 1249 /* Shift it */
@@ -1250,9 +1253,6 @@ jmp_cmp:
1250 emit_andi(r_tmp_imm, r_tmp_imm, 0xff, ctx); 1253 emit_andi(r_tmp_imm, r_tmp_imm, 0xff, ctx);
1251 /* Put everyting together in r_A */ 1254 /* Put everyting together in r_A */
1252 emit_or(r_A, r_tmp, r_tmp_imm, ctx); 1255 emit_or(r_A, r_tmp, r_tmp_imm, ctx);
1253 } else {
1254 /* R2 and later have the wsbh instruction */
1255 emit_wsbh(r_A, r_A, ctx);
1256 } 1256 }
1257#endif 1257#endif
1258 break; 1258 break;