Skip to content

Commit d872572

Browse files
committed
More bitshift cleanups
Signed-off-by: Davide Bettio <davide@uninstall.it>
1 parent 5f710e8 commit d872572

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/libAtomVM/bif.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,6 @@ term bif_erlang_bsl_2(Context *ctx, uint32_t fail_label, int live, term arg1, te
15851585
#else
15861586
return make_maybe_boxed_int(ctx, fail_label, live, result);
15871587
#endif
1588-
} else {
1589-
fprintf(stderr, "was with b: %i, with: ", (int) b);
1590-
term_display(stderr, arg1, ctx);
1591-
fprintf(stderr, "\n");
15921588
}
15931589
}
15941590

@@ -1603,11 +1599,10 @@ term bif_erlang_bsl_2(Context *ctx, uint32_t fail_label, int live, term arg1, te
16031599
args_to_bigint(arg1, arg2, tmp_buf1, tmp_buf2, &m, &m_len, &m_sign, &n, &n_len, &n_sign);
16041600

16051601
intn_digit_t bigres[INTN_MAX_RES_LEN];
1606-
size_t bigres_len;
1607-
bigres_len = intn_bsl(m, m_len, b, bigres);
1608-
fprintf(stderr, "bigres: %i\n", (int) bigres_len);
1602+
size_t bigres_len = intn_bsl(m, m_len, b, bigres);
16091603

16101604
return make_bigint(ctx, fail_label, live, bigres, bigres_len, m_sign);
1605+
16111606
} else {
16121607
RAISE_ERROR_BIF(fail_label, BADARITH_ATOM);
16131608
}
@@ -1620,10 +1615,6 @@ term bif_erlang_bsr_2(Context *ctx, uint32_t fail_label, int live, term arg1, te
16201615

16211616
avm_int_t b = term_to_int(arg2);
16221617

1623-
fprintf(stderr, "going to do b: %i, with: ", (int) b);
1624-
term_display(stderr, arg1, ctx);
1625-
fprintf(stderr, "\n");
1626-
16271618
if (arg1_size <= BOXED_TERMS_REQUIRED_FOR_INT64) {
16281619
uint64_t a = (uint64_t) term_maybe_unbox_int64(arg1);
16291620
int64_t result = int64_bsr_safe(a, b);
@@ -1649,6 +1640,7 @@ term bif_erlang_bsr_2(Context *ctx, uint32_t fail_label, int live, term arg1, te
16491640
size_t bigres_len = intn_bsr(m, m_len, m_sign, b, bigres);
16501641

16511642
return make_bigint(ctx, fail_label, live, bigres, bigres_len, m_sign);
1643+
16521644
} else {
16531645
RAISE_ERROR_BIF(fail_label, BADARITH_ATOM);
16541646
}

0 commit comments

Comments
 (0)