File: kd-zeroed-raw.s

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (41 lines) | stat: -rw-r--r-- 1,695 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
; RUN: llvm-mc %s --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -mattr=-xnack -filetype=obj -o %t1
; RUN: llvm-objdump --disassemble-symbols=my_kernel.kd %t1 \
; RUN: | tail -n +7 | llvm-mc --triple=amdgcn-amd-amdhsa -mcpu=gfx908 -mattr=-xnack -filetype=obj -o %t2
; RUN: llvm-objdump -s -j .text %t2 | FileCheck --check-prefix=OBJDUMP %s

;; Not running lit-test over gfx10 (see kd-zeroed-gfx10.s for details).
;; kd-zeroed-raw.s and kd-zeroed-*.s should produce the same output for the
;; kernel descriptor - a block of 64 zeroed bytes.

;; The disassembly will produce the contents of kd-zeroed-*.s which on being
;; assembled contains additional relocation info. A diff over the entire object
;; will fail in this case. So we check by looking the bytes in .text.

; OBJDUMP:      0000 00000000 00000000 00000000 00000000
; OBJDUMP-NEXT: 0010 00000000 00000000 00000000 00000000
; OBJDUMP-NEXT: 0020 00000000 00000000 00000000 00000000
; OBJDUMP-NEXT: 0030 00000000 00000000 00000000 00000000

;; The entire object is zeroed out.

.type	my_kernel.kd, @object
.size my_kernel.kd, 64
my_kernel.kd:
  .long 0x00000000           ;; group_segment_fixed_size
  .long 0x00000000           ;; private_segment_fixed_size
  .quad 0x0000000000000000   ;; reserved bytes.
  .quad 0x0000000000000000   ;; kernel_code_entry_byte_offset, any value works.

  ;; 20 reserved bytes.
  .quad 0x0000000000000000
  .quad 0x0000000000000000
  .long 0x00000000

  .long 0x00000000           ;; compute_PGM_RSRC3
  .long 0x00000000           ;; compute_PGM_RSRC1
  .long 0x00000000           ;; compute_PGM_RSRC2
  .short 0x0000              ;; additional fields.

  ;; 6 reserved bytes.
  .long 0x0000000
  .short 0x0000