From f2fce18b897189a60c518017704bf3b100451a93 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Wed, 8 Jun 2011 10:00:48 +0200 Subject: Get cerl and distribution working in Win64 Can still not setup -a, but cerl works. --- erts/emulator/beam/big.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'erts/emulator/beam/big.c') diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c index 46db9ca99c..1c38ac3211 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -1450,6 +1450,20 @@ erts_make_integer(Uint x, Process *p) return uint_to_big(x,hp); } } +/* + * As erts_make_integer, but from a whole UWord. + */ +Eterm +erts_make_integer_from_uword(UWord x, Process *p) +{ + Eterm* hp; + if (IS_USMALL(0,x)) + return make_small(x); + else { + hp = HAlloc(p, BIG_UWORD_HEAP_SIZE(x)); + return uword_to_big(x,hp); + } +} /* ** convert Uint to bigint -- cgit v1.2.3 From e04704b1f40511a6e1090b4cb04ef543580cdcc7 Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Tue, 15 Nov 2011 20:10:21 +0100 Subject: Iron out bugs in Win64 found in daily builds Almost all uses of the 'long' datatype is removed from VM and tests Emulator test now runs w/o drivers crashing Nasty abs bug fixed in VM as well as type errors in allocator debug functions Still one allocator test that fails, domain knowledge is needed to fix that. Fix type inconsistency in beam_load causing crashes --- erts/emulator/beam/big.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/big.c') diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c index 1c38ac3211..976f05c990 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -1325,7 +1325,7 @@ static dsize_t I_lshift(ErtsDigit* x, dsize_t xl, Sint y, return 1; } else { - long ay = (y < 0) ? -y : y; + SWord ay = (y < 0) ? -y : y; int bw = ay / D_EXP; int sw = ay % D_EXP; dsize_t rl; -- cgit v1.2.3