diff options
author | Björn Gustavsson <[email protected]> | 2017-09-05 08:30:30 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-09-14 10:16:14 +0200 |
commit | 76b4ff5c5db9610ecd09b11d3816f25b1e6b58f8 (patch) | |
tree | aecb19fae8594e23d90ef7fcb387a6e5a8b766ee | |
parent | ef43e32b450df2fdf1c731e9be03693fb0b69e31 (diff) | |
download | otp-76b4ff5c5db9610ecd09b11d3816f25b1e6b58f8.tar.gz otp-76b4ff5c5db9610ecd09b11d3816f25b1e6b58f8.tar.bz2 otp-76b4ff5c5db9610ecd09b11d3816f25b1e6b58f8.zip |
Add information about offset to common group start position
-rw-r--r-- | erts/emulator/beam/erl_vm.h | 1 | ||||
-rwxr-xr-x | erts/emulator/utils/beam_makeops | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h index f2d0af64df..076767c7cd 100644 --- a/erts/emulator/beam/erl_vm.h +++ b/erts/emulator/beam/erl_vm.h @@ -159,6 +159,7 @@ typedef struct op_entry { Uint32 mask[3]; /* Signature mask. */ unsigned involves_r; /* Needs special attention when matching. */ int sz; /* Number of loaded words. */ + int adjust; /* Adjustment for start of instruction. */ char* pack; /* Instructions for packing engine. */ char* sign; /* Signature string. */ } OpEntry; diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index e55d3eadb5..ccbd0dbaf4 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -80,6 +80,7 @@ my %gen_opnum; my %num_specific; my %gen_to_spec; my %specific_op; +my %group_size; # Group size for specific operators. my %gen_arity; my @gen_arity; @@ -623,7 +624,11 @@ sub emulator_output { $sep = ","; } $init .= "}"; - init_item($print_name, $init, $involves_r, $size, $pack, $sign); + my $adj = 0; + if (defined $group_size{$print_name}) { + $adj = $size - $group_size{$print_name}; + } + init_item($print_name, $init, $involves_r, $size, $adj, $pack, $sign); $op_to_name[$spec_opnum] = $instr; $spec_opnum++; } @@ -1171,6 +1176,7 @@ sub combine_instruction_group { if ($opcase ne '') { $gcode .= "OpCase($opcase):\n"; push @opcase_labels, $opcase; + $group_size{$opcase} = $group_size + 1; } if ($num_references{$label}) { $gcode .= "$label:\n"; |