aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/erl_vm.h1
-rwxr-xr-xerts/emulator/utils/beam_makeops8
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";