aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-07-15 12:33:41 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-07-15 12:33:41 +0200
commit01a46375d8aae78d4ad01c043b554e58c5b40768 (patch)
treef705d1f2d4abafb9739831e9683e60feaad6a2f7 /erts/emulator/beam/beam_emu.c
parentd050a82a419231e8435e6c3e2e98972c447b8ce6 (diff)
parent440445cfd0cbeee8f2bb86b99b6d16caf7a5c9c7 (diff)
downloadotp-01a46375d8aae78d4ad01c043b554e58c5b40768.tar.gz
otp-01a46375d8aae78d4ad01c043b554e58c5b40768.tar.bz2
otp-01a46375d8aae78d4ad01c043b554e58c5b40768.zip
Merge branch 'maint'
Conflicts: OTP_VERSION
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index a05ca5c602..757b69787a 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -3026,6 +3026,7 @@ do { \
if (i == 0) {
StoreBifResult(4, Op1);
}
+ ires = big_size(Op1);
goto big_shift;
}
} else if (is_big(Op2)) {
@@ -3041,7 +3042,6 @@ do { \
OpCase(i_bsl_jIssd):
GetArg2(2, Op1, Op2);
-
do_bsl:
if (is_small(Op2)) {
i = signed_val(Op2);
@@ -3067,16 +3067,12 @@ do { \
StoreBifResult(4, Op1);
}
}
- Op1 = small_to_big(ires, tmp_big);
-#ifdef TAG_LITERAL_PTR
- Op1 |= TAG_LITERAL_PTR;
-#endif
+ ires = 1; /* big_size(small_to_big(Op1)) */
big_shift:
if (i > 0) { /* Left shift. */
- ires = big_size(Op1) + (i / D_EXP);
+ ires += (i / D_EXP);
} else { /* Right shift. */
- ires = big_size(Op1);
if (ires <= (-i / D_EXP))
ires = 3; /* ??? */
else
@@ -3095,6 +3091,9 @@ do { \
goto lb_Cl_error;
}
TestHeapPreserve(ires+1, Arg(1), Op1);
+ if (is_small(Op1)) {
+ Op1 = small_to_big(signed_val(Op1), tmp_big);
+ }
bigp = HTOP;
Op1 = big_lshift(Op1, i, bigp);
if (is_big(Op1)) {
@@ -3117,6 +3116,7 @@ do { \
if (i == 0) {
StoreBifResult(4, Op1);
}
+ ires = big_size(Op1);
goto big_shift;
}
} else if (is_big(Op2)) {