aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/utils
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-08-17 06:49:22 +0200
committerBjörn Gustavsson <[email protected]>2017-08-23 05:57:38 +0200
commitcbeeed095739223a425649f6085b6959ad905c83 (patch)
treeed58bc08a28edf53172656d36acb528a014b348d /erts/emulator/utils
parent7f7905f653170daf8a185636329701486fec4ad8 (diff)
downloadotp-cbeeed095739223a425649f6085b6959ad905c83.tar.gz
otp-cbeeed095739223a425649f6085b6959ad905c83.tar.bz2
otp-cbeeed095739223a425649f6085b6959ad905c83.zip
beam_makeops: Introduce the new type 'W' (machine word)
As a preparation for potentially improving packing in the future, we will need to make sure that packable types have a defined maximum size. The packer algorithm assumes that two 'I' operands can be packed into one 64-bit word, but there are instructions that use an 'I' operand to store a pointer. It only works because those instructions are not packed for other reasons. Introduce the 'W' type and use it for operands that don't fit in 32 bits.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-xerts/emulator/utils/beam_makeops8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops
index bbc487dd61..4108138b51 100755
--- a/erts/emulator/utils/beam_makeops
+++ b/erts/emulator/utils/beam_makeops
@@ -149,8 +149,9 @@ my %arg_size = ('r' => 0, # x(0) - x register zero
'j' => 1, # either 'f' or 'p'
'e' => 1, # pointer to export entry
'L' => 0, # label
- 'I' => 1, # untagged integer
- 't' => 1, # untagged integer -- can be packed
+ 't' => 1, # untagged integer (12 bits) -- can be packed
+ 'I' => 1, # untagged integer (32 bits) -- can be packed
+ 'W' => 1, # untagged integer/pointer (one word)
'b' => 1, # pointer to bif
'A' => 1, # arity value
'P' => 1, # byte offset into tuple or stack
@@ -195,8 +196,9 @@ sub define_type_bit {
define_type_bit('j', $type_bit{'f'} | $type_bit{'p'});
# Aliases (for matching purposes).
- define_type_bit('I', $type_bit{'u'});
define_type_bit('t', $type_bit{'u'});
+ define_type_bit('I', $type_bit{'u'});
+ define_type_bit('W', $type_bit{'u'});
define_type_bit('A', $type_bit{'u'});
define_type_bit('L', $type_bit{'u'});
define_type_bit('b', $type_bit{'u'});