File: merge-wowthk.s

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (44 lines) | stat: -rw-r--r-- 1,662 bytes parent folder | download | duplicates (11)
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
42
43
44
// REQUIRES: aarch64

// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %s -o %t-arm64ec.obj
// RUN: llvm-mc -filetype=obj -triple=aarch64-windows %s -o %t-arm64.obj
// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o %t-loadcfg.obj

// Check that .wowthk section is merged into .text on ARM64EC target.

// RUN: lld-link -out:%t.dll -machine:arm64ec %t-arm64ec.obj %t-loadcfg.obj -dll -noentry
// RUN: llvm-objdump -d %t.dll | FileCheck  -check-prefix=DISASM %s
// DISASM:      0000000180001000 <.text>:
// DISASM-NEXT: 180001000: 52800040     mov     w0, #0x2                // =2
// DISASM-NEXT: 180001004: d65f03c0     ret
// DISASM-NEXT: 180001008: 52800060     mov     w0, #0x3                // =3
// DISASM-NEXT: 18000100c: d65f03c0     ret

// Check that .wowthk section is not merged on aarch64 target.

// RUN: lld-link -out:%t.dll -machine:arm64 %t-arm64.obj -dll -noentry
// RUN: llvm-objdump -d %t.dll | FileCheck -check-prefix=DISASM2 %s
// DISASM2:      0000000180001000 <.text>:
// DISASM2-NEXT: 180001000: 52800040     mov     w0, #0x2                // =2
// DISASM2-NEXT: 180001004: d65f03c0     ret
// DISASM2-EMPTY:
// DISASM2-NEXT: Disassembly of section .wowthk:
// DISASM2-EMPTY:
// DISASM2-NEXT: 0000000180002000 <.wowthk>:
// DISASM2-NEXT: 180002000: 52800060     mov     w0, #0x3                // =3
// DISASM2-NEXT: 180002004: d65f03c0     ret


        .text
        .globl arm64ec_func_sym
        .p2align 2, 0x0
arm64ec_func_sym:
        mov w0, #2
        ret

        .section .wowthk$aa, "x"
        .globl wowthk_sym
        .p2align 3, 0x0
wowthk_sym:
        mov w0, #3
        ret