Commit 06b9fb2e authored by Kunshan Wang's avatar Kunshan Wang

Added the WPBRANCH instruction.

parent 8432b94d
......@@ -2283,8 +2283,8 @@ The ``FENCE`` is a fence of memory order *ord*. Its semantics is specified in
FENCE ACQ_REL
FENCE SEQ_CST
Traps
=====
Traps and Watchpoints
=====================
``TRAP`` and ``WATCHPOINT`` Instruction
---------------------------------------
......@@ -2506,6 +2506,43 @@ as the ID of *exc* being 0.
no longer valid. Then the client can enable the watchpoint 5678 and the
``%wp1234`` instruction will go to the client.
``WPBRANCH`` instruction
------------------------
``WPBRANCH`` *wpid* *dis* *ena*
wpid
*integer literal*: Watchpoint identifier.
dis, ena
*destination clause*: The destinations to jump to when *wpid* is disabled or
enabled.
``WPBRANCH``:
+------+------+------------+------------+
| opct | idt | destClause | destClause |
+======+======+============+============+
| 0xEA | wpid | dis | ena |
+------+------+------------+------------+
The ``WPBRANCH`` instruction is a binary branching instruction. The destination
is determined by whether the watchpoint ID *wpid* is enabled or disabled. It can
be enabled or disabled in the same way as ``WATCHPOINT``.
Unlike ``WATCHPOINT``, this instruction does not trap to the client, and is not
an OSR point.
Example::
%entry():
WPBRANCH 42 %cont() %oops()
%cont():
// continue normally here
%oops():
// Oops! Something happened!
Unsafe Native Call
==================
......
......@@ -790,7 +790,7 @@ in `<instruction-set.rest>`__.
The last instruction of any basic block must be a **terminator instruction**,
which is one of the following:
- ``BRANCH``, ``BRANCH2``, ``SWITCH``
- ``BRANCH``, ``BRANCH2``, ``SWITCH``, ``WPBRANCH``
- ``TAILCALL``
- ``RET``
- ``THROW``
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment