search for: emitprologu

Displaying 20 results from an estimated 79 matches for "emitprologu".

Did you mean: emitprologue
2011 Nov 20
2
[LLVMdev] How can I output assembly comments from emitPrologue()?
Dear all, I am looking to output assembly comments in my emitPrologue() function, just for my own readability. Searching for a way to do this found me this thread - http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043722.html, which says that the best way to output comments from somewhere like emitPrologue() is to: 1. Create an MDString for the comment....
2009 Jul 24
2
[LLVMdev] Stack Management in LLVM
...ld LLVM do that for me, using the system stack, (not continuations with > malloc)?  Or am I barking up the wrong tree with this tool? Messing with the prologue and epilogue should be feasible, although you'll have to modify the code, and it's very platform-specific; see X86RegisterInfo::emitPrologue in lib/Target/X86/X86RegisterInfo.cpp in the source tree. -Eli
2011 Nov 20
0
[LLVMdev] How can I output assembly comments from emitPrologue()?
...move the comments anyway. Any suggestions on a better way to do this (or a pointer to some obvious existing solution!) welcome :). Stephen On 20 November 2011 12:47, Stephen McGruer <stephen.mcgruer at gmail.com>wrote: > Dear all, > > I am looking to output assembly comments in my emitPrologue() function, > just for my own readability. Searching for a way to do this found me this > thread - > http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043722.html, > which says that the best way to output comments from somewhere like > emitPrologue() is to: > > 1. Cre...
2010 Jun 18
1
[LLVMdev] Problem adding a MachineBasicBlock during X86 EmitPrologue
I'm attempting to add an error handler to functions with a custom calling convention. This error is checked upon function entry, before any code is run (specifically, I cannot allow any stack operations). Because of this, I figured a good place to do this code insertion is in EmitPrologue. I also, at this time, create the block that handles the error case. // create a new block for the overflow handling code MF.overflowBlock = MF.CreateMachineBasicBlock(); MachineFunction::iterator obinsert = MF.begin(); MF.addToMBBNumbering(MF.overflowBlock); MF.pus...
2009 Aug 05
0
[LLVMdev] Stack Management in LLVM
First off, thanks for the help so far. >From what I have been able to tell, emitPrologue kicks in after the arguments for the function have been copied. For example, consider the function int testfunc( int foo, int bar ); Emitting assembly code from the llvm-gcc frontend in a small test program gives the following for the call to testfunc movl $1338, (%esp) movl $1339, 4(%...
2017 Feb 17
7
RFC: Setting MachineInstr flags through storeRegToStackSlot
## Problem description One of the responsibilities of a target's implementation of TargetFrameLowering::emitPrologue is to set the frame pointer (if needed). Typically, the frame pointer will be stored to the stack just like the other callee-saved registers, and emitPrologue must insert the instruction to change its value after it was stored to the stack. Mips does this by looking at the number of callee-saved r...
2010 Aug 03
3
[LLVMdev] Purpose of PROLOG_LABEL in function prologue?
I've been building/dumping some x86_64 code and I've noticed that each of the routines has 3 temporary symbols, à la: _main: pushq %rbp Ltmp18: movq %rsp, %rbp Ltmp19: subq $320, %rsp Ltmp20: movl %ecx, -276(%rbp) I've tracked them back to emitPrologue in X86RegisterInfo.cpp. I'm wonder what's their purpose? They're filling up my symbol table... Cameron Esfahani dirty at apple.com "All that is necessary for the triumph of evil is that good men do nothing." Edmund Burke
2017 Feb 21
3
RFC: Setting MachineInstr flags through storeRegToStackSlot
...ue is ended. --paulr > > > On Feb 17, 2017, at 3:33 AM, Alex Bradbury via llvm-dev <llvm- > dev at lists.llvm.org> wrote: > > > > ## Problem description > > > > One of the responsibilities of a target's implementation of > > TargetFrameLowering::emitPrologue is to set the frame pointer (if > needed). > > Typically, the frame pointer will be stored to the stack just like the > other > > callee-saved registers, and emitPrologue must insert the instruction to > change > > its value after it was stored to the stack. Mips does th...
2010 Aug 03
0
[LLVMdev] Purpose of PROLOG_LABEL in function prologue?
...building/dumping some x86_64 code and I've noticed that each of the routines has 3 temporary symbols, à la: > > _main: > pushq %rbp > Ltmp18: > movq %rsp, %rbp > Ltmp19: > subq $320, %rsp > Ltmp20: > movl %ecx, -276(%rbp) > > I've tracked them back to emitPrologue in X86RegisterInfo.cpp. I'm wonder what's their purpose? > > They're filling up my symbol table... EH ranges for unwind info. If you look later on in the file for the symbols you'll see them. -eric
2010 Aug 27
2
[LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
...nal_iterator_tag, llvm::MachineInstr, > long int, llvm::MachineInstr*, llvm::MachineInstr&>> = {<No data > fields>}, NodePtr = 0x4b69440}, DL={LineCol = 0, ScopeIdx = 0}, > TID=@0x803a78940) at MachineInstrBuilder.h:183 > #3 0x0000000803451825 in llvm::X86RegisterInfo::emitPrologue > (this=0x1a96220, MF=@0x30eb000) at > /tmp/llvm-svn/llvm/lib/Target/X86/X86RegisterInfo.cpp:1037 > #4 0x0000000802cdf3e5 in llvm::PEI::insertPrologEpilogCode > (this=0x3231900, Fn=@0x30eb000) at > /tmp/llvm-svn/llvm/lib/CodeGen/PrologEpilogInserter.cpp:680 > #5 0x0000000802cdc...
2017 Jun 09
2
Question about Prolog/Epilog Code Insertion
Hi All, When seeing the title "Prolog/Epilog Code Insertion", I'd expect something about XXXFrameLowering.cpp (particular about emitPrologue/emitEpilogue). But the document [1] is about unwind. Is it placed at the right place/section? Thanks. [1] http://llvm.org/docs/CodeGenerator.html#prolog-epilog-code-insertion Regards, chenwj -- Wei-Ren Chen (陳韋任) Homepage: https://people.cs.nctu.edu.tw/~chenwj -------------- next part -----...
2010 Aug 27
0
[LLVMdev] What does this error mean: psuedo instructions should be removed before code emission?
...; llvm::MachineInstr, >> long int, llvm::MachineInstr*, llvm::MachineInstr&>> = {<No data >> fields>}, NodePtr = 0x4b69440}, DL={LineCol = 0, ScopeIdx = 0}, >> TID=@0x803a78940) at MachineInstrBuilder.h:183 >> #3 0x0000000803451825 in llvm::X86RegisterInfo::emitPrologue >> (this=0x1a96220, MF=@0x30eb000) at >> /tmp/llvm-svn/llvm/lib/Target/X86/X86RegisterInfo.cpp:1037 >> > It seems wrong that TCRETURNri64 is created in > X86RegisterInfo::emitPrologue even when RET instruction is already > there. This seems to be a bug. I don't...
2019 Dec 04
3
ABI-specific Stack Pointer Register?
Hi, In the runtime system for GHC Haskell, the stack pointer register is not the same as the one defined by the operating system ABI, and it's difficult for GHC to change that. Following the example of CoreCLR in LLVM, it seems one way to remedy this situation is to define a new ABI (i.e., a new llvm::Triple::EnvironmentType ) and modify the code generator as-needed to respect to our ABI,
2011 Jul 08
2
[LLVMdev] Best location in code generation for insertion of instrumentation to measure stack depth?
...rame as "owned" by the current thread. I'm not sure where the best place in the LLVM architecture to do this is. As I currently understand it, the concept of a stack frame appears pretty late in target code generation. I've hacked in a hook for this in X86FrameLowering.cpp in the emitPrologue and emitEpilogue methods. Is there a cleaner way I can do this? Is there a way I can subclass the X86 code generator to "hook" those two methods and insert my instrumentation? Is there something I'm missing with runOnMachineFunction? Thank you, Andrew -------------- next part ----...
2011 Nov 21
0
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
...(Marcello Maggioni) 12. Re: Insert a function call in the code (=?GB2312?B?1dTPxA==?=) 13. call different function while running (=?GB2312?B?1dTPxA==?=) 14. Re: How to make Polly ignore some non-affine memory accesses (Tobias Grosser) 15. How can I output assembly comments from emitPrologue()? (Stephen McGruer) 16. (no subject) (Sandra Johnson) 17. Re: How can I output assembly comments from emitPrologue()? (Stephen McGruer) 18. Re: call different function while running (Duncan Sands) ---------------------------------------------------------------------- Me...
2010 Apr 15
2
[LLVMdev] Few questions about stack frame and calling conventions implementation in a backend
...ur CPU. However I > couldn't figure out how to implement some stuff. > I'd appreciate your help with these. > > First thing is return address saving. To do that, first I have to copy it to > a general purpose register. I have no idea how to find an unused gpr > register in emitPrologue/emitEpilogue. I've noticed that in other backends > RegScavenger is used for that purpose, but not from inside of those methods. > So my question is how could I get an unused register from inside of these > methods? Do you have an API specified register where the variable is passed?...
2010 Aug 03
1
[LLVMdev] Purpose of PROLOG_LABEL in function prologue?
...;ve noticed that each of the routines has 3 temporary symbols, à la: >> >> _main: >> pushq %rbp >> Ltmp18: >> movq %rsp, %rbp >> Ltmp19: >> subq $320, %rsp >> Ltmp20: >> movl %ecx, -276(%rbp) >> >> I've tracked them back to emitPrologue in X86RegisterInfo.cpp. I'm wonder what's their purpose? >> >> They're filling up my symbol table... > > > EH ranges for unwind info. If you look later on in the file for the symbols you'll see them. Oh, though they should be local and not exported at all...
2010 Oct 26
2
[LLVMdev] Implementing the hotpatch attribute for X86
...ctions on x86 (and by extension, x86-64) are preceded by six bytes of padding and start with a two byte instruction. The problem is that, still being relatively unfamiliar with the x86 backend, I have no idea how to implement this for the 'hotpatch' attribute I just added. I do remember the emitPrologue() method from when I was working on the alignstack() attribute, but I still don't know how to implement the first part (the six bytes of padding). Does anyone have any pointers? Chip
2012 Dec 07
0
[LLVMdev] Increase the number of registers in ARM
...d run it now. We have done the similar work[1] on this topic by gcc and we have start migrate our platform to LLVM. In my experience, you need to take care the follow part: * ARMBaseRegisterInfo::getRegPressureLimit * ARMBaseRegisterInfo::getRawAllocationOrder * CalleeSavedRegs * ARMFrameLowering::emitPrologue [1] Doubling the Number of Registers on ARM Processors http://aces.snu.ac.kr/interact-16/papers/interact-16-paper-1.pdf
2007 Jun 20
1
[LLVMdev] Calling Convention & Stack Frame
Hello, I want to find information/documentation on how reorganize stack frame (add other information, etc.) & how add new calling convention into ARM backend? I think it is needed to modify lowering of CALL, RET & FORMAL_ARGUMENT instruction, and also to modify emitPrologue & emitEpilogue functions. What are the others things to modify in order to realize my experimentation? Is it the best way to do it? Thanks in advance. Mikaël. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llv...