diff options
Diffstat (limited to 'llvm/docs/AMDGPU/gfx7_msg.rst')
| -rw-r--r-- | llvm/docs/AMDGPU/gfx7_msg.rst | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/llvm/docs/AMDGPU/gfx7_msg.rst b/llvm/docs/AMDGPU/gfx7_msg.rst index 5476053ccc1..72a895ef5b3 100644 --- a/llvm/docs/AMDGPU/gfx7_msg.rst +++ b/llvm/docs/AMDGPU/gfx7_msg.rst @@ -12,24 +12,29 @@ msg A 16-bit message code. The bits of this operand have the following meaning: - ============ ====================================================== - Bits Description - ============ ====================================================== - 3:0 Message *type*. - 6:4 Optional *operation*. - 9:7 Optional *parameters*. - 15:10 Unused. - ============ ====================================================== - -This operand may be specified as a positive 16-bit :ref:`integer_number<amdgpu_synid_integer_number>` or using the syntax described below: - - ======================================== ======================================================================== - Syntax Description - ======================================== ======================================================================== - sendmsg(<*type*>) A message identified by its *type*. - sendmsg(<*type*>, <*op*>) A message identified by its *type* and *operation*. - sendmsg(<*type*>, <*op*>, <*stream*>) A message identified by its *type* and *operation* with a stream *id*. - ======================================== ======================================================================== + ============ =============================== =============== + Bits Description Value Range + ============ =============================== =============== + 3:0 Message *type*. 0..15 + 6:4 Optional *operation*. 0..7 + 7:7 Unused. \- + 9:8 Optional *stream*. 0..3 + 15:10 Unused. \- + ============ =============================== =============== + +This operand may be specified as one of the following: + +* An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range 0..0xFFFF. +* A *sendmsg* value described below. + + ==================================== ==================================================== + Sendmsg Value Syntax Description + ==================================== ==================================================== + sendmsg(<*type*>) A message identified by its *type*. + sendmsg(<*type*>,<*op*>) A message identified by its *type* and *operation*. + sendmsg(<*type*>,<*op*>,<*stream*>) A message identified by its *type* and *operation* + with a stream *id*. + ==================================== ==================================================== *Type* may be specified using message *name* or message *id*. @@ -37,7 +42,8 @@ This operand may be specified as a positive 16-bit :ref:`integer_number<amdgpu_s Stream *id* is an integer in the range 0..3. -Message *id*, operation *id* and stream *id* must be specified as positive :ref:`integer numbers<amdgpu_synid_integer_number>`. +Numeric values may be specified as positive :ref:`integer numbers<amdgpu_synid_integer_number>` +or :ref:`absolute expressions<amdgpu_synid_absolute_expression>`. Each message type supports specific operations: @@ -58,15 +64,31 @@ Each message type supports specific operations: \ SYSMSG_OP_TTRACE_PC 4 \- ================= ========== ============================== ============ ========== +*Sendmsg* arguments are validated depending on how *type* value is specified: + +* If message *type* is specified by name, arguments values must satisfy limitations detailed in the table above. +* If message *type* is specified as a number, each argument must not exceed corresponding value range (see the first table). + Examples: .. parsed-literal:: + // numeric message code + msg = 0x10 s_sendmsg 0x12 + s_sendmsg msg + 2 + + // sendmsg with strict arguments validation s_sendmsg sendmsg(MSG_INTERRUPT) - s_sendmsg sendmsg(2, GS_OP_CUT) s_sendmsg sendmsg(MSG_GS, GS_OP_EMIT) s_sendmsg sendmsg(MSG_GS, 2) s_sendmsg sendmsg(MSG_GS_DONE, GS_OP_EMIT_CUT, 1) s_sendmsg sendmsg(MSG_SYSMSG, SYSMSG_OP_TTRACE_PC) + // sendmsg with validation of value range only + msg = 2 + op = 3 + stream = 1 + s_sendmsg sendmsg(msg, op, stream) + s_sendmsg sendmsg(2, GS_OP_CUT) + |

