Changeset 3163 in CLRX


Ignore:
Timestamp:
Jun 15, 2017, 7:31:32 PM (2 years ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: Add description of new Gallium ABI for LLVM 4.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/doc/GalliumAbi.md

    r2334 r3163  
    2626Section '.rodata' ('.globaldata') hold constant data for kernels.
    2727Constant data is placed after code of kernels. Use PC pointer to get this data.
     28
     29## Gallium ABI description AMDHSA
     30
     31### Argument passing
     32
     33Argument is stored in memory which address is stored in s[6:7]. Argument begins from
     34the first dword in this memory. After kernel arguments are kernel dimensions.
     35List of data (number is dword offset after kernel argument):
     36
     37* 0 - number of dimensions
     38* 1-3 - global offsets for each dimensions
     39
     40Local sizes and other kernel setup is in memory which address is stored in s[4:5].
     41List of data (number is dword offset after kernel argument):
     42
     43* 1 - low 16-bits is global local size for X dimension, higher 16-bits is for Y dimension
     44* 2 - low 16-bits is global size for Z dimension
     45* 3-5 - global size for each dimension
     46
     47Userdata tooks 8 first scalar registers and holds:
     48
     49* s[0:3] - scratch buffer resource
     50* s[4:5] - kernel setup
     51* s[6:7] - address to argument list and kernel dimensions and global offsets
Note: See TracChangeset for help on using the changeset viewer.