aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-08-21 18:03:04 +0200
committerBjörn Gustavsson <[email protected]>2017-08-23 12:44:18 +0200
commit5bf73db9fd77bce195b7e78a8754730263068fb1 (patch)
tree56865b0805a23cf733a3af4130dba180ff720377 /erts/emulator/utils
parent8fc304e1e0c4a36dcb5abbe7a51de63ddc2cb285 (diff)
downloadotp-5bf73db9fd77bce195b7e78a8754730263068fb1.tar.gz
otp-5bf73db9fd77bce195b7e78a8754730263068fb1.tar.bz2
otp-5bf73db9fd77bce195b7e78a8754730263068fb1.zip
Add the 'S' type for a register source
The type 'd' could be used both for destination registers and source register. Restrict the 'd' type to only be used for destinations, and introduce the new 'S' type to be used when a source must be a register.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-xerts/emulator/utils/beam_makeops5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops
index fcbd3de4c1..ee8b12681f 100755
--- a/erts/emulator/utils/beam_makeops
+++ b/erts/emulator/utils/beam_makeops
@@ -139,6 +139,7 @@ my %arg_size = ('r' => 0, # x(0) - x register zero
'n' => 0, # NIL (implicit)
'c' => 1, # tagged constant (integer, atom, nil)
's' => 1, # tagged source; any of the above
+ 'S' => 1, # tagged source register (x or y)
'd' => 1, # tagged destination register (r, x, y)
'f' => 1, # failure label
'j' => 1, # either 'f' or 'p'
@@ -188,6 +189,7 @@ sub define_type_bit {
define_type_bit('s', $type_bit{'d'} | $type_bit{'i'} |
$type_bit{'a'} | $type_bit{'n'} |
$type_bit{'q'});
+ define_type_bit('S', $type_bit{'d'});
define_type_bit('j', $type_bit{'f'} | $type_bit{'p'});
# Aliases (for matching purposes).
@@ -1258,7 +1260,7 @@ sub basic_generator {
push(@f, "r(0)");
last SWITCH;
};
- /[lxy]/ and do {
+ /[lxyS]/ and do {
push(@f, $_ . "b(Arg($arg_offset))");
last SWITCH;
};
@@ -1462,6 +1464,7 @@ sub do_pack {
'y' => 10,
'Q' => 10,
'l' => 10,
+ 'S' => 16,
'd' => 16,
't' => 16);
if ($wordsize == 64) {