double addr[4]; int main(int argc, char *argv[]) { vector4double data = {0,0,0,0}; long offset = 0; asm ("qvstfcsuxa %[v4d],%[ptr],%[off] \n" : [ptr] "+b" (addr) : [v4d] "v" (data), [off] "r" (offset) ); return 0; } // bgclang inlineasm.c // /homea/hch02/hch02d/bin/clang-3.3 -cc1 -triple powerpc64-bgq-linux -S -disable-free -main-file-name inlineasm.c -static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno -ffp-contract=fast -mconstructor-aliases -target-cpu a2q -momit-leaf-frame-pointer -fno-dwarf-directory-asm -ferror-limit 19 -fmessage-length 176 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -optimize-regalloc -x c inlineasm-Qt159M.c #if 0 clang-3.3: /homea/hch02/hch02d/molly/llvm/include/llvm/Support/Casting.h:79: static bool llvm::isa_impl_cl::doit(const From*) [with To = llvm::IntegerType, From = llvm::Type]: Assertion `Val && "isa<> used on a null pointer"' failed. 0 clang-3.3 0x0000000011d7a9bc llvm::sys::PrintStackTrace(_IO_FILE*) + 4244993380 1 clang-3.3 0x0000000011d7ad14 2 clang-3.3 0x0000000011d7a498 3 0x00000fff794e0418 __kernel_sigtramp_rt64 + 0 4 libc.so.6 0x0000008062c76ef8 abort + 4293479848 5 libc.so.6 0x0000008062c6b98c 6 libc.so.6 0x0000008062c6baa4 __assert_fail + 4293437492 7 clang-3.3 0x00000000109dda7c 8 clang-3.3 0x00000000109dae6c 9 clang-3.3 0x00000000109d762c bool llvm::isa(llvm::Type* const&) + 4225755108 10 clang-3.3 0x00000000109d307c llvm::enable_if::SimpleType>, llvm::cast_retty::ret_type>::type llvm::dyn_cast(llvm::Type*) + 4225739876 11 clang-3.3 0x0000000011c2b004 llvm::EVT::getExtendedSizeInBits() const + 4243724604 12 clang-3.3 0x00000000109773bc 13 clang-3.3 0x00000000110d7e14 llvm::SelectionDAG::getNode(unsigned int, llvm::DebugLoc, llvm::EVT, llvm::SDValue) + 4232665100 14 clang-3.3 0x0000000011137960 15 clang-3.3 0x0000000011138f18 llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite) + 4233043232 16 clang-3.3 0x0000000011136668 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 4233032976 17 clang-3.3 0x000000001111405c llvm::SelectionDAGBuilder::visit(unsigned int, llvm::User const&) + 4232893748 18 clang-3.3 0x00000000111139c8 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 4232892096 19 clang-3.3 0x000000001116e2dc llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator, llvm::ilist_iterator, bool&) + 4233242308 20 clang-3.3 0x0000000011171a44 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 4233256268 21 clang-3.3 0x000000001116d6b0 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 4233239208 22 clang-3.3 0x0000000010c2cdd8 23 clang-3.3 0x000000001137fd10 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 4235296648 24 clang-3.3 0x0000000011bf3358 llvm::FPPassManager::runOnFunction(llvm::Function&) + 4243518800 25 clang-3.3 0x0000000011bf35bc llvm::FPPassManager::runOnModule(llvm::Module&) + 4243519396 26 clang-3.3 0x0000000011bf3bd0 llvm::MPPassManager::runOnModule(llvm::Module&) + 4243520904 27 clang-3.3 0x0000000011bf4508 llvm::PassManagerImpl::run(llvm::Module&) + 4243523168 28 clang-3.3 0x0000000011bf4924 llvm::PassManager::run(llvm::Module&) + 4243524044 29 clang-3.3 0x0000000011de0d38 30 clang-3.3 0x0000000011de0dfc clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 4245370100 31 clang-3.3 0x0000000011dd9048 32 clang-3.3 0x00000000122de44c clang::ParseAST(clang::Sema&, bool, bool) + 4250185940 33 clang-3.3 0x0000000012173c34 clang::ASTFrontendAction::ExecuteAction() + 4248812044 34 clang-3.3 0x0000000011dd66e4 clang::CodeGenAction::ExecuteAction() + 4245330508 35 clang-3.3 0x00000000121735c8 clang::FrontendAction::Execute() + 4248810432 36 clang-3.3 0x00000000121435e0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 4248626152 37 clang-3.3 0x0000000011d83c14 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4245026748 38 clang-3.3 0x000000001086e8f4 cc1_main(char const**, char const**, char const*, void*) + 4224360684 39 clang-3.3 0x0000000010864008 main + 4224322272 40 libc.so.6 0x0000008062c5bcf8 41 libc.so.6 0x0000008062c5bef0 __libc_start_main + 4293374496 Stack dump: 0. Program arguments: /homea/hch02/hch02d/bin/clang-3.3 -cc1 -triple powerpc64-bgq-linux -S -disable-free -main-file-name inlineasm.c -static-define -mrelocation-model static -mdisable-fp-elim -fmath-errno -ffp-contract=fast -mconstructor-aliases -target-cpu a2q -momit-leaf-frame-pointer -resource-dir /homea/hch02/hch02d/bin/../lib/clang/3.3 -internal-isystem /usr/local/include -internal-isystem /homea/hch02/hch02d/bin/../lib/clang/3.3/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fno-dwarf-directory-asm -fdebug-compilation-dir /homea/hch02/hch02d/mini -ferror-limit 19 -fmessage-length 176 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -isystem /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/sys-include -mllvm -enable-misched -mllvm -enable-aa-sched-mi -mllvm -optimize-regalloc -o /tmp/inlineasm-d1TFix.s -x c inlineasm.c 1. parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'inlineasm.c'. 4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@main' clang-3.3: error: unable to execute command: Aborted (core dumped) clang-3.3: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.3 Target: powerpc64-bgq-linux Thread model: posix clang-3.3: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-3.3: 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.3: note: diagnostic msg: /tmp/inlineasm-Qt159M.c clang-3.3: note: diagnostic msg: /tmp/inlineasm-Qt159M.sh clang-3.3: note: diagnostic msg: ******************** #endif // PPCInstrQPX.td #if 0 def QVSTFCSUXA : XForm_8<31, 167, (outs), (ins QFRC:$FRT, memrr:$dst), "qvstfcsuxa $FRT, $dst", LdStStore, []>; #endif