Index: docs/AMDGPUUsage.rst =================================================================== --- docs/AMDGPUUsage.rst +++ docs/AMDGPUUsage.rst @@ -263,8 +263,8 @@ Trap Handler ABI ---------------- -The Trap Handler suppored is implemented differently based on the host OS. OS -is obtained from the appropriate element of the target triple HSA OS: +The OS element of the target triple controls the trap handler behavior. OS is +obtained from the appropriate element of the target triple HSA OS: .. code-block:: c++ @@ -277,8 +277,11 @@ return isAmdHsaOS() ? TrapHandlerAbiHsa : TrapHandlerAbiNone; } -For HSA OS, a trap handler is always enabled and that the following S_TRAP immediate -operand codes are supported: +HSAOS +^^^^^ +For the HSA OS a trap handler is always enabled and supports the S_TRAP +instruction. The immediate operand of the S_TRAP instruction indicates the trap +reason as follows: .. code-block:: c++