search for: createtempsymbol

Displaying 14 results from an estimated 14 matches for "createtempsymbol".

2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
I have a bit of a riddle: In http://reviews.llvm.org/D19904 I'm trying to spell the following assembly: .palign 2, 0x90 jmp +0x9 nopw 512(%rax,%rax,1) // rest of the code I try the following snippet to accomplish this: OutStreamer->EmitLabel(CurSled); OutStreamer->EmitCodeAlignment(4); auto Target = OutContext.createLinkerPrivateTempSymbol(); // Use a two-byte `jmp`.
2016 Jun 22
3
x86: How to Force 2-byte `jmp` instruction in lowering
On Wed, Jun 22, 2016 at 6:05 AM Nirav Davé <niravd at google.com> wrote: > This appears to work: > > auto Target = OutContext.createLinkerPrivateTempSymbol(); > > with > > auto Target = OutContext.createTempSymbol(); > > -Nirav > > Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" with this incantation when I load and disassemble from gdb. I'm seeing a 5-instruction jump, followed by the nops. If I disassemble with llvm-objdump though I see the followi...
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...<dberris at google.com> wrote: > On Wed, Jun 22, 2016 at 6:05 AM Nirav Davé <niravd at google.com> wrote: > >> This appears to work: >> >> auto Target = OutContext.createLinkerPrivateTempSymbol(); >> >> with >> >> auto Target = OutContext.createTempSymbol(); >> >> -Nirav >> >> > Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" with > this incantation when I load and disassemble from gdb. I'm seeing a > 5-instruction jump, followed by the nops. > > If I disassemble wi...
2011 Sep 17
0
[LLVMdev] Problem with Linux PPC64 assembly output.
...e target wants a .size directive for the size of the function, emit // it. if (MAI->hasDotTypeDotSizeDirective()) { // Create a symbol for the end of function, so we can get the size as // difference between the function label and the temp label. MCSymbol *FnEndLabel = OutContext.CreateTempSymbol(); OutStreamer.EmitLabel(FnEndLabel); const MCExpr *SizeExp = MCBinaryExpr::CreateSub(MCSymbolRefExpr::Create(FnEndLabel, OutContext), MCSymbolRefExpr::Create(CurrentFnSym, OutContext), OutContext); OutStreamer.EmitELFS...
2013 Dec 17
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...Symbol("$cp." + > + Twine(ConstantPoolCounter++)); > > As previously mentioned, this sort of label name isn't portable. Whether > '$' is legal isn't guaranteed, and there's no assembler-local label > prefix. This was fixed in a later patch by using the CreateTempSymbol() API in MCContext. > + ConstantPoolMapTy::iterator Cp = ConstantPools.find(Section); > > Minor detail in various places in the code. Acronyms should be > capitalized, so "CP" instead of "Cp". Even better would be spelled out > names if they're short enou...
2012 Oct 17
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
...(bool IsData) { + // FIXME: The following is specific to the ARM. This should be moved + // to ARMAsmBackend. + + if (!getAssembler().getBackend().hasDataInCodeSupport()) + return; + + // Create a temporary label to mark the start of the data region. + MCSymbol *Start = getContext().CreateTempSymbol(); + EmitLabel(Start); + + // FIXME: We want to generate symbols with the same name, but + // CreateSymbol() is not a public function. So instead + // we generate a unique name as we go. Luckily, the ARM + // ELF spec says that everything after the '.' is ignored...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...; >> On Wed, Jun 22, 2016 at 6:05 AM Nirav Davé <niravd at google.com> wrote: >> >>> This appears to work: >>> >>> auto Target = OutContext.createLinkerPrivateTempSymbol(); >>> >>> with >>> >>> auto Target = OutContext.createTempSymbol(); >>> >>> -Nirav >>> >>> >> Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" >> with this incantation when I load and disassemble from gdb. I'm seeing a >> 5-instruction jump, followed by the nops. &...
2013 Dec 17
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...> + Twine(ConstantPoolCounter++)); >> >> As previously mentioned, this sort of label name isn't portable. Whether >> '$' is legal isn't guaranteed, and there's no assembler-local label >> prefix. > > This was fixed in a later patch by using the CreateTempSymbol() API in > MCContext. > >> + ConstantPoolMapTy::iterator Cp = ConstantPools.find(Section); >> >> Minor detail in various places in the code. Acronyms should be >> capitalized, so "CP" instead of "Cp". Even better would be spelled out >> n...
2012 Oct 16
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Attached is an example of how to reproduce the issue. It uses a C file that happens to has a bunch of switch statements which are encoded as jump tables, giving us data-in-code. Usage: To build object files with clang via the -integrated-as versus via GCC: $ export NDK_DIR=<my_ndk_dir> $ export LLVM_DIR=<my_llvm_bin_dir> $ make To test that the generated objects contain the same
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...at 6:05 AM Nirav Davé <niravd at google.com> wrote: >>> >>>> This appears to work: >>>> >>>> auto Target = OutContext.createLinkerPrivateTempSymbol(); >>>> >>>> with >>>> >>>> auto Target = OutContext.createTempSymbol(); >>>> >>>> -Nirav >>>> >>>> >>> Thanks Nirav -- I tried this but I'm still getting a "jmpq <address>" >>> with this incantation when I load and disassemble from gdb. I'm seeing a >>> 5-instruction j...
2013 Dec 17
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
Hi David, Maybe I’m just blind, but where’s the code to handle the .ltorg directive? Is that a separate patch, maybe? Without that, this is not going to be usable in any circumstance using subsections-via-symbols. +typedef std::map<const MCSection *, ConstantPool> ConstantPoolMapTy; This feels odd to me. Can you elaborate a bit more on the data structure choices?? I would have expected
2013 Nov 16
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
Moving discussion to llvm-commits now that I have a more developed implementation: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131111/195401. html > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On > Behalf Of David Peixotto > Sent: Tuesday, November 12, 2013 11:09 AM > To: 'Amara Emerson' >
2017 Mar 07
4
[BUG Report] -dead_strip, strips prefix data unconditionally on macOS
Firstly, do you need "main.dsp" defined as an external symbol, or can all external references go via "main"? If the answer is the latter, that will make the solution simpler. If only the latter, you will need to make a change to LLVM here: http://llvm-cs.pcc.me.uk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp#650 Basically you would need to add a hook to the TargetLoweringObjectFile
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...nst { + MCSymbol *SSym = Mang->getSymbol(GV); + + return SSym; +} + +const MCExpr *AArch64MachOTargetObjectFile::getTTypeGlobalReference( + const GlobalValue *GV, Mangler *Mang, MachineModuleInfo *MMI, + unsigned Encoding, MCStreamer &Streamer) const { + MCSymbol *sym = getContext().CreateTempSymbol(); + Streamer.EmitLabel(sym); + const MCExpr *expr = MCSymbolRefExpr::Create( + Mang->getSymbol(GV), MCSymbolRefExpr::VK_GOT, getContext()); + expr = MCBinaryExpr::CreateSub( + expr, + MCSymbolRefExpr::Create(sym, MCSymbolRefExpr::VK_None, getContext()), + getContext()); +...