150
|
1 // Test that different values of -mhwmult pick correct
|
|
2 // MSP430 hwmult target-feature(s).
|
|
3
|
|
4 // RUN: %clang -### -target msp430 %s 2>&1 | FileCheck %s
|
|
5 // RUN: %clang -### -target msp430 %s -mhwmult=auto 2>&1 | FileCheck %s
|
|
6 // 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 %s
|
|
11 // RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
|
|
12 // RUN: %clang -### -target msp430 %s -mhwmult=none -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=CHECK-NONE %s
|
|
13 // 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 %s
|
|
18 // CHECK-16: "-target-feature" "+hwmult16"
|
|
19
|
|
20 // RUN: %clang -### -target msp430 %s -mhwmult=32bit 2>&1 | FileCheck --check-prefix=CHECK-32 %s
|
|
21 // CHECK-32: "-target-feature" "+hwmult32"
|
|
22
|
|
23 // RUN: %clang -### -target msp430 %s -mhwmult=f5series 2>&1 | FileCheck --check-prefix=CHECK-F5 %s
|
|
24 // CHECK-F5: "-target-feature" "+hwmultf5"
|
|
25
|
|
26 // RUN: %clang -### -target msp430 %s -mhwmult=rrr 2>&1 | FileCheck --check-prefix=INVL-ARG %s
|
|
27 // INVL-ARG: error: unsupported argument 'rrr' to option '-mhwmult=rrr'
|
|
28
|
|
29 // RUN: %clang -### -target msp430 %s -mhwmult=auto 2>&1 | FileCheck --check-prefix=WRN-NODEV %s
|
|
30 // 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 %s
|
|
35 // RUN: %clang -### -target msp430 %s -mhwmult=32bit -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s
|
|
36 // RUN: %clang -### -target msp430 %s -mhwmult=f5series -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s
|
|
37 // WRN-UNSUP: warning: the given MCU does not support hardware multiply, but -mhwmult is set to
|
|
38
|
|
39 // RUN: %clang -### -target msp430 %s -mhwmult=16bit -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s
|
|
40 // RUN: %clang -### -target msp430 %s -mhwmult=32bit -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s
|
|
41 // RUN: %clang -### -target msp430 %s -mhwmult=f5series -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s
|
|
42 // WRN-MISMCH: warning: the given MCU supports {{.*}} hardware multiply, but -mhwmult is set to {{.*}}
|