https://bugs.llvm.org/show_bug.cgi?id=49023

            Bug ID: 49023
           Summary: clang's integrated assembler doesn't permit setting
                    -Wa,-mimplicit-it=always
           Product: clang
           Version: trunk
          Hardware: PC
               URL: https://github.com/ClangBuiltLinux/linux/issues/1270
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: ndesaulni...@google.com
                CC: a...@linaro.org, caij2...@gmail.com,
                    david.spick...@linaro.org, htmldevelo...@gmail.com,
                    kristof.be...@arm.com, lloz...@chromium.org,
                    llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk, srhi...@google.com
            Blocks: 4068

While it seems we can use the internal flag `-mllvm --arm-implicit-it=always`,
it would be good to support the more canonical -Wa,-mimplicit-it=always form as
well. This is used by the Linux kernel when building a 32b THUMB2 image.


Otherwise, clang will fail when using the integrated assembler for inline asm,
example:

In file included from arch/arm/mach-imx/pm-imx6.c:19:
In file included from ./include/linux/suspend.h:5:
In file included from ./include/linux/swap.h:9:
In file included from ./include/linux/memcontrol.h:13:
In file included from ./include/linux/cgroup.h:28:
In file included from ./include/linux/cgroup-defs.h:22:
In file included from ./include/linux/bpf-cgroup.h:5:
In file included from ./include/linux/bpf.h:21:
In file included from ./include/linux/kallsyms.h:12:
In file included from ./include/linux/mm.h:33:
In file included from ./include/linux/pgtable.h:6:
In file included from ./arch/arm/include/asm/pgtable.h:25:
./arch/arm/include/asm/tlbflush.h:342:2: error: predicated instructions must be
in IT block
        tlb_op(TLB_V7_UIS_FULL, "c8, c7, 0", zero);
        ^
./arch/arm/include/asm/tlbflush.h:320:30: note: expanded from macro 'tlb_op'
#define tlb_op(f, regs, arg)    __tlb_op(f, "p15, 0, %0, " regs, arg)
                                ^
./arch/arm/include/asm/tlbflush.h:314:21: note: expanded from macro '__tlb_op'
                        asm("tst %1, %2\n\t"                            \
                                         ^
<inline asm>:2:2: note: instantiated into assembly here
        mcrne p15, 0, r2, c8, c7, 0
        ^


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to