aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/arith_instrs.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-02 12:23:35 +0200
committerBjörn Gustavsson <[email protected]>2017-10-02 12:23:35 +0200
commit4bb581abb2ef40325ed5303b08ef89a1195134ff (patch)
treeca6775de515aa42707969d362d660cc22ddcc842 /erts/emulator/beam/arith_instrs.tab
parent883ceaec7d5e6c84490de9d766878b1c3877e046 (diff)
parentf589687e9bd172f6f7841043a8de05d260889c8b (diff)
downloadotp-4bb581abb2ef40325ed5303b08ef89a1195134ff.tar.gz
otp-4bb581abb2ef40325ed5303b08ef89a1195134ff.tar.bz2
otp-4bb581abb2ef40325ed5303b08ef89a1195134ff.zip
Merge branch 'bjorn/erts/improve-beam-ops'
* bjorn/erts/improve-beam-ops: Move out variables from the head of combined instructions Change operand from 'P' to 'Q' for i_apply_last and i_apply_fun_last Add CHECK_ALIGNED() for testing storage destinations instrs.tab: Add missing -no_next directives beam_load.c: Generalize the 'P' operator in the packing engine Break out most of the initialization from process_main() Eliminate the OpCode() macro Eliminate unnecessary and inconsistent casts Refactor macros for accessing Beam instructions beam_emu: Make order of macros consistent beam_SUITE: Strengthen test of packed registers
Diffstat (limited to 'erts/emulator/beam/arith_instrs.tab')
-rw-r--r--erts/emulator/beam/arith_instrs.tab12
1 files changed, 6 insertions, 6 deletions
diff --git a/erts/emulator/beam/arith_instrs.tab b/erts/emulator/beam/arith_instrs.tab
index 3db19df3c4..b828e86788 100644
--- a/erts/emulator/beam/arith_instrs.tab
+++ b/erts/emulator/beam/arith_instrs.tab
@@ -85,9 +85,6 @@ i_increment := increment.fetch.execute;
increment.head() {
Eterm increment_reg_val;
- Eterm increment_val;
- Uint live;
- Eterm result;
}
increment.fetch(Src) {
@@ -95,7 +92,10 @@ increment.fetch(Src) {
}
increment.execute(IncrementVal, Live, Dst) {
- increment_val = $IncrementVal;
+ Eterm increment_val = $IncrementVal;
+ Uint live;
+ Eterm result;
+
if (ERTS_LIKELY(is_small(increment_reg_val))) {
Sint i = signed_val(increment_reg_val) + increment_val;
if (ERTS_LIKELY(IS_SSMALL(i))) {
@@ -366,10 +366,10 @@ shift.execute(Fail, Live, Dst) {
reg[0] = Op1;
reg[1] = Op2;
SWAPOUT;
- if (I[0] == (BeamInstr) OpCode(i_bsl_ssjtd)) {
+ if (IsOpCode(I[0], i_bsl_ssjtd)) {
I = handle_error(c_p, I, reg, &bif_export[BIF_bsl_2]->info.mfa);
} else {
- ASSERT(I[0] == (BeamInstr) OpCode(i_bsr_ssjtd));
+ ASSERT(IsOpCode(I[0], i_bsr_ssjtd));
I = handle_error(c_p, I, reg, &bif_export[BIF_bsr_2]->info.mfa);
}
goto post_error_handling;