llvm-project/llvm/test/MC/AMDGPU
Nicolai Haehnle 08e8cb5760 AMDGPU/MC: Add .amdgpu_lds directive
Summary:
The directive defines a symbol as an group/local memory (LDS) symbol.
LDS symbols behave similar to common symbols for the purposes of ELF,
using the processor-specific SHN_AMDGPU_LDS as section index.

It is the linker and/or runtime loader's job to "instantiate" LDS symbols
and resolve relocations that reference them.

It is not possible to initialize LDS memory (not even zero-initialize
as for .bss).

We want to be able to link together objects -- starting with relocatable
objects, but possible expanding to shared objects in the future -- that
access LDS memory in a flexible way.

LDS memory is in an address space that is entirely separate from the
address space that contains the program image (code and normal data),
so having program segments for it doesn't really make sense.

Furthermore, we want to be able to compile multiple kernels in a
compilation unit which have disjoint use of LDS memory. In that case,
we may want to place LDS symbols differently for different kernels
to save memory (LDS memory is very limited and physically private to
each kernel invocation), so we can't simply place LDS symbols in a
.lds section.

Hence this solution where LDS symbols always stay undefined.

Change-Id: I08cbc37a7c0c32f53f7b6123aa0afc91dbc1748f

Reviewers: arsenm, rampitec, t-tye, b-sumner, jsjodin

Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61493

