提交 b4f16c93 编写于 作者: R Ralf Baechle

MIPS: BFP: Simplify code slightly.

This keeps the if condition slightly simpler - it's going to become ore
complication.
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 5e888e8f
......@@ -1240,7 +1240,10 @@ static int build_body(struct jit_ctx *ctx)
emit_half_load(r_A, r_skb, off, ctx);
#ifdef CONFIG_CPU_LITTLE_ENDIAN
/* This needs little endian fixup */
if (!cpu_has_mips_r2) {
if (cpu_has_mips_r2) {
/* R2 and later have the wsbh instruction */
emit_wsbh(r_A, r_A, ctx);
} else {
/* Get first byte */
emit_andi(r_tmp_imm, r_A, 0xff, ctx);
/* Shift it */
......@@ -1250,9 +1253,6 @@ static int build_body(struct jit_ctx *ctx)
emit_andi(r_tmp_imm, r_tmp_imm, 0xff, ctx);
/* Put everyting together in r_A */
emit_or(r_A, r_tmp, r_tmp_imm, ctx);
} else {
/* R2 and later have the wsbh instruction */
emit_wsbh(r_A, r_A, ctx);
}
#endif
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册