aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-05-27 14:38:08 +0200
committerMicael Karlberg <[email protected]>2011-05-27 14:38:08 +0200
commit1c01cf2fb625e105dd2355279635edbb3dbb3063 (patch)
tree5dbd5a391b86d99c00a01c456f817f30209f1962 /erts/emulator/beam/beam_emu.c
parent77fe4062599e4ffe897c21d22ad493cfec4b475c (diff)
parent4a5a75811e2cd590b5c94f71864a5245fd511ccf (diff)
downloadotp-1c01cf2fb625e105dd2355279635edbb3dbb3063.tar.gz
otp-1c01cf2fb625e105dd2355279635edbb3dbb3063.tar.bz2
otp-1c01cf2fb625e105dd2355279635edbb3dbb3063.zip
Merge branch 'maint-r14' of super:otp into maint-r14
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 47bff4a427..fb90a7d4f7 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1911,13 +1911,15 @@ void process_main(void)
* Note that for the halfword emulator, the two first elements
* of the array are used.
*/
- *((BeamInstr **) (UWord) c_p->def_arg_reg) = I+3;
+ BeamInstr** pi = (BeamInstr**) c_p->def_arg_reg;
+ *pi = I+3;
set_timer(c_p, unsigned_val(timeout_value));
} else if (timeout_value == am_infinity) {
c_p->flags |= F_TIMO;
#if !defined(ARCH_64) || HALFWORD_HEAP
} else if (term_to_Uint(timeout_value, &time_val)) {
- *((BeamInstr **) (UWord) c_p->def_arg_reg) = I+3;
+ BeamInstr** pi = (BeamInstr**) c_p->def_arg_reg;
+ *pi = I+3;
set_timer(c_p, time_val);
#endif
} else { /* Wrong time */
@@ -1974,7 +1976,8 @@ void process_main(void)
* we must test the F_INSLPQUEUE flag as well as the F_TIMO flag.
*/
if ((c_p->flags & (F_INSLPQUEUE | F_TIMO)) == 0) {
- *((BeamInstr **) (UWord) c_p->def_arg_reg) = I+3;
+ BeamInstr** p = (BeamInstr **) c_p->def_arg_reg;
+ *p = I+3;
set_timer(c_p, Arg(1));
}
goto wait2;
@@ -3413,6 +3416,7 @@ void process_main(void)
r(0) = nif_bif_result;
CHECK_TERM(r(0));
SET_I(c_p->cp);
+ c_p->cp = 0;
Goto(*I);
} else if (c_p->freason == TRAP) {
SET_I(*((BeamInstr **) (UWord) ((c_p)->def_arg_reg + 3)));
@@ -5321,7 +5325,7 @@ void process_main(void)
ep->code[3] = (BeamInstr) OpCode(apply_bif);
ep->code[4] = (BeamInstr) bif_table[i].f;
/* XXX: set func info for bifs */
- ((BeamInstr*)ep->code + 3)[-5] = (BeamInstr) BeamOp(op_i_func_info_IaaI);
+ ep->fake_op_func_info_for_hipe[0] = (BeamInstr) BeamOp(op_i_func_info_IaaI);
}
return;