llvm-svn: 364296
2019-06-25 11:51:35 +00:00
..
regression
add-sub-no-carry.s
branch-comment.s [AMDGPU] Implement AMDGPUMCInstrAnalysis 2019-03-05 03:02:00 +00:00
buf-fmt-d16-packed.s
buf-fmt-d16-unpacked.s
buffer_wbinv1l_vol_vi.s
data.s [AMDGPU][MC][GFX9] Added s_call_b64 2018-04-06 18:24:49 +00:00
dl-insts-err.s [AMDGPU][MC] Corrected parsing of op_sel* and neg_* modifiers 2019-05-22 13:59:01 +00:00
dl-insts.s AMDGPU: Fix v_dot{4, 8}* instruction encoding 2018-05-15 19:32:47 +00:00
dpp-err.s [AMDGPU] gfx1010 dpp16 and dpp8 2019-06-12 18:02:41 +00:00
ds-err.s [AMDGPU][MC] Corrected checks for DS offset0 range 2019-03-20 17:13:58 +00:00
ds-gfx9.s
ds.s [AMDGPU][MC] Added ds_add_src2_f32 2018-03-28 16:21:56 +00:00
elf-lds-error.s AMDGPU/MC: Add .amdgpu_lds directive 2019-06-25 11:51:35 +00:00
elf-lds.s AMDGPU/MC: Add .amdgpu_lds directive 2019-06-25 11:51:35 +00:00
elf-notes-verify-amdgcn.s
elf-notes-verify-r600.s
exp-err.s
exp-gfx10.s [AMDGPU] gfx1010 exp modifications 2019-05-08 21:23:37 +00:00
exp.s
expressions-gfx9.s [AMDGPU][MC] Corrected parsing of op_sel* and neg_* modifiers 2019-05-22 13:59:01 +00:00
expressions-gfx10.s [AMDGPU] more gfx1010 tests. NFC. 2019-06-12 18:44:11 +00:00
expressions.s [AMDGPU][MC] Corrected parsing of NAME:VALUE modifiers 2019-05-17 16:04:17 +00:00
flat-gfx9.s
flat-gfx10.s [AMDGPU] gfx1010 VMEM and SMEM implementation 2019-04-30 22:08:23 +00:00
flat-global.s [AMDGPU][MC] Enabled expressions for most operands which accept integer values 2019-05-17 13:17:48 +00:00
flat-scratch-instructions.s [AMDGPU] gfx1010 VMEM and SMEM implementation 2019-04-30 22:08:23 +00:00
flat-scratch.s
flat.s
fma-mix.s AMDGPU: Remove remnants of gfx901 (it was deprecated some time ago) 2018-05-01 18:47:48 +00:00
gfx7_asm_all.s AMDGPU: Remove redundant MIMG instruction variants 2018-06-21 13:37:55 +00:00
gfx8_asm_all.s AMDGPU: Remove redundant MIMG instruction variants 2018-06-21 13:37:55 +00:00
gfx9-vop2be-literal.s [AMDGPU] gfx1010 tests. NFC. 2019-05-08 23:31:32 +00:00
gfx9_asm_all.s AMDGPU: Add D16 instructions preserve unused bits feature 2018-05-04 20:06:57 +00:00
gfx10-constant-bus.s [AMDGPU] gfx1010 core wave32 changes 2019-06-20 15:08:34 +00:00
gfx10-vop2be-literal.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
gfx10_asm_all.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
gfx10_asm_dpp8.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
gfx10_asm_dpp16.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
gfx10_asm_err.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
gfx10_asm_mimg.s [AMDGPU] gfx1010 MIMG implementation 2019-05-01 16:32:58 +00:00
gfx10_asm_mimg_err.s [AMDGPU] gfx1010 MIMG implementation 2019-05-01 16:32:58 +00:00
gfx1011_dlops.s [AMDGPU] gfx1011/gfx1012 targets 2019-06-14 00:33:31 +00:00
gfx1011_err.s [AMDGPU] gfx1011/gfx1012 targets 2019-06-14 00:33:31 +00:00
hsa-diag-v3.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
hsa-exp.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
hsa-gfx10-v3.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
hsa-gfx10.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
hsa-metadata-kernel-args-v3.s [AMDGPU] Switched HSA metadata to use MsgPackDocument 2019-03-13 18:55:50 +00:00
hsa-metadata-kernel-args.s AMDHSA: More code object v3 fixes: 2018-11-15 23:14:23 +00:00
hsa-metadata-kernel-attrs-v3.s [AMDGPU] Switched HSA metadata to use MsgPackDocument 2019-03-13 18:55:50 +00:00
hsa-metadata-kernel-attrs.s AMDHSA: More code object v3 fixes: 2018-11-15 23:14:23 +00:00
hsa-metadata-kernel-code-props-v3.s [AMDGPU] Switched HSA metadata to use MsgPackDocument 2019-03-13 18:55:50 +00:00
hsa-metadata-kernel-code-props.s AMDHSA: More code object v3 fixes: 2018-11-15 23:14:23 +00:00
hsa-metadata-kernel-debug-props.s AMDHSA: More code object v3 fixes: 2018-11-15 23:14:23 +00:00
hsa-metadata-unknown-key.s AMDHSA: More code object v3 fixes: 2018-11-15 23:14:23 +00:00
hsa-sgpr-init-bug-v3.s [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples 2019-05-01 15:36:18 +00:00
hsa-text.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
hsa-v3.s [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples 2019-05-01 15:36:18 +00:00
hsa-wave-size.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
hsa.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
hsa_code_object_isa_args.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
hsa_isa_version_attrs.s [AMDGPU] gfx1010 wave32 metadata 2019-06-17 16:48:56 +00:00
invalid-instructions-spellcheck.s [AMDGPU][MC] Enabled expressions for most operands which accept integer values 2019-05-17 13:17:48 +00:00
isa-version-hsa.s AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
isa-version-pal.s AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
isa-version-unk.s AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
labels-branch-gfx9.s [AMDGPU][MC] Enabled labels with s_call_b64 and s_cbranch_i_fork 2019-05-17 14:57:04 +00:00
labels-branch.s
lds_direct-ci.s [AMDGPU][MC] Enable lds_direct operand for v_readfirstlane_b32, v_readlane_b32 and v_writelane_b32 2019-03-04 12:48:32 +00:00
lds_direct-err.s [AMDGPU][MC] Enable lds_direct operand for v_readfirstlane_b32, v_readlane_b32 and v_writelane_b32 2019-03-04 12:48:32 +00:00
lds_direct-gfx10.s [AMDGPU] gfx10 tests. NFC. 2019-06-20 16:29:40 +00:00
lds_direct.s [AMDGPU][MC] Enable lds_direct operand for v_readfirstlane_b32, v_readlane_b32 and v_writelane_b32 2019-03-04 12:48:32 +00:00
lit.local.cfg
literal16-err.s [AMDGPU][MC] Corrected conversion rules for inlinable constants to match rules for literals 2019-03-29 14:50:20 +00:00
literal16.s
literals.s [AMDGPU][MC] Added support of SCC, VCCZ and EXECZ operands 2019-06-03 13:51:24 +00:00
literalv216-err.s [AMDGPU] gfx1010 allows VOP3 to have a literal 2019-05-02 04:01:39 +00:00
literalv216.s [AMDGPU] gfx1010 allows VOP3 to have a literal 2019-05-02 04:01:39 +00:00
macro-examples.s
mad-mix.s AMDGPU: Add missing gfx904 tests 2018-05-01 17:05:44 +00:00
max-branch-distance.s
mimg-err.s
mimg.s [AMDGPU] support image load/store a16 2018-10-31 10:34:48 +00:00
mtbuf-gfx10.s [AMDGPU] gfx1010 MIMG implementation 2019-05-01 16:32:58 +00:00
mtbuf.s [AMDGPU] Implemented dwordx3 variants of buffer/tbuffer load/store intrinsics 2019-03-22 14:58:02 +00:00
mubuf-gfx9.s [AMDGPU][MC][GFX9] Added buffer_*_format_d16_hi_x 2018-03-28 14:53:13 +00:00
mubuf-gfx10.s [AMDGPU] gfx1010 DS implementation 2019-05-01 16:11:11 +00:00
mubuf.s [AMDGPU][MC] Corrected handling of tied src for atomic return MUBUF opcodes 2019-03-29 12:16:04 +00:00
out-of-range-registers.s [AMDGPU] gfx1010 SOP instructions 2019-04-24 20:44:34 +00:00
pal-msgpack.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
pal.s [llvm-readobj] Change -long-option to --long-option in tests. NFC 2019-05-01 05:27:20 +00:00
reg-syntax-err.s [AMDGPU][MC] Corrected parsing of registers 2019-04-17 14:44:01 +00:00
reg-syntax-extra.s [AMDGPU] gfx1010 VOP3 and VOP3P implementation 2019-04-26 17:56:03 +00:00
reloc.s [AMDGPU] gfx1010 allows VOP3 to have a literal 2019-05-02 04:01:39 +00:00
s_endpgm.s AMDGPU: Fix printing trailing whitespace after s_endpgm 2019-06-14 13:26:29 +00:00
smem-err.s
smem.s [AMDGPU] gfx1011/gfx1012 targets 2019-06-14 00:33:31 +00:00
smrd-err.s
smrd.s
sop1-err.s [AMDGPU][MC] Corrected parsing of registers 2019-04-17 14:44:01 +00:00
sop1.s [AMDGPU] gfx1010 SOP instructions 2019-04-24 20:44:34 +00:00
sop2-err.s [AMDGPU][MC] Disabled use of 2 different literals with SOP2/SOPC instructions 2019-01-18 13:57:43 +00:00
sop2.s [AMDGPU] gfx1010 SOP instructions 2019-04-24 20:44:34 +00:00
sopc-err.s [AMDGPU][MC][GFX8+] Added syntactic sugar for 'vgpr index' operand of instructions s_set_gpr_idx_on and s_set_gpr_idx_mode 2019-02-27 13:12:12 +00:00
sopc.s [AMDGPU] gfx1010 SOP instructions 2019-04-24 20:44:34 +00:00
sopk-err.s [AMDGPU][MC] Enabled constant expressions as operands of s_getreg/s_setreg 2019-06-13 12:46:37 +00:00
sopk.s [AMDGPU][MC] Enabled constant expressions as operands of s_getreg/s_setreg 2019-06-13 12:46:37 +00:00
sopp-err.s [AMDGPU][MC] Enabled constant expressions as operands of s_waitcnt 2019-05-27 14:08:43 +00:00
sopp-gfx9.s [AMDGPU] gfx1010 tests. NFC. 2019-05-08 23:31:32 +00:00
sopp.s [AMDGPU][MC] Enabled constant expressions as operands of s_waitcnt 2019-05-27 14:08:43 +00:00
spurious-pal-metadata.s [AMDGPU] Do not generate spurious PAL metadata 2019-03-20 22:02:09 +00:00
sym_kernel_scope.s
sym_option.s AMDGPU: Enable code object v3 for AMDHSA only 2018-11-15 02:32:43 +00:00
trap.s
vcmpx-gfx10.s [AMDGPU] gfx1010 tests. NFC. 2019-05-08 23:31:32 +00:00
vintrp-err.s
vintrp.s
vop-err.s
vop1-gfx9-err.s
vop1-gfx9.s [AMDGPU][MC][GFX9] Added v_screen_partition_4se_b32 2018-04-11 13:13:30 +00:00
vop1.s
vop2-err.s [AMDGPU] gfx1010 allows VOP3 to have a literal 2019-05-02 04:01:39 +00:00
vop2.s
vop3-convert.s
vop3-errs.s [AMDGPU][MC] Corrected parsing of NAME:VALUE modifiers 2019-05-17 16:04:17 +00:00
vop3-gfx9.s [AMDGPU][GFX8][GFX9] Corrected predicate of v_*_co_u32 aliases 2019-05-14 19:16:24 +00:00
vop3-literal.s [AMDGPU] more gfx1010 tests. NFC. 2019-06-12 18:44:11 +00:00
vop3-modifiers-err.s [AMDGPU][MC] Corrected parsing of SP3 'neg' modifier 2019-04-22 14:35:47 +00:00
vop3-modifiers.s
vop3-vop1-nosrc.s
vop3.s [AMDGPU][MC] Enabled expressions for most operands which accept integer values 2019-05-17 13:17:48 +00:00
vop3p-err.s [AMDGPU][MC] Corrected parsing of op_sel* and neg_* modifiers 2019-05-22 13:59:01 +00:00
vop3p.s AMDGPU: Add Vega12 and Vega20 2018-04-30 19:08:16 +00:00
vop_dpp.s [AMDGPU][MC] Added register size check for VOP3/SDWA/DPP operands 2019-02-27 13:58:48 +00:00
vop_dpp_expr.s
vop_sdwa.s [AMDGPU][MC] Enabled expressions for most operands which accept integer values 2019-05-17 13:17:48 +00:00
vopc-errs.s
vopc-vi.s
vopc.s
wave32.s [AMDGPU] gfx1010 core wave32 changes 2019-06-20 15:08:34 +00:00
xdl-insts-gfx1011-gfx1012.s [AMDGPU] gfx1011/gfx1012 targets 2019-06-14 00:33:31 +00:00
xnack-mask.s [AMDGPU] gfx1010 tests. NFC. 2019-05-08 23:31:32 +00:00