r200221 - [Mips] Add tests to check MIPS arch macros.

Simon Atanasyan simon at atanasyan.com
Mon Jan 27 05:58:54 PST 2014


Author: atanasyan
Date: Mon Jan 27 07:58:54 2014
New Revision: 200221

URL: http://llvm.org/viewvc/llvm-project?rev=200221&view=rev
Log:
[Mips] Add tests to check MIPS arch macros.

Modified:
    cfe/trunk/test/Preprocessor/init.c

Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=200221&r1=200220&r2=200221&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Mon Jan 27 07:58:54 2014
@@ -1333,6 +1333,50 @@
 // MIPS64EL:#define _mips 1
 // MIPS64EL:#define mips 1
 //
+// Check MIPS arch macros
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none \
+// RUN:            < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-DEF32 %s
+//
+// MIPS-ARCH-DEF32:#define _MIPS_ARCH "mips32"
+// MIPS-ARCH-DEF32:#define _MIPS_ARCH_MIPS32 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-nones \
+// RUN:            -target-cpu mips32 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-32 %s
+//
+// MIPS-ARCH-32:#define _MIPS_ARCH "mips32"
+// MIPS-ARCH-32:#define _MIPS_ARCH_MIPS32 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none \
+// RUN:            -target-cpu mips32r2 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-32R2 %s
+//
+// MIPS-ARCH-32R2:#define _MIPS_ARCH "mips32r2"
+// MIPS-ARCH-32R2:#define _MIPS_ARCH_MIPS32R2 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN:            < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-DEF64 %s
+//
+// MIPS-ARCH-DEF64:#define _MIPS_ARCH "mips64"
+// MIPS-ARCH-DEF64:#define _MIPS_ARCH_MIPS64 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN:            -target-cpu mips64 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-64 %s
+//
+// MIPS-ARCH-64:#define _MIPS_ARCH "mips64"
+// MIPS-ARCH-64:#define _MIPS_ARCH_MIPS64 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN:            -target-cpu mips64r2 < /dev/null \
+// RUN:   | FileCheck -check-prefix MIPS-ARCH-64R2 %s
+//
+// MIPS-ARCH-64R2:#define _MIPS_ARCH "mips64r2"
+// MIPS-ARCH-64R2:#define _MIPS_ARCH_MIPS64R2 1
+//
 // Check MIPS float ABI macros
 //
 // RUN: %clang_cc1 -E -dM -ffreestanding \





More information about the cfe-commits mailing list