aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-08-24 12:06:20 +0200
committerLukas Larsson <[email protected]>2012-08-24 12:06:20 +0200
commit7bb7e63fbada714655f0860a2d1daacbdc0d4712 (patch)
treecb79a560f4a73095d7c3ff40efc3fc94b10c3cb1 /erts/emulator/beam
parent0176b2a78f0257d88d9532803770eb0405beacb0 (diff)
parent0342137176c653c51cc3a78781888cfca8568650 (diff)
downloadotp-7bb7e63fbada714655f0860a2d1daacbdc0d4712.tar.gz
otp-7bb7e63fbada714655f0860a2d1daacbdc0d4712.tar.bz2
otp-7bb7e63fbada714655f0860a2d1daacbdc0d4712.zip
Merge branch 'maint'
* maint: Configure now assumed normal doubles Bumped version nr bumped revision make list_suffix/1 and list_prefix/1 handle erl_parse() cons sequences modernized and cleaned up edoc documentation removed obsolete @spec annotations and fixed some -spec and -type annotations preserve line numbers when reverting representation updated author e-mail removed CVS keywords from source files Revise the autoconf tests for double middle endianness. Add test for floating-point output to float_SUITE. Unbreak floating point on middle-endian machines. Add support for NULL value in odbc:param_query Conflicts: xcomp/README.md
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_bits.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bits.c b/erts/emulator/beam/erl_bits.c
index 6f7309f493..b7c82935ff 100644
--- a/erts/emulator/beam/erl_bits.c
+++ b/erts/emulator/beam/erl_bits.c
@@ -1005,8 +1005,13 @@ erts_new_bs_put_float(Process *c_p, Eterm arg, Uint num_bits, int flags)
if (is_float(arg)) {
FloatDef *fdp = (FloatDef*)(float_val(arg) + 1);
+#ifdef DOUBLE_MIDDLE_ENDIAN
+ a = fdp->fw[1];
+ b = fdp->fw[0];
+#else
a = fdp->fw[0];
b = fdp->fw[1];
+#endif
} else if (is_small(arg)) {
u.f64 = (double) signed_val(arg);
a = u.i32[0];
@@ -1015,8 +1020,13 @@ erts_new_bs_put_float(Process *c_p, Eterm arg, Uint num_bits, int flags)
if (big_to_double(arg, &u.f64) < 0) {
return 0;
}
+#ifdef DOUBLE_MIDDLE_ENDIAN
+ a = u.i32[1];
+ b = u.i32[0];
+#else
a = u.i32[0];
b = u.i32[1];
+#endif
} else {
return 0;
}