aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/ops.tab
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-03-09 14:47:23 +0100
committerPatrik Nyblom <[email protected]>2012-03-22 18:16:15 +0100
commitc79e1106853bcfdabe7325a7073ce911ef75afaa (patch)
treea84bf66aa1a3596f724348d261a49ecf0bbe3fbd /erts/emulator/beam/ops.tab
parentc7f21d552b8034baecf8e7d078da5c9243826d2b (diff)
downloadotp-c79e1106853bcfdabe7325a7073ce911ef75afaa.tar.gz
otp-c79e1106853bcfdabe7325a7073ce911ef75afaa.tar.bz2
otp-c79e1106853bcfdabe7325a7073ce911ef75afaa.zip
If VM probes are not enabled, short-circuit calls to probe BIFs
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r--erts/emulator/beam/ops.tab89
1 files changed, 89 insertions, 0 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index fc53a88a3a..edc935e1ff 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -883,6 +883,95 @@ call_ext_last u==3 u$func:erlang:hibernate/3 D => i_hibernate
call_ext_only u==3 u$func:erlang:hibernate/3 => i_hibernate
#
+# If VM probes are not enabled, we want to short-circult calls to
+# the utag BIFs to make them as cheap as possible.
+#
+
+%unless USE_VM_PROBES
+
+call_ext Arity u$func:erlang:get_utag/0 => \
+ move a=am_undefined r
+call_ext_last Arity u$func:erlang:get_utag/0 D => \
+ move a=am_undefined r | deallocate D | return
+call_ext_only Arity u$func:erlang:get_utag/0 => \
+ move a=am_undefined r | return
+
+move Any r | call_ext Arity u$func:erlang:put_utag/1 => \
+ move a=am_undefined r
+move Any r | call_ext_last Arity u$func:erlang:put_utag/1 D => \
+ move a=am_undefined r | deallocate D | return
+move Any r | call_ext_only Arity u$func:erlang:put_utag/1 => \
+ move a=am_undefined r | return
+call_ext Arity u$func:erlang:put_utag/1 => \
+ move a=am_undefined r
+call_ext_last Arity u$func:erlang:put_utag/1 D => \
+ move a=am_undefined r | deallocate D | return
+call_ext_only Arity u$func:erlang:put_utag/1 => \
+ move a=am_undefined r | return
+
+call_ext Arity u$func:erlang:get_utag_data/0 => \
+ move a=am_undefined r
+call_ext_last Arity u$func:erlang:get_utag_data/0 D => \
+ move a=am_undefined r | deallocate D | return
+call_ext_only Arity u$func:erlang:get_utag_data/0 => \
+ move a=am_undefined r | return
+
+move Any r | call_ext Arity u$func:erlang:spread_utag/1 => \
+ move a=am_true r
+move Any r | call_ext_last Arity u$func:erlang:spread_utag/1 D => \
+ move a=am_true r | deallocate D | return
+move Any r | call_ext_only Arity u$func:erlang:spread_utag/1 => \
+ move a=am_true r | return
+call_ext Arity u$func:erlang:spread_utag/1 => \
+ move a=am_true r
+call_ext_last Arity u$func:erlang:spread_utag/1 D => \
+ move a=am_true r | deallocate D | return
+call_ext_only Arity u$func:erlang:spread_utag/1 => \
+ move a=am_true r | return
+
+move Any r | call_ext Arity u$func:erlang:restore_utag/1 => \
+ move a=am_true r
+move Any r | call_ext_last Arity u$func:erlang:restore_utag/1 D => \
+ move a=am_true r | deallocate D | return
+move Any r | call_ext_only Arity u$func:erlang:restore_utag/1 => \
+ move a=am_true r | return
+call_ext Arity u$func:erlang:restore_utag/1 => \
+ move a=am_true r
+call_ext_last Arity u$func:erlang:restore_utag/1 D => \
+ move a=am_true r | deallocate D | return
+call_ext_only Arity u$func:erlang:restore_utag/1 => \
+ move a=am_true r | return
+
+move Any r | call_ext Arity u$func:erlang:prepend_vm_utag_data/1 => \
+ move Any r
+move Any r | call_ext_last Arity u$func:erlang:prepend_vm_utag_data/1 D => \
+ move Any r | deallocate D | return
+move Any r | call_ext_only Arity u$func:erlang:prepend_vm_utag_data/1 => \
+ move Any r | return
+call_ext Arity u$func:erlang:prepend_vm_utag_data/1 =>
+call_ext_last Arity u$func:erlang:prepend_vm_utag_data/1 D => \
+ deallocate D | return
+call_ext_only Arity u$func:erlang:prepend_vm_utag_data/1 => \
+ return
+
+move Any r | call_ext Arity u$func:erlang:append_vm_utag_data/1 => \
+ move Any r
+move Any r | call_ext_last Arity u$func:erlang:append_vm_utag_data/1 D => \
+ move Any r | deallocate D | return
+move Any r | call_ext_only Arity u$func:erlang:append_vm_utag_data/1 => \
+ move Any r | return
+call_ext Arity u$func:erlang:append_vm_utag_data/1 =>
+call_ext_last Arity u$func:erlang:append_vm_utag_data/1 D => \
+ deallocate D | return
+call_ext_only Arity u$func:erlang:append_vm_utag_data/1 => \
+ return
+
+# Can happen after one of the transformations above.
+move Discarded r | move Something r => move Something r
+
+%endif
+
+#
# The general case for BIFs that have no special instructions.
# A BIF used in the tail must be followed by a return instruction.
#