Skip to content

Commit 258e9b5

Browse files
vhscampossimpal01
authored andcommitted
Add logic to multilib.yaml to handle cases of armebv7a_soft_nofp and armebv7a_hard_vfpv3_d16 variants (#99)
These variants were missing some logic in multilib.yaml: some of the flag matching rules existed only for little endian. Thus they had to be copied for big endian as well. Besides the changes to multilib.yaml, tests have been added to properly test the library selection of the variants. (cherry picked from commit 128f026)
1 parent 1aeab35 commit 258e9b5

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

arm-software/embedded/arm-multilib/multilib.yaml.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ Mappings:
122122
- Match: --target=thumbv7-unknown-none-eabihf
123123
Flags:
124124
- --target=armv7-unknown-none-eabihf
125+
- Match: --target=thumbebv7-unknown-none-eabihf
126+
Flags:
127+
- --target=armebv7-unknown-none-eabihf
125128
- Match: --target=thumbv4t-unknown-none-eabi
126129
Flags:
127130
- --target=armv4t-unknown-none-eabi
@@ -146,6 +149,9 @@ Mappings:
146149
- Match: --target=(arm|thumb)v7ve-unknown-none-eabihf
147150
Flags:
148151
- --target=armv7-unknown-none-eabihf
152+
- Match: --target=(arm|thumb)ebv7ve-unknown-none-eabihf
153+
Flags:
154+
- --target=armebv7-unknown-none-eabihf
149155

150156
# Higher versions of the architecture such as v8-A and v9-A are a superset of
151157
# v7-A.

arm-software/embedded/test/multilib/armv7a.test

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
# NOFP-EXN-RTTI: arm-none-eabi/armv7a_soft_nofp_exn_rtti{{$}}
1717
# NOFP-EXN-RTTI-EMPTY:
1818

19+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
20+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
21+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
22+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
23+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
24+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-EXN-RTTI-BE %s
25+
# NOFP-EXN-RTTI-BE: arm-none-eabi/armebv7a_soft_nofp_exn_rtti{{$}}
26+
# NOFP-EXN-RTTI-BE-EMPTY:
27+
1928
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED
2029
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -marm -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED
2130
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mthumb -fno-exceptions -fno-rtti | FileCheck %s --check-prefix=NOFP-UNALIGNED
@@ -34,6 +43,15 @@
3443
# NOFP: arm-none-eabi/armv7a_soft_nofp{{$}}
3544
# NOFP-EMPTY:
3645

46+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=NOFP-BE %s
47+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-BE %s
48+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-BE %s
49+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=NOFP-BE %s
50+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -marm | FileCheck --check-prefix=NOFP-BE %s
51+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mbig-endian -mfpu=none -fno-exceptions -fno-rtti -mno-unaligned-access -mthumb| FileCheck --check-prefix=NOFP-BE %s
52+
# NOFP-BE: arm-none-eabi/armebv7a_soft_nofp{{$}}
53+
# NOFP-BE-EMPTY:
54+
3755
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s
3856
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s
3957
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3-EXN-RTTI-UNALIGNED %s
@@ -66,6 +84,22 @@
6684
# VFPV3-EXN-RTTI: arm-none-eabi/armv7a_hard_vfpv3_d16_exn_rtti{{$}}
6785
# VFPV3-EXN-RTTI-EMPTY:
6886

87+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
88+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-vfpv3 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
89+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
90+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
91+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
92+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv4-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
93+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv4 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
94+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-fp16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
95+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-vfpv4 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
96+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -marm -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
97+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
98+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
99+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-EXN-RTTI-BE %s
100+
# VFPV3-EXN-RTTI-BE: arm-none-eabi/armebv7a_hard_vfpv3_d16_exn_rtti{{$}}
101+
# VFPV3-EXN-RTTI-BE-EMPTY:
102+
69103
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti | FileCheck --check-prefix=VFPV3-UNALIGNED %s
70104
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s
71105
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 -fno-exceptions -fno-rtti| FileCheck --check-prefix=VFPV3-UNALIGNED %s
@@ -98,6 +132,22 @@
98132
# VFPV3: arm-none-eabi/armv7a_hard_vfpv3_d16{{$}}
99133
# VFPV3-EMPTY:
100134

135+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
136+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-vfpv3 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
137+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
138+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
139+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
140+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv4-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
141+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv4 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
142+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-fp16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
143+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=neon-vfpv4 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
144+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -marm -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
145+
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -mthumb -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
146+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
147+
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabihf -mbig-endian -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mthumb -mno-unaligned-access | FileCheck --check-prefix=VFPV3-BE %s
148+
# VFPV3-BE: arm-none-eabi/armebv7a_hard_vfpv3_d16{{$}}
149+
# VFPV3-BE-EMPTY:
150+
101151
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3-d16 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s
102152
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=neon-vfpv3 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s
103153
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=vfpv3 -mfloat-abi=softfp | FileCheck --check-prefix=SOFT-VFPV3-EXN-RTTI-UNALIGNED %s

0 commit comments

Comments
 (0)