brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 4fc152e Raw
88 lines · plain
1// REQUIRES:arm2 3// RUN: rm -rf %t4// RUN: split-file %s %t5 6// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-base.s -o %t/base.o7// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-vfp.s -o %t/vfp.o8// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-vfp-arg-toolchain.s -o %t/toolchain.o9// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %t/main.s -o %t/main.o10// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %t/vendor.s -o %t/vendor.o11// RUN: not ld.lld %t/main.o %t/base.o %t/vfp.o -o%t/a.out 2>&1 | FileCheck %s12// RUN: not ld.lld %t/main.o %t/base.o %t/vendor.o -o%t/a.out 2>&1 | FileCheck %s13// RUN: not ld.lld %t/main.o %t/base.o %t/toolchain.o -o%t/a.out 2>&1 | FileCheck %s14// RUN: not ld.lld %t/main.o %t/vfp.o %t/base.o -o%t/a.out 2>&1 | FileCheck %s15// RUN: not ld.lld %t/main.o %t/vfp.o %t/toolchain.o -o%t/a.out 2>&1 | FileCheck %s16// RUN: not ld.lld %t/main.o %t/toolchain.o %t/base.o -o%t/a.out 2>&1 | FileCheck %s17// RUN: not ld.lld %t/main.o %t/toolchain.o %t/vfp.o -o%t/a.out 2>&1 | FileCheck %s18 19// CHECK: incompatible Tag_ABI_VFP_args20 21//--- main.s22 23	.arch armv7-a24	.eabi_attribute 20, 125	.eabi_attribute 21, 126	.eabi_attribute 23, 327	.eabi_attribute 24, 128	.eabi_attribute 25, 129	.eabi_attribute 26, 230	.eabi_attribute 30, 631	.eabi_attribute 34, 132	.eabi_attribute 18, 433        .eabi_attribute 28, 3 // Tag_ABI_VFP_args = 3 (Compatible with all)34 35        .syntax unified36        .globl _start37        .type _start, %function38_start: bx lr39 40//--- vendor.s41 42        .syntax unified43 44        // Manually construct a custom .ARM.attributes section45        .section .ARM.attributes,"",%0x70000003 // SHT_ARM_ATTRIBUTES46 47        // Initial byte giving the section format version48        .byte 'A'49 50        // Subsection with a name that won't be recognised as a known vendor51vendor_subsect_start:52        .word vendor_subsect_end - vendor_subsect_start // subsection length53        .asciz "ShouldBeIgnored" // vendor name54        .dcb.b 64, 0xff // dummy vendor section contents55vendor_subsect_end:56 57        // Subsection that should be identical to the attributes defined by58        // Inputs/arm-vfp-arg-vfp.s59aeabi_subsect_start:60        .word aeabi_subsect_end - aeabi_subsect_start61        .asciz "aeabi" // vendor name indicating the standard subsection62file_subsubsect_start:63        .byte 1 // introduce sub-subsection of attributes for the whole file64        .word file_subsubsect_end - file_subsubsect_start // sub-subsection len65        .byte 5 // CPU_name66        .asciz "7-A"67        .byte 6, 10 // CPU_arch = ARM v768        .byte 7, 'A' // CPU_arch_profile = Application69        .byte 8, 1 // ARM_ISA_use = Permitted70        .byte 9, 2 // THUMB_ISA_use = Thumb-271        .byte 18, 4 // ABI_PCS_wchar_t = 4-byte72        .byte 20, 1 // ABI_FP_denormal = IEEE-75473        .byte 21, 1 // ABI_FP_exceptions = IEEE-75474        .byte 23, 3 // ABI_FP_number_model = IEEE-75475        .byte 24, 1 // ABI_align_needed = 8-byte alignment76        .byte 25, 1 // ABI_align_preserved = 8-byte data alignment77        .byte 26, 2 // ABI_enum_size = Int3278        .byte 28, 1 // ABI_VFP_args = AAPCS VFP79        .byte 30, 6 // ABI_optimization_goals = Best Debugging80        .byte 34, 1 // CPU_unaligned_access = v6-style81file_subsubsect_end:82aeabi_subsect_end:83 84        .text85        .global f186        .type f1, %function87f1:     bx lr88