diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-04-20 10:01:06 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-04-20 10:01:06 +0200 |
commit | b3e121949ad524be44878d656e923dd187780eda (patch) | |
tree | 9caec56c4f66b1273f19f8b406239dbc166db413 /erts/emulator | |
parent | ddfbbcbbd489913120a55b2a054b046c68b40a8a (diff) | |
download | otp-b3e121949ad524be44878d656e923dd187780eda.tar.gz otp-b3e121949ad524be44878d656e923dd187780eda.tar.bz2 otp-b3e121949ad524be44878d656e923dd187780eda.zip |
erts: Fix halfword compare
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/utils.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index ae62a7a708..edefc5170f 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -2920,16 +2920,16 @@ Sint cmp(Eterm a, Eterm b) #if HALFWORD_HEAP static Sint erts_cmp_compound_rel_opt(Eterm a, Eterm* a_base, - Eterm b, Eterm* b_base, - int exact, int eq_only); + Eterm b, Eterm* b_base, + int exact, int eq_only); #else static Sint erts_cmp_compound(Eterm a, Eterm b, int exact, int eq_only); #endif #if HALFWORD_HEAP -Sint erts_cmp(Eterm a, Eterm* a_base, - Eterm b, Eterm* b_base, - int exact, int eq_only) +Sint erts_cmp_rel_opt(Eterm a, Eterm* a_base, + Eterm b, Eterm* b_base, + int exact, int eq_only) #else Sint erts_cmp(Eterm a, Eterm b, int exact, int eq_only) #endif @@ -2940,7 +2940,7 @@ Sint erts_cmp(Eterm a, Eterm b, int exact, int eq_only) return (signed_val(a) - signed_val(b)); } #if HALFWORD_HEAP - return erts_cmp_compound(a,a_base,b,b_base,exact,eq_only); + return erts_cmp_compound_rel_opt(a,a_base,b,b_base,exact,eq_only); #else return erts_cmp_compound(a,b,exact,eq_only); #endif @@ -2952,8 +2952,9 @@ Sint erts_cmp(Eterm a, Eterm b, int exact, int eq_only) * exact = 0 -> arith-based compare */ #if HALFWORD_HEAP -static Sint erts_cmp_compound_rel_opt(Eterm a, Eterm* a_base, Eterm b, Eterm* b_base, - int exact, int eq_only) +static Sint erts_cmp_compound_rel_opt(Eterm a, Eterm* a_base, + Eterm b, Eterm* b_base, + int exact, int eq_only) #else static Sint erts_cmp_compound(Eterm a, Eterm b, int exact, int eq_only) #endif |