1// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 2// RUN: FileCheck -check-prefix=ABI-O32 %s 3// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=32 2>&1 | \ 4// RUN: FileCheck -check-prefix=ABI-O32 %s 5// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=o32 2>&1 | \ 6// RUN: FileCheck -check-prefix=ABI-O32 %s 7// ABI-O32: -cc1as 8// ABI-O32: "-target-feature" "-n64" 9// ABI-O32: "-target-feature" "+o32" 10 11// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=eabi 2>&1 | \ 12// RUN: FileCheck -check-prefix=ABI-EABI32 %s 13// ABI-EABI32: -cc1as 14// ABI-EABI32: "-target-feature" "-o32" 15// ABI-EABI32: "-target-feature" "-n64" 16// ABI-EABI32: "-target-feature" "+eabi" 17 18// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \ 19// RUN: FileCheck -check-prefix=ABI-N32 %s 20// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mabi=n32 2>&1 | \ 21// RUN: FileCheck -check-prefix=ABI-N32 %s 22// ABI-N32: -cc1as 23// ABI-N32: "-target-feature" "-o32" 24// ABI-N32: "-target-feature" "-n64" 25// ABI-N32: "-target-feature" "+n32" 26 27// FIXME: We should also test '-target mips-linux-gnu -mips64' defaults to the 28// default 64-bit ABI (N64 but GCC uses N32). It currently selects O32 29// because of the triple. 30// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 2>&1 | \ 31// RUN: FileCheck -check-prefix=ABI-N64 %s 32// 33// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ 34// RUN: FileCheck -check-prefix=ABI-N64 %s 35// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ 36// RUN: FileCheck -check-prefix=ABI-N64 %s 37// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \ 38// RUN: FileCheck -check-prefix=ABI-N64 %s 39// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \ 40// RUN: FileCheck -check-prefix=ABI-N64 %s 41// ABI-N64: -cc1as 42// ABI-N64: "-target-feature" "-o32" 43// ABI-N64: "-target-feature" "+n64" 44 45// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msoft-float 2>&1 | \ 46// RUN: FileCheck -check-prefix=SOFTFLOAT %s 47// SOFTFLOAT: -cc1as 48// SOFTFLOAT: "-target-feature" "+soft-float" 49 50// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 51// RUN: FileCheck -check-prefix=HARDFLOAT %s 52// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mhard-float 2>&1 | \ 53// RUN: FileCheck -check-prefix=HARDFLOAT %s 54// HARDFLOAT: -cc1as 55// HARDFLOAT-NOT: "-target-feature" "+soft-float" 56 57// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 58// RUN: FileCheck -check-prefix=NAN-DEFAULT %s 59// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips32r6 2>&1 | \ 60// RUN: FileCheck -check-prefix=NAN-DEFAULT %s 61// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64r6 2>&1 | \ 62// RUN: FileCheck -check-prefix=NAN-DEFAULT %s 63// NAN-DEFAULT: -cc1as 64// NAN-DEFAULT-NOT: "-target-feature" "{{[-+]}}nan2008" 65 66// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=legacy 2>&1 | \ 67// RUN: FileCheck -check-prefix=NAN-LEGACY %s 68// NAN-LEGACY: -cc1as 69// NAN-LEGACY: "-target-feature" "-nan2008" 70 71// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=2008 2>&1 | \ 72// RUN: FileCheck -check-prefix=NAN-2008 %s 73// NAN-2008: -cc1as 74// NAN-2008: "-target-feature" "+nan2008" 75 76// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 77// RUN: FileCheck -check-prefix=DEFAULT-FLOAT %s 78// DEFAULT-FLOAT: -cc1as 79// DEFAULT-FLOAT-NOT: "-target-feature" "{{[+-]}}single-float" 80 81// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msingle-float 2>&1 | \ 82// RUN: FileCheck -check-prefix=SINGLE-FLOAT %s 83// SINGLE-FLOAT: -cc1as 84// SINGLE-FLOAT: "-target-feature" "+single-float" 85 86// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdouble-float 2>&1 | \ 87// RUN: FileCheck -check-prefix=DOUBLE-FLOAT %s 88// DOUBLE-FLOAT: -cc1as 89// DOUBLE-FLOAT: "-target-feature" "-single-float" 90 91// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 92// RUN: FileCheck -check-prefix=MIPS16-DEFAULT %s 93// MIPS16-DEFAULT: -cc1as 94// MIPS16-DEFAULT-NOT: "-target-feature" "{{[+-]}}mips16" 95 96// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips16 2>&1 | \ 97// RUN: FileCheck -check-prefix=MIPS16-ON %s 98// MIPS16-ON: -cc1as 99// MIPS16-ON: "-target-feature" "+mips16" 100 101// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-mips16 2>&1 | \ 102// RUN: FileCheck -check-prefix=MIPS16-OFF %s 103// MIPS16-OFF: -cc1as 104// MIPS16-OFF: "-target-feature" "-mips16" 105 106// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 107// RUN: FileCheck -check-prefix=MICROMIPS-DEFAULT %s 108// MICROMIPS-DEFAULT: -cc1as 109// MICROMIPS-DEFAULT-NOT: "-target-feature" "{{[+-]}}micromips" 110 111// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmicromips 2>&1 | \ 112// RUN: FileCheck -check-prefix=MICROMIPS-ON %s 113// MICROMIPS-ON: -cc1as 114// MICROMIPS-ON: "-target-feature" "+micromips" 115 116// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-micromips 2>&1 | \ 117// RUN: FileCheck -check-prefix=MICROMIPS-OFF %s 118// MICROMIPS-OFF: -cc1as 119// MICROMIPS-OFF: "-target-feature" "-micromips" 120 121// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 122// RUN: FileCheck -check-prefix=DSP-DEFAULT %s 123// DSP-DEFAULT: -cc1as 124// DSP-DEFAULT-NOT: "-target-feature" "{{[+-]}}dsp" 125 126// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdsp 2>&1 | \ 127// RUN: FileCheck -check-prefix=DSP-ON %s 128// DSP-ON: -cc1as 129// DSP-ON: "-target-feature" "+dsp" 130 131// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dsp 2>&1 | \ 132// RUN: FileCheck -check-prefix=DSP-OFF %s 133// DSP-OFF: -cc1as 134// DSP-OFF: "-target-feature" "-dsp" 135 136// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 137// RUN: FileCheck -check-prefix=DSPR2-DEFAULT %s 138// DSPR2-DEFAULT: -cc1as 139// DSPR2-DEFAULT-NOT: "-target-feature" "{{[+-]}}dspr2" 140 141// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdspr2 2>&1 | \ 142// RUN: FileCheck -check-prefix=DSPR2-ON %s 143// DSPR2-ON: -cc1as 144// DSPR2-ON: "-target-feature" "+dspr2" 145 146// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dspr2 2>&1 | \ 147// RUN: FileCheck -check-prefix=DSPR2-OFF %s 148// DSPR2-OFF: -cc1as 149// DSPR2-OFF: "-target-feature" "-dspr2" 150 151// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 152// RUN: FileCheck -check-prefix=MSA-DEFAULT %s 153// MSA-DEFAULT: -cc1as 154// MSA-DEFAULT-NOT: "-target-feature" "{{[+-]}}msa" 155 156// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmsa 2>&1 | \ 157// RUN: FileCheck -check-prefix=MSA-ON %s 158// MSA-ON: -cc1as 159// MSA-ON: "-target-feature" "+msa" 160 161// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-msa 2>&1 | \ 162// RUN: FileCheck -check-prefix=MSA-OFF %s 163// MSA-OFF: -cc1as 164// MSA-OFF: "-target-feature" "-msa" 165 166// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 167// RUN: FileCheck -check-prefix=FPXX-DEFAULT %s 168// FPXX-DEFAULT: -cc1as 169// FPXX-DEFAULT-NOT: "-target-feature" "+fpxx" 170// FPXX-DEFAULT-NOT: "-target-feature" "+nooddspreg" 171 172// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp32 2>&1 | \ 173// RUN: FileCheck -check-prefix=FP32 %s 174// FP32: -cc1as 175// FP32: "-target-feature" "-fp64" 176 177// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx 2>&1 | \ 178// RUN: FileCheck -check-prefix=FPXX %s 179// FPXX: -cc1as 180// FPXX: "-target-feature" "+fpxx" 181// FPXX: "-target-feature" "+nooddspreg" 182 183// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp64 2>&1 | \ 184// RUN: FileCheck -check-prefix=FP64 %s 185// FP64: -cc1as 186// FP64: "-target-feature" "+fp64" 187 188// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \ 189// RUN: FileCheck -check-prefix=ODDSPREG-DEFAULT %s 190// ODDSPREG-DEFAULT: -cc1as 191// ODDSPREG-DEFAULT-NOT: "-target-feature" "{{[+-]}}nooddspreg" 192 193// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -modd-spreg 2>&1 | \ 194// RUN: FileCheck -check-prefix=ODDSPREG-ON %s 195// ODDSPREG-ON: -cc1as 196// ODDSPREG-ON: "-target-feature" "-nooddspreg" 197 198// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-odd-spreg 2>&1 | \ 199// RUN: FileCheck -check-prefix=ODDSPREG-OFF %s 200// ODDSPREG-OFF: -cc1as 201// ODDSPREG-OFF: "-target-feature" "+nooddspreg" 202 203// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx -modd-spreg 2>&1 | \ 204// RUN: FileCheck -check-prefix=FPXX-ODDSPREG %s 205// FPXX-ODDSPREG: -cc1as 206// FPXX-ODDSPREG: "-target-feature" "+fpxx" 207// FPXX-ODDSPREG: "-target-feature" "-nooddspreg" 208 209// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabicalls 2>&1 | \ 210// RUN: FileCheck -check-prefix=ABICALLS-ON %s 211// ABICALLS-ON: -cc1as 212// ABICALLS-ON: "-target-feature" "-noabicalls" 213 214// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-abicalls 2>&1 | \ 215// RUN: FileCheck -check-prefix=ABICALLS-OFF %s 216// ABICALLS-OFF: -cc1as 217// ABICALLS-OFF: "-target-feature" "+noabicalls" 218