search for: outcontext

Displaying 20 results from an estimated 31 matches for "outcontext".

2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...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`. This version of JMP takes an 8-bit relative offset as // an operand (computed as an offset from the jmp instruction). OutStreamer->EmitInstruction( MCInstBuilder(X86::JMP_1) .addExpr(MCSymbolRefExpr::create(Target,...
2011 May 02
1
default context overrides context of peer
Hello, I upgraded from asterisk 1.6.2.7 to asterisk 1.6.2.17. I have context=defcontext set in sip.conf. For each peer I have context=outcontext in the peer definition since I want outgoing calls from registered SIP peers to go through context 'outcontext'. This used to work in the older version (1.6.2.7), but after upgrading this has stopped working. Now outgoing calls are going to 'defcontext' and the calls fail. After the...
2011 Sep 17
0
[LLVMdev] Problem with Linux PPC64 assembly output.
...// If the 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); Out...
2017 Nov 23
2
question about xray tls data initialization
...If you're alright with it, maybe you can send some patches to review, > preferably through the LLVM Phabricator instance? You can have me or Reid > (who knows more about COFF and the Windows stuff) as reviewers. > > in AsmPrinter, copy/paster xray for coff target > > InstMap = OutContext.getCOFFSection("xray_instr_map", 0, > SectionKind::getReadOnlyWithRel()); > FnSledIndex = OutContext.getCOFFSection("xray_fn_idx", > 0,SectionKind::getReadOnlyWithRel()); > > in XRayArgs , allow windows platform to use xray args. with this, > generated code see...
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-...
2017 Nov 21
2
question about xray tls data initialization
...;built' on windows , but unfortunately I haven't enough knowledge about linker and the runtime, and finally built executable didn't run. I'd like to share my changes here , hopes somebody help me to make it run on windows. in AsmPrinter, copy/paster xray for coff target InstMap = OutContext.getCOFFSection("xray_instr_map", 0, SectionKind::getReadOnlyWithRel()); FnSledIndex = OutContext.getCOFFSection("xray_fn_idx", 0,SectionKind::getReadOnlyWithRel()); in XRayArgs , allow windows platform to use xray args. with this, generated code seems have sled and xray parts....
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...nker private symbol would make a difference. -Nirav On Wed, Jun 22, 2016 at 12:14 PM, Dean Michael Berris <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...
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...97 100644 --- a/lib/Target/AArch64/AArch64MCInstLower.cpp +++ b/lib/Target/AArch64/AArch64MCInstLower.cpp @@ -36,10 +36,16 @@ AArch64AsmPrinter::lowerSymbolOperand(const MachineOperand &MO, switch (MO.getTargetFlags()) { case AArch64II::MO_GOT: - Expr = AArch64MCExpr::CreateGOT(Expr, OutContext); + if (this->Subtarget->isTargetDarwin()) + Expr = AArch64MCExpr::CreateGOTDarwin(Expr, OutContext); + else + Expr = AArch64MCExpr::CreateGOT(Expr, OutContext); break; case AArch64II::MO_GOT_LO12: - Expr = AArch64MCExpr::CreateGOTLo12(Expr, OutContext); + if (th...
2016 Aug 05
2
XRay: Demo on x86_64/Linux almost done; some questions.
...nsigned char Kind; unsigned char AlwaysInstrument; unsigned char Padding[14]; // Need 32 bytes }; And the peer code in llvm/trunk/lib/Target/X86/X86MCInstLower.cpp : void X86AsmPrinter::EmitXRayTable() { if (Sleds.empty()) return; if (Subtarget->isTargetELF()) { auto *Section = OutContext.getELFSection( "xray_instr_map", ELF::SHT_PROGBITS, ELF::SHF_ALLOC | ELF::SHF_GROUP | ELF::SHF_MERGE, 0, CurrentFnSym->getName()); auto PrevSection = OutStreamer->getCurrentSectionOnly(); OutStreamer->SwitchSection(Section); for (const auto &am...
2016 Jun 22
2
x86: How to Force 2-byte `jmp` instruction in lowering
...-Nirav > > > > On Wed, Jun 22, 2016 at 12:14 PM, Dean Michael Berris <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>" >&g...
2011 Jun 06
0
[LLVMdev] Understanding SelectionDAG construction
Hi Ankur, > The flags "-view-sched-dags".. described in the doc doesn't seem to work. ( > "llc -help" doesn't list it ). as far as I remember, displaying DAGs during compilation is only enabled in "debug builds" [1] of LLVM. You probably have to re-configure and re-compile LLVM to enable this feature. Best regards, Christoph [1]
2017 Nov 16
2
question about xray tls data initialization
I'm learning the xray library and try if it can be built on windows, in xray_fdr_logging_impl.h line 152 , comment written as // Using pthread_once(...) to initialize the thread-local data structures but at line 175, 183, code written as thread_local pthread_key_t key; // Ensure that we only actually ever do the pthread initialization once. thread_local bool UNUSED Unused = [] {
2016 Jun 22
0
x86: How to Force 2-byte `jmp` instruction in lowering
...Wed, Jun 22, 2016 at 12:14 PM, Dean Michael Berris <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 &qu...
2011 Jun 06
4
[LLVMdev] Understanding SelectionDAG construction
I am trying to understand the SelectionDAG construction from LLVM IR. I have gone through the doc "The LLVM Target-Independent Code Generator" on LLVM site. This gives a great initial overview. However I am unable to catch the actual control flow for the llvm->selectionDag conversion. The flags "-view-sched-dags".. described in the doc doesn't seem to work. ( "llc
2011 Nov 17
0
[LLVMdev] Rephrased: How to get function virtual starting address from MCSymbolRefExpr?
..._1_1AsmPrinter.html#a32ad5336c0020843cbb5a982c0f1a708>.EmitGPRel32Value<http://llvm.org/doxygen/classllvm_1_1MCStreamer.html#a3c0872c5c75608d870c0b6aaf0d206ed>(MCSymbolRefExpr::Create<http://llvm.org/doxygen/classllvm_1_1MCSymbolRefExpr.html#acfd4c9d4f462e858c577dc0f57ef2d30>(MBBSym, OutContext<http://llvm.org/doxygen/classllvm_1_1AsmPrinter.html#aa7625af893e242d33b9f182066f59310>)); But can't in the process seem to lose the hook to the parent function. It would seem that we need to add MachineBasicBlock<http://llvm.org/doxygen/classllvm_1_1MachineBasicBlock.html> *MBB to...
2013 Mar 27
1
[LLVMdev] LLVM pass question
So the switching between mips16 and mips32 on a per function basis seems to basically be working except that asm printer has some kind of issue here. I'm debugging that now. I get this: lc: /home/rkotler/workspace/llvmpb6/include/llvm/MC/MCStreamer.h:224: void llvm::MCStreamer::SwitchSection(const llvm::MCSection*): Assertion `Section && "Cannot switch to a null
2012 Nov 19
0
[LLVMdev] Debug information under windows
...unsigned Size) const { + // if COFF .secrel32 is available, use it + if (MAI->getDwarfSectionOffsetDirective()) { + MCSymbol *SetLabel = GetTempSymbol("set", SetCounter++); + OutStreamer.EmitAssignment(SetLabel, MCConstantExpr::Create(Offset, OutContext)); + OutStreamer.EmitCOFFSecRel32(SetLabel); + return; + } // Emit Label+Offset const MCExpr *Plus = diff -r 547972237a05 -r d28fa29d4b44 lib/CodeGen/AsmPrinter/DIE.cpp --- a/lib/CodeGen/AsmPrinter/DIE.cpp Wed Oct 10 20:39:45 2012 +0200 +++ b/lib/CodeGen/AsmPrinter/DIE.cpp Mon Nov 19...
2016 Aug 04
2
XRay: Demo on x86_64/Linux almost done; some questions.
> On 4 Aug 2016, at 06:27, Serge Rogatch <serge.rogatch at gmail.com> wrote: > > Hi Dean, > > I have a question about the following piece of code in compiler-rt/trunk/lib/xray/xray_trampoline_x86.S : > movq _ZN6__xray19XRayPatchedFunctionE(%rip), %rax > testq %rax, %rax > je .Ltmp0 > > // assume that %r10d has the function id. > movl %r10d,
2016 Aug 08
2
XRay: Demo on x86_64/Linux almost done; some questions.
...d 32 bytes > > }; > > > > And the peer code in llvm/trunk/lib/Target/X86/X86MCInstLower.cpp : > > > > void X86AsmPrinter::EmitXRayTable() { > > if (Sleds.empty()) > > return; > > if (Subtarget->isTargetELF()) { > > auto *Section = OutContext.getELFSection( > > "xray_instr_map", ELF::SHT_PROGBITS, > > ELF::SHF_ALLOC | ELF::SHF_GROUP | ELF::SHF_MERGE, 0, > > CurrentFnSym->getName()); > > auto PrevSection = OutStreamer->getCurrentSectionOnly(); > > OutStreamer-&...
2012 Aug 30
2
[PATCH 01/11] vmci_context.patch: VMCI context list operations.
...* + * Allocates and initializes a VMCI context. + */ +int vmci_ctx_init_ctx(uint32_t cid, + uint32_t privFlags, + uintptr_t eventHnd, + int userVersion, + const struct cred *cred, + struct vmci_ctx **outContext) +{ + struct vmci_ctx *context; + int result; + + if (privFlags & ~VMCI_PRIVILEGE_ALL_FLAGS) { + pr_devel("Invalid flag (flags=0x%x) for VMCI context.", + privFlags); + return VMCI_ERROR_INVALID_ARGS; + } + +...