diff options
author | Patrik Nyblom <[email protected]> | 2010-02-11 11:00:47 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-03-10 14:25:36 +0100 |
commit | ac0b3f0a64705717d21e4a3d84d91d9c44f3baf7 (patch) | |
tree | 749b16612ebb287c0ea73d3c9e8abfbe3d530c03 /erts/emulator/beam/beam_emu.c | |
parent | 3ddf0126dfcb60f0554e2d52187fa012f378e428 (diff) | |
download | otp-ac0b3f0a64705717d21e4a3d84d91d9c44f3baf7.tar.gz otp-ac0b3f0a64705717d21e4a3d84d91d9c44f3baf7.tar.bz2 otp-ac0b3f0a64705717d21e4a3d84d91d9c44f3baf7.zip |
Correct the VM to work for more test suites
The following test suites now work:
send_term_SUITE
trace_nif_SUITE
binary_SUITE
match_spec_SUITE
node_container_SUITE
beam_literals_SUITE
Also add a testcases for system_info({wordsize,internal|external}).
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 1078478ed9..0d1cce52ca 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -2775,7 +2775,7 @@ void process_main(void) given_size = thing_arityval(given_arity); bigp = (Eterm *) &Arg(2); while ((arity = bigp[0]) > given_arity) { - bigp += thing_arityval(arity) + 2; + bigp += (TermWords(thing_arityval(arity) + 1) + 1) * (sizeof(BeamInstr)/sizeof(Eterm)); } while (bigp[0] == given_arity) { if (memcmp(bigp+1, given+1, sizeof(Eterm)*given_size) == 0) { @@ -2784,7 +2784,7 @@ void process_main(void) SET_I((BeamInstr *) *tmp); Goto(*I); } - bigp += thing_arityval(arity) + 2; + bigp += (TermWords(thing_arityval(arity) + 1) + 1) * (sizeof(BeamInstr)/sizeof(Eterm)); } } @@ -4291,7 +4291,7 @@ apply_bif_or_nif_epilogue: */ OpCase(call_traced_function): { if (IS_TRACED_FL(c_p, F_TRACE_CALLS)) { - unsigned offset = offsetof(Export, code) + 3*sizeof(Eterm); + unsigned offset = offsetof(Export, code) + 3*sizeof(BeamInstr); Export* ep = (Export *) (((char *)I)-offset); Uint32 flags; |