diff options
author | Björn Gustavsson <[email protected]> | 2014-02-19 14:16:06 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-02-19 15:23:13 +0100 |
commit | 04f4d9656724f465352df9582773393a165c8803 (patch) | |
tree | e943079c70f5d8b02afeb04f717c38fd17db8948 /erts/emulator/beam/erl_utils.h | |
parent | 9fbb7a9a72a9b9f2bc12aebdbc89cac4bcd21873 (diff) | |
download | otp-04f4d9656724f465352df9582773393a165c8803.tar.gz otp-04f4d9656724f465352df9582773393a165c8803.tar.bz2 otp-04f4d9656724f465352df9582773393a165c8803.zip |
beam/utils.c: Change back cmp() to only take two arguments
Commit d5c238473b9cec819d93faaef4ccc00ddb60465f added a third
argument to the cmp() function, but did not change the code generation
of native code that called cmp().
Name the new functions with an "erts_" prefix, and reinstate the
old cmp() function with two arguments.
We don't have to keep a cmp() function in the halfword emulator,
since HiPE does not support the halfword emulator.
Diffstat (limited to 'erts/emulator/beam/erl_utils.h')
-rw-r--r-- | erts/emulator/beam/erl_utils.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_utils.h b/erts/emulator/beam/erl_utils.h index 5b81d814c6..43a19e97f1 100644 --- a/erts/emulator/beam/erl_utils.h +++ b/erts/emulator/beam/erl_utils.h @@ -202,17 +202,18 @@ int eq(Eterm, Eterm); #define EQ(x,y) (((x) == (y)) || (is_not_both_immed((x),(y)) && eq((x),(y)))) #if HALFWORD_HEAP -Sint cmp_rel_opt(Eterm, Eterm*, Eterm, Eterm*, int); -#define cmp_rel(A,A_BASE,B,B_BASE) cmp_rel_opt(A,A_BASE,B,B_BASE,0) -#define cmp_rel_term(A,A_BASE,B,B_BASE) cmp_rel_opt(A,A_BASE,B,B_BASE,1) -#define CMP(A,B) cmp_rel_opt(A,NULL,B,NULL,0) -#define CMP_TERM(A,B) cmp_rel_opt(A,NULL,B,NULL,1) +Sint erts_cmp_rel_opt(Eterm, Eterm*, Eterm, Eterm*, int); +#define cmp_rel(A,A_BASE,B,B_BASE) erts_cmp_rel_opt(A,A_BASE,B,B_BASE,0) +#define cmp_rel_term(A,A_BASE,B,B_BASE) erts_cmp_rel_opt(A,A_BASE,B,B_BASE,1) +#define CMP(A,B) erts_cmp_rel_opt(A,NULL,B,NULL,0) +#define CMP_TERM(A,B) erts_cmp_rel_opt(A,NULL,B,NULL,1) #else -Sint cmp(Eterm, Eterm, int); -#define cmp_rel(A,A_BASE,B,B_BASE) cmp(A,B,0) -#define cmp_rel_term(A,A_BASE,B,B_BASE) cmp(A,B,1) -#define CMP(A,B) cmp(A,B,0) -#define CMP_TERM(A,B) cmp(A,B,1) +Sint cmp(Eterm, Eterm); +Sint erts_cmp(Eterm, Eterm, int); +#define cmp_rel(A,A_BASE,B,B_BASE) erts_cmp(A,B,0) +#define cmp_rel_term(A,A_BASE,B,B_BASE) erts_cmp(A,B,1) +#define CMP(A,B) erts_cmp(A,B,0) +#define CMP_TERM(A,B) erts_cmp(A,B,1) #endif #define cmp_lt(a,b) (CMP((a),(b)) < 0) |