[LLVMbugs] [Bug 18956] New: asm("" : "=r" (sp)) breaks clang for aarch64

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 24 18:03:54 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18956

            Bug ID: 18956
           Summary: asm("" : "=r" (sp)) breaks clang for aarch64
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: behanw at converseincode.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

clang r202072 (llvm r202087)

/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/kernel/traps.c:146:14:
error: 
      couldn't allocate output register for constraint '{sp}'
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/include/asm/thread_info.h:76:6:
note: 
      expanded from macro 'current_stack_pointer'
        asm("" : "=r" (sp));                        \
            ^
0  clang-3.5       0x0000000000d50b72 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.5       0x0000000000d5071c
2  libpthread.so.0 0x00002b55f6ea5bb0
3  clang-3.5       0x00000000010f93c0
llvm::LiveVariables::HandleVirtRegUse(unsigned int, llvm::MachineBasicBlock*,
llvm::MachineInstr*) + 80
4  clang-3.5       0x00000000010fa580
llvm::LiveVariables::runOnMachineFunction(llvm::MachineFunction&) + 4016
5  clang-3.5       0x0000000000af09ef
llvm::FPPassManager::runOnFunction(llvm::Function&) + 623
6  clang-3.5       0x0000000000af0a8b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
7  clang-3.5       0x0000000000af2f95
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 709
8  clang-3.5       0x0000000001281e2e
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
2958
9  clang-3.5       0x000000000127d859
10 clang-3.5       0x00000000015f8e4b clang::ParseAST(clang::Sema&, bool, bool)
+ 507
11 clang-3.5       0x0000000000e96b99 clang::FrontendAction::Execute() + 169
12 clang-3.5       0x0000000000e79900
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 288
13 clang-3.5       0x0000000000f07576
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1702
14 clang-3.5       0x0000000000739398 cc1_main(char const**, char const**, char
const*, void*) + 968
15 clang-3.5       0x000000000071fed3 main + 7651
16 libc.so.6       0x00002b55f78f2de5 __libc_start_main + 245
17 clang-3.5       0x0000000000737a29
Stack dump:
0.    Program arguments:
/home/behanw/src/kernel/llvmlinux/toolchain/clang/install/bin/clang-3.5 -cc1
-triple aarch64--linux-gnu -S -disable-free -disable-llvm-verifier
-main-file-name traps.c -mrelocation-model static -mdisable-fp-elim
-relaxed-aliasing -mdisable-tail-calls -fmath-errno -masm-verbose
-no-integrated-as -mconstructor-aliases -fuse-init-array -target-cpu generic
-target-feature -fp-armv8 -target-feature -crypto -target-feature -neon -g
-coverage-file
/home/behanw/src/kernel/llvmlinux/build/targets/vexpress64/tmp/traps-569604.s
-nostdsysteminc -nobuiltininc -resource-dir
/home/behanw/src/kernel/llvmlinux/toolchain/clang/install/bin/../lib/clang/3.5
-dependency-file arch/arm64/kernel/.traps.o.d -MT arch/arm64/kernel/traps.o
-sys-header-deps -isystem
/home/behanw/src/kernel/llvmlinux/toolchain/clang/install/bin/../lib/clang/3.5/include
-include
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/include/linux/kconfig.h
-D __KERNEL__ -D KBUILD_STR(s)=#s -D KBUILD_BASENAME=KBUILD_STR(traps) -D
KBUILD_MODNAME=KBUILD_STR(traps) -I
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/include
-I arch/arm64/include/generated -I
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/include
-I include -I
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/include/uapi
-I arch/arm64/include/generated/uapi -I
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/include/uapi
-I include/generated/uapi -I
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/kernel
-I arch/arm64/kernel -O2 -Wno-unknown-warning-option -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration
-Wno-format-security -Wno-asm-operand-widths -Wno-unused-variable
-Wno-format-invalid-specifier -Wno-gnu -Wno-tautological-compare
-Wdeclaration-after-statement -Wno-pointer-sign -fno-dwarf-directory-asm
-fdebug-compilation-dir
/home/behanw/src/kernel/llvmlinux/build/targets/vexpress64/build/kernel-clang
-ferror-limit 19 -fmessage-length 114 -fwrapv -mstackrealign -fno-builtin
-fno-signed-char -fobjc-runtime=gcc -fno-common -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -o
/home/behanw/src/kernel/llvmlinux/build/targets/vexpress64/tmp/traps-569604.s
-x c
/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/kernel/traps.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module
'/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64/arch/arm64/kernel/traps.c'.
4.    Running pass 'Live Variable Analysis' on function '@dump_backtrace'
clang-3.5: error: unable to execute command: Segmentation fault (core dumped)
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.5 
Target: aarch64--linux-gnu
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to  and include the
crash backtrace, preprocessed source, and associated run script.
clang-3.5: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/home/behanw/src/kernel/llvmlinux/build/targets/vexpress64/tmp/traps-dfbf5a.c
clang-3.5: note: diagnostic msg:
/home/behanw/src/kernel/llvmlinux/build/targets/vexpress64/tmp/traps-dfbf5a.sh
clang-3.5: note: diagnostic msg: 

********************
make[3]: *** [arch/arm64/kernel/traps.o] Error 254
make[2]: *** [arch/arm64/kernel] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory
`/home/behanw/src/kernel/llvmlinux/targets/vexpress64/src/linaro-aarch64'
Command exited with non-zero status 2

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140225/f5d66d7b/attachment.html>


More information about the llvm-bugs mailing list