diff options
author | Jun Wu <quark@lihdd.net> | 2019-05-04 20:29:43 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-05-06 18:28:28 +1000 |
commit | 089c9b71d10bd66549858254cc10803cba45453a (patch) | |
tree | e1f28ec6f5630e76eba8f5789977ff69e584f1e7 /py/emitnative.c | |
parent | 32ba679924b8f5c8a81cff905e6bd295c6bb4df8 (diff) |
py: remove "if (0)" and "if (false)" branches.
Prior to this commit, building the unix port with `DEBUG=1` and
`-finstrument-functions` the compilation would fail with an error like
"control reaches end of non-void function". This change fixes this by
removing the problematic "if (0)" branches. Not all branches affect
compilation, but they are all removed for consistency.
Diffstat (limited to 'py/emitnative.c')
-rw-r--r-- | py/emitnative.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/py/emitnative.c b/py/emitnative.c index cb6cc94d3..f123ecbb5 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -2227,17 +2227,16 @@ STATIC void emit_native_binary_op(emit_t *emit, mp_binary_op_t op) { int reg_rhs = REG_ARG_3; emit_pre_pop_reg_flexible(emit, &vtype_rhs, ®_rhs, REG_RET, REG_ARG_2); emit_pre_pop_reg(emit, &vtype_lhs, REG_ARG_2); - if (0) { - // dummy #if !(N_X64 || N_X86) - } else if (op == MP_BINARY_OP_LSHIFT) { + if (op == MP_BINARY_OP_LSHIFT) { ASM_LSL_REG_REG(emit->as, REG_ARG_2, reg_rhs); emit_post_push_reg(emit, VTYPE_INT, REG_ARG_2); } else if (op == MP_BINARY_OP_RSHIFT) { ASM_ASR_REG_REG(emit->as, REG_ARG_2, reg_rhs); emit_post_push_reg(emit, VTYPE_INT, REG_ARG_2); + } else #endif - } else if (op == MP_BINARY_OP_OR) { + if (op == MP_BINARY_OP_OR) { ASM_OR_REG_REG(emit->as, REG_ARG_2, reg_rhs); emit_post_push_reg(emit, VTYPE_INT, REG_ARG_2); } else if (op == MP_BINARY_OP_XOR) { |