aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/ops.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-09-13 11:48:27 +0200
committerBjörn Gustavsson <[email protected]>2017-09-13 11:48:27 +0200
commitb36f0b6d381746a16c8d8c2bb3767d9ffb44c3f8 (patch)
treefb2b46887f842e06a87ce98169b81f62ff7fd8fe /erts/emulator/beam/ops.tab
parent89c5a525ea9dc47677ef7b68bd5e80fad1cb546e (diff)
parenta58daf5c38b4921c82008c811cd5dd178deef49f (diff)
downloadotp-b36f0b6d381746a16c8d8c2bb3767d9ffb44c3f8.tar.gz
otp-b36f0b6d381746a16c8d8c2bb3767d9ffb44c3f8.tar.bz2
otp-b36f0b6d381746a16c8d8c2bb3767d9ffb44c3f8.zip
Merge branch 'bjorn/erts/improve-beam-ops'
* bjorn/erts/improve-beam-ops: Add built-in macros $ARG_POSITION() and $IS_PACKED() Use 't' instead of 'I' bit syntax operands Optimize operand type for match context in i_bs_get_integer Change operand type from 's' to 'S' for a few instructions Use the correct name of the parameter
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r--erts/emulator/beam/ops.tab34
1 files changed, 18 insertions, 16 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 992857b099..3c9f5a4073 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -707,7 +707,7 @@ is_boolean f xy
is_function2 Fail=f acq Arity => jump Fail
is_function2 Fail=f Fun a => jump Fail
-is_function2 f s s
+is_function2 f S s
# Allocating & initializing.
allocate Need Regs | init Y => allocate_init Need Regs Y
@@ -1073,13 +1073,13 @@ func_info M F A => i_func_info u M F A
%warm
bs_start_match2 Fail=f ica X Y D => jump Fail
bs_start_match2 Fail Bin X Y D => i_bs_start_match2 Bin Fail X Y D
-i_bs_start_match2 xy f I I x
+i_bs_start_match2 xy f t t x
bs_save2 Reg Index => gen_bs_save(Reg, Index)
-i_bs_save2 x I
+i_bs_save2 x t
bs_restore2 Reg Index => gen_bs_restore(Reg, Index)
-i_bs_restore2 x I
+i_bs_restore2 x t
# Matching integers
bs_match_string Fail Ms Bits Val => i_bs_match_string Ms Fail Bits Val
@@ -1092,7 +1092,7 @@ bs_get_integer2 Fail=f Ms=x Live=u Sz=sq Unit=u Flags=u Dst=d => \
i_bs_get_integer_small_imm x W f t x
i_bs_get_integer_imm x W t f t x
-i_bs_get_integer f I I s s x
+i_bs_get_integer f t t x s x
i_bs_get_integer_8 x f x
i_bs_get_integer_16 x f x
@@ -1105,9 +1105,9 @@ bs_get_binary2 Fail=f Ms=x Live=u Sz=sq Unit=u Flags=u Dst=d => \
gen_get_binary2(Fail, Ms, Live, Sz, Unit, Flags, Dst)
i_bs_get_binary_imm2 f x t W t x
-i_bs_get_binary2 f x I s I x
-i_bs_get_binary_all2 f x I I x
-i_bs_get_binary_all_reuse x f I
+i_bs_get_binary2 f x t s t x
+i_bs_get_binary_all2 f x t t x
+i_bs_get_binary_all_reuse x f t
# Fetching float from binaries.
bs_get_float2 Fail=f Ms=x Live=u Sz=s Unit=u Flags=u Dst=d => \
@@ -1115,7 +1115,7 @@ bs_get_float2 Fail=f Ms=x Live=u Sz=s Unit=u Flags=u Dst=d => \
bs_get_float2 Fail=f Ms=x Live=u Sz=q Unit=u Flags=u Dst=d => jump Fail
-i_bs_get_float2 f x I s I x
+i_bs_get_float2 f x t s t x
# Miscellanous
@@ -1123,8 +1123,8 @@ bs_skip_bits2 Fail=f Ms=x Sz=sq Unit=u Flags=u => \
gen_skip_bits2(Fail, Ms, Sz, Unit, Flags)
i_bs_skip_bits_imm2 f x W
-i_bs_skip_bits2 f x xy I
-i_bs_skip_bits_all2 f x I
+i_bs_skip_bits2 f x xy t
+i_bs_skip_bits_all2 f x t
bs_test_tail2 Fail=f Ms=x Bits=u==0 => bs_test_zero_tail2 Fail Ms
bs_test_tail2 Fail=f Ms=x Bits=u => bs_test_tail_imm2 Fail Ms Bits
@@ -1132,7 +1132,7 @@ bs_test_zero_tail2 f x
bs_test_tail_imm2 f x W
bs_test_unit F Ms Unit=u==8 => bs_test_unit8 F Ms
-bs_test_unit f x I
+bs_test_unit f x t
bs_test_unit8 f x
# An y register operand for bs_context_to_binary is rare,
@@ -1153,7 +1153,7 @@ bs_skip_utf8 Fail=f Ms=x u u => i_bs_get_utf8 Ms Fail x
bs_get_utf16 Fail=f Ms=x u Flags=u Dst=d => i_bs_get_utf16 Ms Fail Flags Dst
bs_skip_utf16 Fail=f Ms=x u Flags=u => i_bs_get_utf16 Ms Fail Flags x
-i_bs_get_utf16 x f I x
+i_bs_get_utf16 x f t x
bs_get_utf32 Fail=f Ms=x Live=u Flags=u Dst=d => \
bs_get_integer2 Fail Ms Live i=32 u=1 Flags Dst | \
@@ -1162,7 +1162,7 @@ bs_skip_utf32 Fail=f Ms=x Live=u Flags=u => \
bs_get_integer2 Fail Ms Live i=32 u=1 Flags x | \
i_bs_validate_unicode_retract Fail x Ms
-i_bs_validate_unicode_retract j s s
+i_bs_validate_unicode_retract j s S
%hot
#
@@ -1221,7 +1221,7 @@ bs_private_append Fail Size Unit Bin Flags Dst => \
bs_init_writable
i_bs_append j I t t s x
-i_bs_private_append j t s s x
+i_bs_private_append j t s S x
#
# Storing integers into binaries.
@@ -1507,7 +1507,9 @@ i_band s s j t d
i_bor j I s s d
i_bxor j I s s d
-i_int_bnot j s t d
+i_int_bnot Fail Src=c Live Dst => move Src x | i_int_bnot Fail x Live Dst
+
+i_int_bnot j S t d
#
# Old guard BIFs that creates heap fragments are no longer allowed.