Ignore:
Timestamp:
Feb 15, 2018, 1:13:32 PM (18 months ago)
Author:
matszpk
Message:

CLRadeonExtender: CLRXDocs: Add info about .gotsym and section differences.

File:
1 edited

Legend:

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

    r3756 r3799  
    3535## Scalar register allocation
    3636
    37 Assembler for ROCm format counts all SGPR registers and add extra registers
     37An assembler for ROCm format counts all SGPR registers and add extra registers
    3838(FLAT_SCRATCH, XNACK_MASK). Special fields determines
    3939what extra SGPR extra has been added. The VCC register is included by default.
     40
     41## Expression with sections
     42
     43An assembler can calculate difference between symbols which present in one of three sections:
     44globaldata (rodata) section, code section and GOT (Global Offset Table) section.
     45For example, an expression `.-globaldata1` (if globaldata is defined in global data section)
     46calculates distance between current position and `globaldata1` place.
     47An assembler automcatically found section where symbol points to between code,
     48globaldata and GOT.
    4049
    4150## List of the specific pseudo-operations
     
    192201Enable usage of the DEBUG_MODE.
    193202
    194 ### .dims
    195 
    196 Syntax: .dims DIMENSIONS
    197 
    198 This pseudo-op must be inside kernel configuration (`.config`). Define what dimensions
    199 (from list: x, y, z) will be used to determine space of the kernel execution.
    200 
    201 ### .dx10clamp
    202 
    203 This pseudo-op must be inside kernel configuration (`.config`).
    204 Enable usage of the DX10_CLAMP.
    205 
    206 ### .eflags
    207 
    208 Syntax: .eflags EFLAGS
    209 
    210 Set value of ELF header e_flags field.
    211 
    212 ### .exceptions
    213 
    214 Syntax: .exceptions EXCPMASK
    215 
    216 This pseudo-op must be inside kernel configuration (`.config`).
    217 Set exception mask in PGMRSRC2 register value. Value should be 7-bit.
    218 
    219 ### .fixed_work_group_size
    220 
    221 Syntax: .fixed_work_group_size [SIZEHINT][, [SIZEHINT][, [SIZEHINT]]]
    222 
    223 This pseudo-operation must be inside any kernel configuration.
    224 Set fixed_work_group_size for this kernel in metadata info.
    225 
    226 ### .fkernel
    227 
    228 Mark given kernel as function in ROCm. Must be inside kernel.
    229 
    230 ### .floatmode
    231 
    232 Syntax: .floatmode BYTE-VALUE
    233 
    234 This pseudo-op must be inside kernel configuration (`.config`). Define float-mode.
    235 Set floatmode (FP_ROUND and FP_DENORM fields of the MODE register). Default value is 0xc0.
    236 
    237 ### .gds_segment_size
    238 
    239 Syntax: .gds_segment_size SIZE
    240 
    241 This pseudo-op must be inside kernel configuration (`.config`). Set
    242 `gds_segment_size` field in kernel configuration.
    243 
    244 ### .globaldata
    245 
    246 Go to constant global data section (`.rodata`).
    247 
    248 ### .group_segment_align
    249 
    250 Syntax: .group_segment_align ALIGN
    251 
    252 This pseudo-op must be inside kernel configuration (`.config`). Set
    253 `group_segment_align` field in kernel configuration.
    254 
    255203### .default_hsa_features
    256204
     
    259207These default features are `.use_private_segment_buffer`, `.use_dispatch_ptr`,
    260208`.use_kernarg_segment_ptr`, `.use_ptr64` and private_elem_size to 4 bytes.
     209
     210### .dims
     211
     212Syntax: .dims DIMENSIONS
     213
     214This pseudo-op must be inside kernel configuration (`.config`). Define what dimensions
     215(from list: x, y, z) will be used to determine space of the kernel execution.
     216
     217### .dx10clamp
     218
     219This pseudo-op must be inside kernel configuration (`.config`).
     220Enable usage of the DX10_CLAMP.
     221
     222### .eflags
     223
     224Syntax: .eflags EFLAGS
     225
     226Set value of ELF header e_flags field.
     227
     228### .exceptions
     229
     230Syntax: .exceptions EXCPMASK
     231
     232This pseudo-op must be inside kernel configuration (`.config`).
     233Set exception mask in PGMRSRC2 register value. Value should be 7-bit.
     234
     235### .fixed_work_group_size
     236
     237Syntax: .fixed_work_group_size [SIZEHINT][, [SIZEHINT][, [SIZEHINT]]]
     238
     239This pseudo-operation must be inside any kernel configuration.
     240Set fixed_work_group_size for this kernel in metadata info.
     241
     242### .fkernel
     243
     244Mark given kernel as function in ROCm. Must be inside kernel.
     245
     246### .floatmode
     247
     248Syntax: .floatmode BYTE-VALUE
     249
     250This pseudo-op must be inside kernel configuration (`.config`). Define float-mode.
     251Set floatmode (FP_ROUND and FP_DENORM fields of the MODE register). Default value is 0xc0.
     252
     253### .gds_segment_size
     254
     255Syntax: .gds_segment_size SIZE
     256
     257This pseudo-op must be inside kernel configuration (`.config`). Set
     258`gds_segment_size` field in kernel configuration.
     259
     260### .globaldata
     261
     262Go to constant global data section (`.rodata`).
     263
     264### .gotsym
     265
     266Syntax: .gotsym SYMBOL[, OUTSYMBOL]
     267
     268Add GOT entry for SYMBOL. A SYMBOL must be defined in global scope. Optionally, pseudo-op
     269set position of the GOT entry to OUTSYMBOL if symbol was given.
     270
     271### .group_segment_align
     272
     273Syntax: .group_segment_align ALIGN
     274
     275This pseudo-op must be inside kernel configuration (`.config`). Set
     276`group_segment_align` field in kernel configuration.
    261277
    262278### .ieeemode
Note: See TracChangeset for help on using the changeset viewer.