huge list matching -- different behaviour on x86_32 and x86_64

Bjorn Gustavsson bjorn@REDACTED
Mon Jun 19 16:14:42 CEST 2006


Igor Goryachev <igor@REDACTED> writes:

> Hello.
> 
> I have experienced a different behaviour and possibly a weird result
> while playing with matching a huge lists on x86_32 and x86_64
> machines. Version r10b10 was used in both cases.
> 

The problem was in the loader. The following patch resolves the problem
at least in R11B-0. (It will probably work if applied to R10B-10 too,
but I have not tested that.)

*** erts/emulator/utils/beam_makeops@@/main/release/13	Wed May  3 10:01:25 2006
--- erts/emulator/utils/beam_makeops	Mon Jun 19 15:56:33 2006
***************
*** 481,487 ****
      print "\n";
      print "#ifdef ARCH_64\n";
      print "#  define BEAM_LOOSE_MASK 0x1FFFUL\n";
!     print "#  define BEAM_TIGHT_MASK 0xFFCUL\n";
      print "#  define BEAM_LOOSE_SHIFT 16\n";
      print "#  define BEAM_TIGHT_SHIFT 16\n";
      print "#else\n";
--- 481,487 ----
      print "\n";
      print "#ifdef ARCH_64\n";
      print "#  define BEAM_LOOSE_MASK 0x1FFFUL\n";
!     print "#  define BEAM_TIGHT_MASK 0x1FF8UL\n";
      print "#  define BEAM_LOOSE_SHIFT 16\n";
      print "#  define BEAM_TIGHT_SHIFT 16\n";
      print "#else\n";

/Bjorn
-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list