diff options
author | Björn Gustavsson <[email protected]> | 2015-06-23 08:53:50 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-07-03 14:34:56 +0200 |
commit | 135c9821e8806defa455a47208fb897fff1a3ff8 (patch) | |
tree | fc6842ad4eb26930a2d6a1f1daeeb58e094ea7a5 /erts/emulator/beam/erl_vm.h | |
parent | f0923b143ecfdacfe4873fc1e96c8ec69726a4d9 (diff) | |
download | otp-135c9821e8806defa455a47208fb897fff1a3ff8.tar.gz otp-135c9821e8806defa455a47208fb897fff1a3ff8.tar.bz2 otp-135c9821e8806defa455a47208fb897fff1a3ff8.zip |
Make the 'r' operand type optional
The 'r' type is now mandatory. That means in order to handle
both of the following instructions:
move x(0) y(7)
move x(1) y(7)
we would need to define two specific operations in ops.tab:
move r y
move x y
We want to make 'r' operands optional. That is, if we have
only this specific instruction:
move x y
it will match both of the following instructions:
move x(0) y(7)
move x(1) y(7)
Make 'r' optional allows us to save code space when we don't
want to make handling of x(0) a special case, but we can still
use 'r' to optimize commonly used instructions.
Diffstat (limited to 'erts/emulator/beam/erl_vm.h')
-rw-r--r-- | erts/emulator/beam/erl_vm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_vm.h b/erts/emulator/beam/erl_vm.h index cfc978b5a5..98f27a1725 100644 --- a/erts/emulator/beam/erl_vm.h +++ b/erts/emulator/beam/erl_vm.h @@ -141,6 +141,7 @@ typedef struct op_entry { char* name; /* Name of instruction. */ Uint32 mask[3]; /* Signature mask. */ + unsigned involves_r; /* Needs special attention when matching. */ int sz; /* Number of loaded words. */ char* pack; /* Instructions for packing engine. */ char* sign; /* Signature string. */ |