search for: inlineasm

Displaying 20 results from an estimated 188 matches for "inlineasm".

2010 Mar 16
3
[LLVMdev] LLVM-GCC generating too much code from inline assembly
...when compiling with LLVM-GCC 4.2, weird things happen. Here's an example: (the blocks are larger than that, but a single line will do to show you what's happening) __asm { mov ebx, iObject } When compiling in release, everything goes fine, and the produced assembly looks like this : ## InlineAsm Start .file "... my filename" ## InlineAsm End ## InlineAsm Start .line 1454 ## InlineAsm End ## InlineAsm Start movl -20(%ebp), $ebx ## InlineAsm End The problem occurs in debug, and the code looks like this : ## InlineAsm Start .file "... my filename" ## InlineAsm End ## Inli...
2010 Mar 16
0
[LLVMdev] LLVM-GCC generating too much code from inline assembly
...things happen. > > Here's an example: (the blocks are larger than that, but a single line will do to show you what's happening) > __asm { > mov ebx, iObject > } > > When compiling in release, everything goes fine, and the produced assembly looks like this : > ## InlineAsm Start > .file "... my filename" > ## InlineAsm End > ## InlineAsm Start > .line 1454 > ## InlineAsm End > ## InlineAsm Start > movl -20(%ebp), $ebx > ## InlineAsm End > > The problem occurs in debug, and the code looks like this : > ## InlineAsm Start &gt...
2009 Jul 31
2
[LLVMdev] Inserting Instructions (pass)
Hi, I' am trying to insert an InlineAsm Instruction in my pass, which FunctionType do I need for Inlineasm? If I understand it right, I need a call instruction to insert the new produced InlineAsm? Thanks for help, Michael for (BasicBlock::iterator bi = i->begin(), be = i->end(); bi != be; ++bi){ std::vector<cons...
2018 Mar 16
2
Mapping InlineAsm parameters to ConstraintInfoVector elements
Hi all, I'm trying to figure out which parameters of a given InlineAsm instruction are its inputs, and which are the outputs (rationale: make sure MSan doesn't check the output parameters of an asm() statement). As far as I understand, this information is only available through the ConstraintInfoVector for the InlineAsm. However there's no exact match between...
2009 Jul 31
0
[LLVMdev] Inserting Instructions (pass)
On Jul 31, 2009, at 10:24 AM, Michael Graumann wrote: > Hi, > I’ am trying to insert an InlineAsm Instruction in my pass, which > FunctionType do I need for Inlineasm? > If I understand it right, I need a call instruction to insert the > new produced InlineAsm? > > Thanks for help Inline asm works like a "callee". So for: call void asm sideeffect "isync&quot...
2013 Oct 22
1
[LLVMdev] System call miscompilation using the fast register allocator
...the final IR->x86 lowering with -print-after-all, and it appears all is well after 'Two-Address instruction pass': MOV32mi <fi#0>, 1, %noreg, 0, %noreg, 1; mem:ST4[%val] %vreg3<def> = MOV64ri64i32 4; GR64:%vreg3 %R8<def> = COPY %vreg3; GR64:%vreg3 INLINEASM <es:> [sideeffect] [attdialect], $0:[reguse], %R8 %vreg4<def> = LEA64r <fi#0>, 1, %noreg, 0, %noreg; GR64:%vreg4 %R10<def> = COPY %vreg4; GR64:%vreg4 INLINEASM <es:> [sideeffect] [attdialect], $0:[reguse], %R10 %vreg5<def> = MOV64ri64i32 3; GR...
2018 Mar 16
0
Mapping InlineAsm parameters to ConstraintInfoVector elements
Could you provide an example where MSan checks an output parameter? On Fri, Mar 16, 2018 at 9:53 AM, Alexander Potapenko via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Hi all, > > I'm trying to figure out which parameters of a given InlineAsm instruction > are its inputs, and which are the outputs (rationale: make sure MSan > doesn't check the output parameters of an asm() statement). > > As far as I understand, this information is only available through the > ConstraintInfoVector for the InlineAsm. However there'...
2014 Jan 29
6
[LLVMdev] making emitInlineAsm protected
I would like to make the following member of AsmPrinter be protected void EmitInlineAsm(StringRef Str, const MDNode *LocMDNode = 0, InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT) const; I have some stubs that I want to emit in MipsAsmParser . Are there any objections to doing this? Reed
2016 Jul 21
2
InlineAsm and allocation to wrong register for indirect access
...raint is correct: call void asm sideeffect "MOV $$r0, $0\0AMOV $$r0, $1\0A", "*m,*m,~{r0}"(i16* @a, i16* %b) #1, !srcloc !1 but then $0 and $1 are allocated to registers that cannot be used as a memory base pointer. I am having trouble finding where this decision is made. Is InlineAsm going through the normal register allocation process or does it have its own specialized algorithm? Any pointers to how registers are allocated in an InlineAsm would be helpful. Kind regards, -- Paulo Matos
2010 Mar 16
2
[LLVMdev] LLVM-GCC generating too much code from inline assembly
...le: (the blocks are larger than that, but a single >> line will do to show you what's happening) >> __asm { >> mov ebx, iObject >> } >> >> When compiling in release, everything goes fine, and the produced >> assembly looks like this : >> ## InlineAsm Start >> .file "... my filename" >> ## InlineAsm End >> ## InlineAsm Start >> .line 1454 >> ## InlineAsm End >> ## InlineAsm Start >> movl -20(%ebp), $ebx >> ## InlineAsm End >> >> The problem occurs in debug, and the code looks...
2009 Aug 01
2
[LLVMdev] Inserting Instructions (pass)
...ael for (BasicBlock::iterator bi = i->begin(), be = i->end(); bi != be; ++bi){ std::vector<const Type*> asm_arguments; asm_arguments.push_back(Type::VoidTy); FunctionType *asm_type = FunctionType::get(Type::VoidTy, asm_arguments, false); InlineAsm* au = new InlineAsm(asm_type ???, "isync","~{dirflag},~{fpsr},~{flags}",true); //CallInst* ae = new CallInst(au ??); //Works fine AllocaInst* ai = new AllocaInst(Type::Int16Ty); Instruction *pi = bi; pi...
2016 Jun 30
4
Help required regarding IPRA and Local Function optimization
...sideeffect "movl %r14d, %r15d", "~{r15}"() #0 ret void } and its generated assembly code when IPRA enabled: .section __TEXT,__text,regular,pure_instructions .macosx_version_min 10, 12 .p2align 4, 0x90 _foo: ## @foo .cfi_startproc ## BB#0: ## InlineAsm Start movl %r14d, %r15d ## InlineAsm End retq .cfi_endproc .globl _bar .p2align 4, 0x90 _bar: ## @bar .cfi_startproc ## BB#0: pushq %r15 Ltmp0: .cfi_def_cfa_offset 16 pushq %rbx Ltmp1: .cfi_def_cfa_offset 24 pushq %rax Ltmp2: .cfi_def_cfa_offset 32 Ltmp3: .cfi_off...
2006 Jun 24
2
[LLVMdev] LLVM build error
...ered the following error. Any idea how to proceed with the build? llvm[2]: Linking Debug executable llvm-as /home/ll/programs/source/scm/cvs/llvm/Debug/lib/libLLVMAsmParser.a(llvmAsmParser.o): In function `__static_initialization_and_destruction_0': /home/ll/repositories/cvs/llvm/include/llvm/InlineAsm.h:133: undefined reference to `llvm::IncludeFile::IncludeFile(void*)' /home/ll/programs/source/scm/cvs/llvm/Debug/lib/libLLVMBCWriter.a(Writer.o): In function `__static_initialization_and_destruction_0': /home/ll/repositories/cvs/llvm/include/llvm/InlineAsm.h:133: undefined reference to...
2013 Mar 11
1
[LLVMdev] Question about InlineAsm
Hello, I'm new with the llvm, and I trying to write a transformation adding some lines of asm to a code. My code is like this, Type *VoidTy = llvm::Type::getVoidTy(getGlobalContext()); llvm::FunctionType *ty = llvm::FunctionType::get(VoidTy, false); InlineAsm *iv = InlineAsm::get( ty, "mov $55, %eax", "", true ); // <----- here SmallVector<llvm::Value*, 4> ArgList; llvm::CallInst::Create( iv , ArgList, "", &ins); It work perfect, but when I compiled I found the next error: opt -load /home/david/LLVM/bui...
2013 Oct 21
0
[LLVMdev] Instruction Emitter crash when emitting glued InlineAsm SDNode
Hi, I'm getting an Instruction emitter crash when emitting an INLINEASM SDNode that is Glued to other nodes. The crash happens at line 808 of file llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp: const MCInstrDesc &MCID = TII->get(F->getMachineOpcode()); with the assertion: assert(isMachineOpcode() && "Not a MachineInstr opcode!"); I...
2018 Apr 11
0
Adding DebugLoc to machine instructions generated from InlineAsm constants
Hi I'm trying to find the specific place where a MachineInstr is generated from an InlineAsm IR instruction's constant input argument because I want to label it with the correct DebugLoc. Currently, the InlineAsm MachineInstr itself has the correct DebugLoc, but all the MOVs to registers that are spawned for any (e.g. integer) constant input arguments do not have DebugLoc associated wi...
2009 Aug 01
1
[LLVMdev] Inserting Instructions (pass)
Hi, both versions are working: FunctionType *asm_Ftype = FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false); InlineAsm* Iasm = InlineAsm::get(asm_Ftype,"isync","~{dirflag},~{fpsr},~{flags}",true); How can I insert this InlineAsm, because it is no instruction and this way it will not work: Instruction *pi = bi; pi->getParent()->getInstList().insert(pi, Iasm); I try to build a C...
2013 Mar 05
4
[LLVMdev] Convert C variable to LLVM IR Variable
...M IR, (1) use external function I know LLVM IR is able to call an external function, so I can write codes that look like: int* load() { return gvar; } %x = call load(); // LLVM IR so gvar is converted to %x This method takes a lot of work and slow down the performance. Method 2 use LLVM InlineAsm to load that gvar so It may look like %x = call InlineAsm(... ); but I am not really sure how to write LLVM InlineAsm. The reason why I take such indirect method is that as I know, JIT is not able to do with LLVM GlobalVariable with ThreadLocal type. I would be grateful to you for any idea...
2013 Apr 24
2
[LLVMdev] issues with InlineAsm class and #APP/#NOAPP
...on of MCAsmInfo but it seems like this should be solved more generally for everyone. I'm generating a whole stub and not misc. asm code so I can do this easily but in other cases it would not be possible if things were inserted in the middle of other code. One way would be to add a field to InlineAsm which says whether the compiler or user has requested the inline asm. Then we need to similarly do something different when the IR is lowered to preserve this information.
2013 Apr 24
0
[LLVMdev] issues with InlineAsm class and #APP/#NOAPP
...t seems like this should be solved more generally > for everyone. I'm generating a whole stub and not misc. asm code so I can do > this easily but in other cases it would not be possible if things were > inserted in the middle of other code. > > One way would be to add a field to InlineAsm which says whether the compiler > or user has requested the inline asm. > > Then we need to similarly do something different when the IR is lowered to > preserve this > information. > > > > > > > > > > _______________________________________________ >...