1;; Failure test. We create a malformed kernel descriptor (KD) by manually 2;; setting the bytes, because one can't create a malformed KD using the 3;; assembler directives. 4 5; RUN: llvm-mc %s --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -filetype=obj -o %t.o 6 7; RUN: printf ".type my_kernel.kd, @object \nmy_kernel.kd:\n.size my_kernel.kd, 64\n" > %t1.sym_info 8; RUN: llvm-objdump --disassemble-symbols=my_kernel.kd %t.o \ 9; RUN: | tail -n +8 > %t1.sym_content 10; RUN: cat %t1.sym_info %t1.sym_content > %t1.s 11 12; RUN: llvm-mc %t1.s --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -filetype=obj -o %t-re-assemble.o 13; RUN: diff %t.o %t-re-assemble.o 14 15;; Test failure by setting one of the reserved bytes to non-zero value. 16 17.type my_kernel.kd, @object 18.size my_kernel.kd, 64 19my_kernel.kd: 20 .long 0x00000000 ;; group_segment_fixed_size 21 .long 0x00000000 ;; private_segment_fixed_size 22 .long 0x00000000 ;; kernarg_segment_size. 23 .long 0x00000000 ;; reserved bytes. 24 .quad 0x0000000000000000 ;; kernel_code_entry_byte_offset, any value works. 25 26 ;; 20 reserved bytes. 27 .quad 0x00FF000000000000 ;; reserved bytes. 28 .quad 0x0000000000000000 29 .long 0x00000000 30 31 .long 0x00000000 ;; compute_PGM_RSRC3 32 .long 0x00000000 ;; compute_PGM_RSRC1 33 .long 0x00000000 ;; compute_PGM_RSRC2 34 .short 0x0000 ;; additional fields. 35 36 ;; 6 reserved bytes. 37 .long 0x0000000 38 .short 0x0000 39