]> granicus.if.org Git - clang/commitdiff
[mips] Add test case to check ABI flag emissions in case of inline assembler
authorSimon Atanasyan <simon@atanasyan.com>
Mon, 14 Sep 2015 11:23:02 +0000 (11:23 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Mon, 14 Sep 2015 11:23:02 +0000 (11:23 +0000)
Follow up to r247546. The test case reproduces the problem fixed by this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247548 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/mips-inline-asm-abi.c [new file with mode: 0644]

diff --git a/test/CodeGen/mips-inline-asm-abi.c b/test/CodeGen/mips-inline-asm-abi.c
new file mode 100644 (file)
index 0000000..20c4f8d
--- /dev/null
@@ -0,0 +1,12 @@
+// REQUIRES: mips-registered-target
+// RUN: %clang_cc1 -triple mips-linux-gnu -emit-obj -o - %s | \
+// RUN:   llvm-readobj -h - | FileCheck %s
+
+// CHECK: EF_MIPS_ABI_O32
+
+__asm__(
+"bar:\n"
+"  nop\n"
+);
+
+void foo() {}