similar to: [LLVMdev] Question about InlineAsm

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Question about InlineAsm"

2009 Aug 01
2
[LLVMdev] Inserting Instructions (pass)
Thank you Chris, for your hint, but I am still too stupid. I tried two versions asm_arguments.push_back(Type::VoidTy); FunctionType *asm_type = FunctionType::get(Type::VoidTy, asm_arguments, false); Alternatively FunctionType *asm_type = FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false); . Can you give me a snippet of example code, or somebody else?
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;
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
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<const Type*> asm_arguments;
2013 Apr 21
3
[LLVMdev] trying to generate a simple inline asm
I'm trying to just emit simple inline assembler (no constraints, inputs, etc.) Can anyone point me to an example of this..? This is corresponding to: __asm__ ("mfc1 $4,$f12"); This is what I tried but it's not correct. std::vector<llvm::Type *> AsmArgTypes; llvm::FunctionType *AsmFTy = llvm::FunctionType::get(Type::getVoidTy(FStub->getContext()),
2012 May 07
0
[LLVMdev] Discussion of eliminating the void type
Hi Mitnick, > === Overview === > > The general concept is to replaced void with {}. And 'ret void' is a synonym of > 'ret {} {}.' in a sense the concept is just to delete void and not to replace it with anything in particular. Of course front-ends (clang, dragonegg) need to produce something instead of void, and {} is an example of what they might produce, but they
2012 May 08
0
[LLVMdev] Discussion of eliminating the void type
Hello Duncan, There is a discussion with Chris Lattner: http://old.nabble.com/Eliminating-the-'void'-type-td33726468.html In the discussion, Chris Lattner suggest Type::getVoidTy() should still exist and return {} for API continuity. If VoidTy and isVoidTy() go away, how do deal with the isVoidTy() function call in LLVM source tree? Another issue is: What should ReturnInst constructor
2012 May 07
1
[LLVMdev] Discussion of eliminating the void type
On 5/7/12 10:36 AM, Duncan Sands wrote: > Hi Mitnick, > >> === Overview === >> >> The general concept is to replaced void with {}. And 'ret void' is a synonym of >> 'ret {} {}.' > in a sense the concept is just to delete void and not to replace it with > anything in particular. Of course front-ends (clang, dragonegg) need to produce >
2012 May 07
4
[LLVMdev] Discussion of eliminating the void type
Hello all, I am willing to do "eliminating the void type" project. Is there anyone working on it? === Overview === The general concept is to replaced void with {}. And 'ret void' is a synonym of 'ret {} {}.' === Further Implementation Details === 1. Deleting VoidTyID 2. Deleting LLVMVoidTypeKind (one-to-one relation between VoidTyID and LLVMVoidTypeKind) 3. Use
2009 Aug 01
0
[LLVMdev] Inserting Instructions (pass)
On Jul 31, 2009, at 5:04 PM, Michael Graumann wrote: > Thank you Chris, > for your hint, but I am still too stupid. I tried two versions > > asm_arguments.push_back(Type::VoidTy); > FunctionType *asm_type = FunctionType::get(Type::VoidTy, > asm_arguments, false); > > Alternatively > > FunctionType *asm_type = FunctionType::get(Type::VoidTy, >
2008 Apr 18
0
[LLVMdev] Giving labels to intrinsics and getting the address
call void @llvm.branchlike(label %thelabel) Is it possible to give a label/BasicBlock* to an intrinsic? Similar to labels for branches. No label type is currently defined in Intrinsics.td, but would it be possible to add it there and ValueTypes.td? But I also want to take the address and put it into a physical register and emit a desired x86 instruction. Assuming I have the label, I should be
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
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 the constraints and the
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 with
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'm not a great expert
2016 Jul 21
2
InlineAsm and allocation to wrong register for indirect access
Hi, I am seeing a case, in a private port, of an inline asm with indirect memory references being allocated invalid registers (i.e. registers that cannot be used on loads). For example, the inline asm constraint 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
2016 Oct 04
3
llvm-toolchain-3.8 on lower arm targets
Hi, peter green wrote: > On 18/05/16 04:50, Tim Northover wrote: > If you don't need/want the various Sanitizer runtimes (e.g. you don't > support sanitizers or already have versions provided with GCC) then > it's as easy as not downloading compiler-rt or removing it from the > projects/ directory before running CMake. The build should carry on > quite happily
2013 Apr 24
0
[LLVMdev] issues with InlineAsm class and #APP/#NOAPP
compiler generated inline assembly looks odd. What is it that prevents the llvm backend from printing the assembly you need for the stubs? On 24 April 2013 17:58, reed kotler <rkotler at mips.com> wrote: > When the compiler emits assembly code in gcc, there is no #APP/#NOAPP > > In my case, I'm creating inline assembly IR as part of the compilation > process (not user
2013 Apr 24
2
[LLVMdev] issues with InlineAsm class and #APP/#NOAPP
There are a lot of issues. For one, the function I'm compiling is a mips16 function but the stubs being created are mips32 functions. On 04/24/2013 03:25 PM, Rafael Espíndola wrote: > compiler generated inline assembly looks odd. What is it that prevents > the llvm backend from printing the assembly you need for the stubs? > > On 24 April 2013 17:58, reed kotler <rkotler at
2013 Apr 24
2
[LLVMdev] issues with InlineAsm class and #APP/#NOAPP
When the compiler emits assembly code in gcc, there is no #APP/#NOAPP In my case, I'm creating inline assembly IR as part of the compilation process (not user supplied). These are for compiler generated stubs. So I'm seeing these #APP,#NOAPP wrappers which are meant for user inline assembly. Since I'm generating a lot of inline assembly and then each line is enclosed by this