brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 3ba6bfc Raw
43 lines · c
1// Test that different values of -mhwmult pick correct2// MSP430 hwmult target-feature(s).3 4// RUN: %clang -### --target=msp430 %s 2>&1 | FileCheck %s5// RUN: %clang -### --target=msp430 %s -mhwmult=auto 2>&1 | FileCheck %s6// CHECK-NOT: "-target-feature" "+hwmult16"7// CHECK-NOT: "-target-feature" "+hwmult32"8// CHECK-NOT: "-target-feature" "+hwmultf5"9 10// RUN: %clang -### --target=msp430 %s -mhwmult=none 2>&1 | FileCheck --check-prefix=CHECK-NONE %s11// RUN: %clang -### --target=msp430 %s -mhwmult=none -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=CHECK-NONE %s12// RUN: %clang -### --target=msp430 %s -mhwmult=none -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=CHECK-NONE %s13// CHECK-NONE: "-target-feature" "-hwmult16"14// CHECK-NONE: "-target-feature" "-hwmult32"15// CHECK-NONE: "-target-feature" "-hwmultf5"16 17// RUN: %clang -### --target=msp430 %s -mhwmult=16bit 2>&1 | FileCheck --check-prefix=CHECK-16 %s18// CHECK-16: "-target-feature" "+hwmult16"19 20// RUN: %clang  -### --target=msp430 %s -mhwmult=32bit 2>&1 | FileCheck --check-prefix=CHECK-32 %s21// CHECK-32: "-target-feature" "+hwmult32"22 23// RUN: %clang  -### --target=msp430 %s -mhwmult=f5series 2>&1 | FileCheck --check-prefix=CHECK-F5 %s24// CHECK-F5: "-target-feature" "+hwmultf5"25 26// RUN: not %clang  -### --target=msp430 %s -mhwmult=rrr 2>&1 | FileCheck --check-prefix=INVL-ARG %s27// INVL-ARG: error: unsupported argument 'rrr' to option '-mhwmult='28 29// RUN: %clang  -### --target=msp430 %s -mhwmult=auto 2>&1 | FileCheck --check-prefix=WRN-NODEV %s30// WRN-NODEV: warning: no MCU device specified, but '-mhwmult' is set to 'auto',31//            assuming no hardware multiply; use '-mmcu' to specify a MSP430 device,32//            or '-mhwmult' to set hardware multiply type explicitly.33 34// RUN: %clang  -### --target=msp430 %s -mhwmult=16bit -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s35// RUN: %clang  -### --target=msp430 %s -mhwmult=32bit -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s36// RUN: %clang  -### --target=msp430 %s -mhwmult=f5series -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s37// WRN-UNSUP: warning: the given MCU does not support hardware multiply, but '-mhwmult' is set to38 39// RUN: %clang  -### --target=msp430 %s -mhwmult=16bit -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s40// RUN: %clang  -### --target=msp430 %s -mhwmult=32bit -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s41// RUN: %clang  -### --target=msp430 %s -mhwmult=f5series -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s42// WRN-MISMCH: warning: the given MCU supports {{.*}} hardware multiply, but '-mhwmult' is set to {{.*}}43