42 lines · plain
1; RUN: llvm-mc %s --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -mattr=-xnack -filetype=obj -o %t12; RUN: llvm-objdump --disassemble-symbols=my_kernel.kd %t1 \3; RUN: | tail -n +7 | llvm-mc --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -mattr=-xnack -filetype=obj -o %t24; RUN: llvm-objdump -s -j .text %t2 | FileCheck --check-prefix=OBJDUMP %s5 6;; Not running lit-test over gfx10 (see kd-zeroed-gfx10.s for details).7;; kd-zeroed-raw.s and kd-zeroed-*.s should produce the same output for the8;; kernel descriptor - a block of 64 zeroed bytes.9 10;; The disassembly will produce the contents of kd-zeroed-*.s which on being11;; assembled contains additional relocation info. A diff over the entire object12;; will fail in this case. So we check by looking the bytes in .text.13 14; OBJDUMP: 0000 00000000 00000000 00000000 0000000015; OBJDUMP-NEXT: 0010 00000000 00000000 00000000 0000000016; OBJDUMP-NEXT: 0020 00000000 00000000 00000000 0000000017; OBJDUMP-NEXT: 0030 00000000 00000000 00000000 0000000018 19;; The entire object is zeroed out.20 21.type my_kernel.kd, @object22.size my_kernel.kd, 6423my_kernel.kd:24 .long 0x00000000 ;; group_segment_fixed_size25 .long 0x00000000 ;; private_segment_fixed_size26 .quad 0x0000000000000000 ;; reserved bytes.27 .quad 0x0000000000000000 ;; kernel_code_entry_byte_offset, any value works.28 29 ;; 20 reserved bytes.30 .quad 0x000000000000000031 .quad 0x000000000000000032 .long 0x0000000033 34 .long 0x00000000 ;; compute_PGM_RSRC335 .long 0x00000000 ;; compute_PGM_RSRC136 .long 0x00000000 ;; compute_PGM_RSRC237 .short 0x0000 ;; additional fields.38 39 ;; 6 reserved bytes.40 .long 0x000000041 .short 0x000042