r247548 - [mips] Add test case to check ABI flag emissions in case of inline assembler

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 14 05:49:49 PDT 2015


Makes sense. I have updated CLANG_TEST_DEPS in r247554.

On Mon, Sep 14, 2015 at 9:38 PM Simon Atanasyan <simon at atanasyan.com> wrote:

> On Mon, Sep 14, 2015 at 3:24 PM, NAKAMURA Takumi <geek4civic at gmail.com>
> wrote:
> > Why is it tested in clang?
>
> Because the problem fixed by r247546 can be reproduced only in case of
> using inline assembler. And the problem is in the incorrect ELF header
> flag. So this test cannot be in llvm/test because there is no inline
> assembler there, and I cannot escape to use llvm-readobj because
> "-emit-llvm" produces correct code.
>
> > FYI, update CLANG_TEST_DEPS in clang/test/CMakeLists.txt, if it would
> remain
> > in clang/test.
>
> Thanks. Will update it soon.
>
> > On Mon, Sep 14, 2015 at 8:24 PM Simon Atanasyan via cfe-commits
> > <cfe-commits at lists.llvm.org> wrote:
> >>
> >> Author: atanasyan
> >> Date: Mon Sep 14 06:23:02 2015
> >> New Revision: 247548
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=247548&view=rev
> >> Log:
> >> [mips] Add test case to check ABI flag emissions in case of inline
> >> assembler
> >>
> >> Follow up to r247546. The test case reproduces the problem fixed by this
> >> commit.
> >>
> >> Added:
> >>     cfe/trunk/test/CodeGen/mips-inline-asm-abi.c
> >>
> >> Added: cfe/trunk/test/CodeGen/mips-inline-asm-abi.c
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mips-inline-asm-abi.c?rev=247548&view=auto
> >>
> >>
> ==============================================================================
> >> --- cfe/trunk/test/CodeGen/mips-inline-asm-abi.c (added)
> >> +++ cfe/trunk/test/CodeGen/mips-inline-asm-abi.c Mon Sep 14 06:23:02
> 2015
> >> @@ -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() {}
>
> --
> Simon Atanasyan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150914/7f391c81/attachment-0001.html>


More information about the cfe-commits mailing list