Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xps::learn_zig => cat asm.zig
- const std = @import("std");
- pub fn main() void {
- const foo: i64 = undefined;
- asm volatile (
- \\ mov $12, %[foo]
- :
- : [foo] "=m" (foo)
- );
- std.debug.warn("{}\n", foo);
- }
- (gdb) bt
- #0 0x00007ffff54c342c in llvm::SelectionDAGBuilder::visitInlineAsm(llvm::ImmutableCallSite) ()
- #1 0x00007ffff54d4b51 in llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) ()
- #2 0x00007ffff54dc1f9 in llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) ()
- #3 0x00007ffff551ede2 in llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) ()
- #4 0x00007ffff5525703 in llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) ()
- #5 0x00007ffff5526a0e in llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
- #6 0x00007ffff45cf3c0 in (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) ()
- #7 0x00007ffff5822ee5 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) [clone .part.43] ()
- #8 0x00007ffff6411029 in llvm::FPPassManager::runOnFunction(llvm::Function&) ()
- #9 0x00007ffff6411081 in llvm::FPPassManager::runOnModule(llvm::Module&) ()
- #10 0x00007ffff64103a2 in llvm::legacy::PassManagerImpl::run(llvm::Module&) ()
- #11 0x00007ffff26cd787 in ZigLLVMTargetMachineEmitToFile ()
- #12 0x00007ffff25ff98c in codegen_build_and_link(CodeGen*) ()
- #13 0x00007ffff251c415 in main ()
- xps::learn_zig => lli asm.ll
- lli: asm.ll:30372:13: error: invalid type for inline asm constraint string
- call void asm sideeffect " mov $$12, $0", "=m"(i64 undef), !dbg !13268
- ^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement