Displaying 20 results from an estimated 72 matches for "emitlabel".
2010 Sep 18
2
[LLVMdev] Non-standard labels
Hi all,
I am emitting code for assembler which wants non-standard text for
labels (not just "LABEL:"). One way would be to override all methods
of AsmPrinter which call MCStreamer::EmitLabel but this is too
painful. I can think of two solutions:
1) add AsmPrinter::EmitLabel which calls Streamer by default but may
be overriden in target AsmPrinters
2) Register my own instance of MCStreamer which delegates all calls
(except EmitLabel) to MCAsmStreamer. For this I will probably need to
a...
2010 Sep 18
0
[LLVMdev] Non-standard labels
On Sep 18, 2010, at 8:14 AM, Yuri Gribov wrote:
> Hi all,
>
> I am emitting code for assembler which wants non-standard text for
> labels (not just "LABEL:"). One way would be to override all methods
> of AsmPrinter which call MCStreamer::EmitLabel but this is too
> painful. I can think of two solutions:
>
> 1) add AsmPrinter::EmitLabel which calls Streamer by default but may
> be overriden in target AsmPrinters
> 2) Register my own instance of MCStreamer which delegates all calls
> (except EmitLabel) to MCAsmStreamer. For...
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`. This version of JMP takes an 8-bit relative
offset as
// an operand (computed as an offset from the jmp instruction).
OutStreamer->EmitInstruction(...
2016 Jan 21
4
Is there a reason why MCAsmStreamer class doesn't have its own .h file?
Does anybody know if there is a particular reason why MCAsmStreamer doesn't
have its own .h file?
https://github.com/llvm-mirror/llvm/blob/0e66a5f53c74056f95d178c86531d7d9cfb23da9/lib/MC/MCAsmStreamer.cpp#L41
It seems like it is a good idea to have this class declared as its own
module ( its own .cpp and .h files). That would make it easier to inherit
from it if there is a need (like in my
2010 May 07
3
[LLVMdev] AsmPrinter behavior
I compile these two lines in llc
@tst1 = internal global [4 x i8] zeroinitializer;
@tst2 = internal global [4 x i8] [i8 0, i8 1, i8 2, i8 3];
@tst1 is emited via MCStreamer::EmitCommonSymbol
while the other is emited via MCStreamer::EmitLabel followed by
MCStreamer::EmitBytes
from what I can tell, only symbols with common linkage should me emitted
by MCStreamer::EmitCommonSymbol,
is this the expected behavior or should I fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/p...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...createMCAsmBackend(*MRI, TripleName,
MCPU);
MCStreamer *Str = TheTarget->createMCObjectStreamer(TheTriple, Ctx,
*MAB, *OS, CE, *STI, true, false);
So, like, wow, I would think I should be good to go here! I should be
able to just use functions like:
Str->EmitInstruction();
Str->EmitLabel();
These should then result in everything I've tried to emit coming out in
my output object file "tmp.o", you know, as long as I'm careful to be
sure to make a call to keep my output file from being deleted. So, when
I'm done making "emit" calls like the above, I...
2011 Nov 30
2
[LLVMdev] Problem using a label to a MachineBasicBlock
...instruction
return result;
}
---
This corresponds with:
BB1 -> MBB10, MBB11, MBB12
where MBB11 and MBB12 have both their address taken, and the reference count for BB1
is increased twice. With this, I am triggering a new assertion failure:
In lib/MC/MCAsmStreamer.cpp:328 of MCAsmStreamer::EmitLabel(llvm::MCSymbol*)
----
void MCAsmStreamer::EmitLabel(MCSymbol *Symbol) {
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
MCStreamer::EmitLabel(Symbol);
OS << *Symbol << MAI.getLabelSuffix();
EmitEOL();
}
---
When I disable the assertion, I...
2011 May 23
2
[LLVMdev] Debug llc crash using bugpoint
Hi,
What is the best way to debug an llc crash using bugpoint?
I am getting the following crash that I would like to reduce
llc: /home/vadve/aggarwa4/llvm29/llvm-2.9/lib/MC/MCAsmStreamer.cpp:273:
virtual void<unnamed>::MCAsmStreamer::EmitLabel(llvm::MCSymbol*): Assertion
`Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
0 llc 0x00000000013ae046
1 llc 0x00000000013ae5d4
2 libpthread.so.0 0x000000325660eb10
3 libc.so.6 0x0000003255a30265 gsignal + 53
4 libc.so.6...
2017 Dec 27
1
Convert MachineInstr to MCInst in AsmPrinter.cpp
...jump-table.
For instance, given a MachineInstr, I would like to know if it is of the
following form.
*leaq LJTI0_0(%rip), %rax*
Also, say, I want to add custom labels (some string) while generating
assembly right before emitting such *lea *instructions, how do I do that
given that OutStreamer->EmitLabel() takes MCSymbol as an argument and not a
string/StringRef?
*My goal: *To find lea instructions corresponding to jump-tables and emit a
custom label before such instructions and also maintain a count of how many
such lea instructions are there for each jump-table (using a DenseMap).
I have a work...
2012 Nov 03
1
[LLVMdev] symbols for exception handling
...hey call "xxx=." a debug label.
> The other terminology they use is byte pointer vs ISA-encoded address
> (ISA-encoded meaning this one bit in the case of mips16 ISA).
>
> I'm planning to add a virtual method called EmitDebugLabel to MCStreamer
> which just calls method EmitLabel.
>
> Because of some luck, for exception handling at least, I really only
> need to EmitDebugLabel for eh_func_beginXX.
>
> The other entries in the exception table are all a-b, except for
> eh_func_beginXX, the 1 bits will cancel each other out. I don't know if
> this is s...
2010 Sep 18
2
[LLVMdev] Non-standard labels
Chris,
I want to emit code for target which uses non-standard assembler which
wants labels to look like
LAB nop
instead of
LAB:
I can not do this because labels are emitted by
MCAsmStreamer::EmitLabel which can not be overriden.
Best regards,
Yuri
2010 Sep 19
2
[LLVMdev] Non-standard labels
> Is this just a textual/syntactic thing? If so, you should add a bit to MCAsmInfo to indicate that this is the behavior, and MCAsmPrinter should be changed to emit labels in this syntax.
Thanks! This should be enough.
-Yuri
2010 Sep 20
0
[LLVMdev] Non-standard labels
...you should add a bit to MCAsmInfo to indicate that this is the behavior, and MCAsmPrinter should be changed to emit labels in this syntax.
>
> Thanks! This should be enough.
>
> -Yuri
>
/Yuri Gribov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EmitLabel.diff
Type: application/octet-stream
Size: 1741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100921/903861fa/attachment.obj>
2012 Nov 01
1
[LLVMdev] emitting dwarf debug info on mach fails with assert
Compiling the IR code at http://pastebin.com/hSwdLdD0 for target triple
x86_64-apple-macosx
fails with :
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
`anon'::MCMachOStreamer::EmitLabel(llvm::MCSymbol * Symbol)
llvm::DwarfDebug::emitDebugInfo() Line 1752 + 0x3c bytes C++
llvm::DwarfDebug::endModule() Line 865 C++
llvm::AsmPrinter::doFinalization(llvm::Module & M) Line 878 C++
llvm::FPPassManager::doFinalization(llvm::Module & M) Line 1536
llvm::FPPassManager::runOnModu...
2008 Jul 18
0
[LLVMdev] RFC: debug_line Emission
...> // If there are no lines to emit (such as when we're using .loc
> directives
> // to emit .debug_line information) don't emit a .debug_line
> header.
> if (SectionSourceLines.empty())
> return;
The fix is to move the early exist to just below this line:
EmitLabel("line_prolog_end", 0), right?
>
>
> Basically, if there's a file with only data in it, we still need the
> debug_line prologue generated.
Right.
>
> By removing the "early exit" from EmitDebugLine, I got LLVM to
> generate this data. However, Dan poi...
2012 Nov 03
4
[LLVMdev] symbols for exception handling
mips16 has some unusual requirements for label symbols in .s.
I think that arm thumb has the same issue but have not located yet how
this is handled.
When you have a label of an instruction in mips16, when you reference
the label, the linker
adds a 1 to the address. When you call an odd numbered address, the
procesor switches to mips16 mode and when you call an even numbered
address it
2011 Apr 13
2
[LLVMdev] Extra padding on DWARF debug info?
...the tail
of the debug info section:
emitDIE(Die);
// FIXME - extra padding for gdb bug.
Asm->OutStreamer.AddComment("4 extra padding bytes for GDB");
Asm->EmitInt8(0);
Asm->EmitInt8(0);
Asm->EmitInt8(0);
Asm->EmitInt8(0);
Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("info_end", TheCU->getID()));
Does anybody know what the bug is in GDB that this works around? The
workaround was added as part of r103439[1], which added support for
multiple compilation units in one module. Does the bug ever affect
modules with only a single co...
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...char *CurBufferPtr;
> +
> public:
> virtual ~MachineCodeEmitter() {}
>
> @@ -158,6 +161,9 @@
> /// start of the block is, and can implement
> getMachineBasicBlockAddress.
> virtual void StartMachineBasicBlock(MachineBasicBlock *MBB) = 0;
>
> + virtual void EmitLabel(uint64_t LabelID) = 0;
> +
> +
> /// getCurrentPCValue - This returns the address that the next
> emitted byte
> /// will be output to.
> ///
> @@ -193,6 +199,10 @@
> /// emitted.
> ///
> virtual intptr_t getMachineBasicBlockAddress(MachineBasicBloc...
2010 Jul 17
1
[LLVMdev] Win32 COFF Support - Patch 3
On Fri, Jul 16, 2010 at 11:25 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> Hi Michael,
>
> Overall patch looks good. I do have a few comments below. My main
> comment is please try to make the style match that used in the
> MCMachOStreamer more closely. I intend to refactor more functionality
> into the base MCObjectStreamer class, and having them use consistent
>
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
Hi,
I'm embarrassed that I can't figure this out... I have a compiler that
outputs my module in either .s assembly format or .obj binary format,
either one works just fine. But if I try to output both of them by adding
passes, LLVM throws an Assert:
void WinCOFFStreamer::EmitLabel(MCSymbol *Symbol) {
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
MCObjectStreamer::EmitLabel(Symbol);
}
I attached my code which attempts to make it output both... if I comment
out the lines for one or the other it works just fine.
That code is just a...