1 // RUN: llvm-mc -triple amdgcn--amdhsa -mcpu=kaveri -show-encoding %s | FileCheck %s --check-prefix=ASM 2 // RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri -show-encoding %s | llvm-readobj -s -sd | FileCheck %s --check-prefix=ELF 3 4 // For compatibility reasons we treat convert .text sections to .hsatext 5 6 // ELF: Section { 7 8 // We want to avoid emitting an empty .text section. 9 // ELF-NOT: Name: .text 10 11 // ELF: Name: .hsatext 12 // ELF: Type: SHT_PROGBITS (0x1) 13 // ELF: Flags [ (0xC00007) 14 // ELF: SHF_ALLOC (0x2) 15 // ELF: SHF_AMDGPU_HSA_AGENT (0x800000) 16 // ELF: SHF_AMDGPU_HSA_CODE (0x400000) 17 // ELF: SHF_EXECINSTR (0x4) 18 // ELF: SHF_WRITE (0x1) 19 // ELF: Size: 260 20 // ELF: } 21 22 .hsa_code_object_version 1,0 23 // ASM: .hsa_code_object_version 1,0 24 25 .hsa_code_object_isa 7,0,0,"AMD","AMDGPU" 26 // ASM: .hsa_code_object_isa 7,0,0,"AMD","AMDGPU" 27 28 .text 29 // ASM: .hsatext 30 31 .amd_kernel_code_t 32 .end_amd_kernel_code_t 33 34 s_endpgm 35