File: arm-tag-vfp-args-errs.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (87 lines) | stat: -rw-r--r-- 3,479 bytes parent folder | download | duplicates (12)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// REQUIRES:arm

// RUN: rm -rf %t
// RUN: split-file %s %t

// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-base.s -o %t/base.o
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-vfp.s -o %t/vfp.o
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-toolchain.s -o %t/toolchain.o
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %t/main.s -o %t/main.o
// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %t/vendor.s -o %t/vendor.o
// RUN: not ld.lld %t/main.o %t/base.o %t/vfp.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/base.o %t/vendor.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/base.o %t/toolchain.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/vfp.o %t/base.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/vfp.o %t/toolchain.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/toolchain.o %t/base.o -o%t/a.out 2>&1 | FileCheck %s
// RUN: not ld.lld %t/main.o %t/toolchain.o %t/vfp.o -o%t/a.out 2>&1 | FileCheck %s

// CHECK: incompatible Tag_ABI_VFP_args

//--- main.s

	.arch armv7-a
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 1
	.eabi_attribute 18, 4
        .eabi_attribute 28, 3 // Tag_ABI_VFP_args = 3 (Compatible with all)

        .syntax unified
        .globl _start
        .type _start, %function
_start: bx lr

//--- vendor.s

        .syntax unified

        // Manually construct a custom .ARM.attributes section
        .section .ARM.attributes,"",%0x70000003 // SHT_ARM_ATTRIBUTES

        // Initial byte giving the section format version
        .byte 'A'

        // Subsection with a name that won't be recognised as a known vendor
vendor_subsect_start:
        .word vendor_subsect_end - vendor_subsect_start // subsection length
        .asciz "ShouldBeIgnored" // vendor name
        .dcb.b 64, 0xff // dummy vendor section contents
vendor_subsect_end:

        // Subsection that should be identical to the attributes defined by
        // Inputs/arm-vfp-arg-vfp.s
aeabi_subsect_start:
        .word aeabi_subsect_end - aeabi_subsect_start
        .asciz "aeabi" // vendor name indicating the standard subsection
file_subsubsect_start:
        .byte 1 // introduce sub-subsection of attributes for the whole file
        .word file_subsubsect_end - file_subsubsect_start // sub-subsection len
        .byte 5 // CPU_name
        .asciz "7-A"
        .byte 6, 10 // CPU_arch = ARM v7
        .byte 7, 'A' // CPU_arch_profile = Application
        .byte 8, 1 // ARM_ISA_use = Permitted
        .byte 9, 2 // THUMB_ISA_use = Thumb-2
        .byte 18, 4 // ABI_PCS_wchar_t = 4-byte
        .byte 20, 1 // ABI_FP_denormal = IEEE-754
        .byte 21, 1 // ABI_FP_exceptions = IEEE-754
        .byte 23, 3 // ABI_FP_number_model = IEEE-754
        .byte 24, 1 // ABI_align_needed = 8-byte alignment
        .byte 25, 1 // ABI_align_preserved = 8-byte data alignment
        .byte 26, 2 // ABI_enum_size = Int32
        .byte 28, 1 // ABI_VFP_args = AAPCS VFP
        .byte 30, 6 // ABI_optimization_goals = Best Debugging
        .byte 34, 1 // CPU_unaligned_access = v6-style
file_subsubsect_end:
aeabi_subsect_end:

        .text
        .global f1
        .type f1, %function
f1:     bx lr