aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-09-30 08:59:05 +0200
committerSverker Eriksson <[email protected]>2011-10-26 18:19:20 +0200
commit81a7ccf6dbb09015a1a35f3b59f8ec549a4d0317 (patch)
tree19336bc11ff9cc1aa11efabf06d8badbd49a3f63 /erts/emulator/beam/beam_emu.c
parent99e864e502217e9e8929d8dc17ff8d08eca8dff5 (diff)
downloadotp-81a7ccf6dbb09015a1a35f3b59f8ec549a4d0317.tar.gz
otp-81a7ccf6dbb09015a1a35f3b59f8ec549a4d0317.tar.bz2
otp-81a7ccf6dbb09015a1a35f3b59f8ec549a4d0317.zip
Store the trap arguments in the X register array
Store arguments for a trap in the X register array to allow traps to have any number of arguments.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index ecf52fd2ed..44c9d4ee05 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1523,8 +1523,7 @@ void process_main(void)
SET_CP(c_p, I+1);
SET_I(*((BeamInstr **) (BeamInstr) ((c_p)->def_arg_reg + 3)));
SWAPIN;
- r(0) = c_p->def_arg_reg[0];
- x(1) = c_p->def_arg_reg[1];
+ r(0) = reg[0];
Dispatch();
}
goto find_func_info;
@@ -2437,9 +2436,7 @@ void process_main(void)
SET_CP(c_p, I+2);
SET_I(*((BeamInstr **) (UWord) ((c_p)->def_arg_reg + 3)));
SWAPIN;
- r(0) = c_p->def_arg_reg[0];
- x(1) = c_p->def_arg_reg[1];
- x(2) = c_p->def_arg_reg[2];
+ r(0) = reg[0];
Dispatch();
}
@@ -3227,9 +3224,7 @@ void process_main(void)
Goto(*I);
} else if (c_p->freason == TRAP) {
SET_I(*((BeamInstr **) (UWord) ((c_p)->def_arg_reg + 3)));
- r(0) = c_p->def_arg_reg[0];
- x(1) = c_p->def_arg_reg[1];
- x(2) = c_p->def_arg_reg[2];
+ r(0) = reg[0];
if (c_p->flags & F_HIBERNATE_SCHED) {
c_p->flags &= ~F_HIBERNATE_SCHED;
goto do_schedule;