aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/AMDGPU/gfx12_sendmsg.rst
blob: cb51be04555feada02190c4ea59679bc443dccfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.. _amdgpu_synid_sendmsg:

sendmsg
=======

An 8-bit value in simm16[7:0] encodes the message type.

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*.
    ==================================== ====================================================

*Type* may be specified using message *name* or message *id*.

Numeric values may be specified as positive :ref:`integer numbers<amdgpu_synid_integer_number>`
or :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.


Only the following message types are valid.

    ====================== ===========
    Message type           simm16[7:0]
    ====================== ===========
    Reserved               0 
    MSG_INTERRUPT          1
    MSG_HS_TESSFACTOR      2
    MSG_DEALLOC_VGPRS      3
    MSG_GS_ALLOC_REQ       9
    ====================== ===========

Examples:

.. parsed-literal::

    // numeric message code
    msg = 0x1
    s_sendmsg 0x3
    s_sendmsg msg + 2

    // sendmsg with strict arguments validation
    s_sendmsg sendmsg(MSG_INTERRUPT)