diff options
author | Patrik Nyblom <[email protected]> | 2010-01-20 16:26:14 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-10 14:24:45 +0100 |
commit | fb94cd974dc03baf149264ca4f4d50c6d1f80f21 (patch) | |
tree | ab913eae685670165acd3a5f2b3f39c0d085292d /erts/emulator/utils | |
parent | 775191a1e033b4b93a4615c629d90fdb82f39a98 (diff) | |
download | otp-fb94cd974dc03baf149264ca4f4d50c6d1f80f21.tar.gz otp-fb94cd974dc03baf149264ca4f4d50c6d1f80f21.tar.bz2 otp-fb94cd974dc03baf149264ca4f4d50c6d1f80f21.zip |
Store pointers to heap data in 32-bit words
Store Erlang terms in 32-bit entities on the heap, expanding the
pointers to 64-bit when needed. This works because all terms are stored
on addresses in the 32-bit address range (the 32 most significant bits
of pointers to term data are always 0).
Introduce a new datatype called UWord (along with its companion SWord),
which is an integer having the exact same size as the machine word
(a void *), but might be larger than Eterm/Uint.
Store code as machine words, as the instructions are pointers to
executable code which might reside outside the 32-bit address range.
Continuation pointers are stored on the 32-bit stack and hence must
point to addresses in the low range, which means that loaded beam code
much be placed in the low 32-bit address range (but, as said earlier,
the instructions themselves are full words).
No Erlang term data can be stored on C stacks (enforced by an
earlier commit).
This version gives a prompt, but test cases still fail (and dump core).
The loader (and emulator loop) has instruction packing disabled.
The main issues has been in rewriting loader and actual virtual
machine. Subsystems (like distribution) does not work yet.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-x | erts/emulator/utils/beam_makeops | 9 | ||||
-rwxr-xr-x | erts/emulator/utils/make_tables | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index 4a859c3094..1a76e80620 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -812,9 +812,10 @@ sub basic_generator { # Pack arguments if requested. # - if ($flags =~ /-pack/ && $hot) { - ($prefix, $pack_spec, @args) = &do_pack(@args); - } + # /* XXX:PaN temporarilly disabled during halfword implementation step 1 */ + #if ($flags =~ /-pack/ && $hot) { + # ($prefix, $pack_spec, @args) = &do_pack(@args); + #} # # Calculate the size of the instruction and generate each argument for @@ -916,7 +917,7 @@ sub basic_generator { } else { $code = join("\n", "{ $var_decls", - "Eterm* next;", + "UWord* next;", "PreFetch($size, next);", "$macro_code", "NextPF($size, next);", diff --git a/erts/emulator/utils/make_tables b/erts/emulator/utils/make_tables index b5391234cf..8e9e414dbe 100755 --- a/erts/emulator/utils/make_tables +++ b/erts/emulator/utils/make_tables @@ -184,7 +184,7 @@ for ($i = 0; $i < @bif; $i++) { my $arity = $bif[$i]->[2]; my $args = join(', ', 'Process*', ('Eterm') x $arity); print "Eterm $bif[$i]->[3]($args);\n"; - print "Eterm wrap_$bif[$i]->[3]($args, Uint *I);\n"; + print "Eterm wrap_$bif[$i]->[3]($args, UWord *I);\n"; } print "#endif\n"; @@ -225,15 +225,15 @@ for ($i = 0; $i < @bif; $i++) { for ($arg = 1; $arg <= $arity; $arg++) { print ", Eterm arg$arg"; } - print ", Uint *I)\n"; + print ", UWord *I)\n"; print "{\n"; print " return erts_bif_trace($i, p"; for ($arg = 1; $arg <= 3; $arg++) { if ($arg <= $arity) { print ", arg$arg"; - } elsif ($arg == ($arity + 1)) { - # Place I in correct position - print ", (Eterm) I"; + #} elsif ($arg == ($arity + 1)) { + # # Place I in correct position + # print ", (Eterm) I"; } else { print ", 0"; } |