summaryrefslogtreecommitdiff
path: root/py/emitnative.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-20 00:17:13 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-28 10:29:27 +1100
commita1b18b3ba7ccbf2c4d73608079844d89360688a3 (patch)
tree00ffb10d1bbe77227350e7019759c5a67917a1e7 /py/emitnative.c
parent4b23e98fb0851eb74ec269022a1e86702e387b23 (diff)
py: Removing dangling "else" to improve code format consistency.
Diffstat (limited to 'py/emitnative.c')
-rw-r--r--py/emitnative.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/py/emitnative.c b/py/emitnative.c
index d0252560f..da60c119d 100644
--- a/py/emitnative.c
+++ b/py/emitnative.c
@@ -2318,15 +2318,19 @@ 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, &reg_rhs, REG_RET, REG_ARG_2);
emit_pre_pop_reg(emit, &vtype_lhs, REG_ARG_2);
+
#if !(N_X64 || N_X86)
- 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);
+ if (op == MP_BINARY_OP_LSHIFT || op == MP_BINARY_OP_RSHIFT) {
+ if (op == MP_BINARY_OP_LSHIFT) {
+ ASM_LSL_REG_REG(emit->as, REG_ARG_2, reg_rhs);
+ } else {
+ ASM_ASR_REG_REG(emit->as, REG_ARG_2, reg_rhs);
+ }
emit_post_push_reg(emit, VTYPE_INT, REG_ARG_2);
- } else
+ return;
+ }
#endif
+
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);