similar to: [LLVMdev] AsmPrinter vs. MCAsmStreamer

Displaying 20 results from an estimated 1100 matches similar to: "[LLVMdev] AsmPrinter vs. MCAsmStreamer"

2018 Jun 30
2
Using BuildMI to insert Intel MPX instruction BNDCU failed
Hello everyone, I'm a newbie of llvm. I'm trying to insert Intel MPX instruction BNDCU with BuildMI. I add my machinefunctionpass at addPreEmitPass2. Here is the code of insertion: BuildMI(MBB, MI, DL, TII->get(X86::BNDCU64rr)).addReg(X86::BND2, RegState::Define).addReg(X86::R10); And here is to stack track when I compiler program with modified llc:
2015 Jul 28
2
[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc
Hello, There is an issue in the latest Sparc code: while we can encode POPC, decode results in crash in llvm-mc $ echo "popc %g1, %g2" | ./Release+Asserts/bin/llvm-mc -assemble -triple=sparcv9 -show-encoding .text popc %g1, %g2 ! encoding: [0x85,0x70,0x00,0x01] $ echo "0x85,0x70,0x00,0x01"|./Release+Asserts/bin/llvm-mc -disassemble -triple=sparcv9
2016 Jan 22
2
Is there a reason why MCAsmStreamer class doesn't have its own .h file?
Hi Craig and Rail, At Movidius, we have had to make a few changes to ‘MCAsmStreamer’ to support our assembler which is not ‘gas’ compliant. Earlier versions of LLVM (3.1 and 3.2) did have a separate header for ‘MCAsmStreamer’, and we had previously sub-classed this. The following are modifications that we have had to make because although ‘MCAsmStreamer’ does most of what we need,
2012 May 11
1
[LLVMdev] 2 versions of printInstruction()
Hi, LLVMers, I notice that there are two versions of printInstruction() generated by tablegen: (1) XXXInstPrinter::printInstruction(const MCInst *MI, raw_ostream &os), like for X86. (2) XXXAsmPrinter::printInstruction(const MachineInstr *MI, raw_ostream &os), like for Sparc. I guess Sparc backend directly transform MachineInstr objects into ostream, while X86 backend convert
2017 Dec 27
1
Convert MachineInstr to MCInst in AsmPrinter.cpp
Hello everyone, In the file *lib/CodeGen/AsmPrinter/AsmPrinter.cpp*, I would like to obtain an MCInst corresponding to its MachineInstr. Can anyone tell me a way to do that? If that is not possible, then, I would like to know if a given MachineInstr is an *lea *instruction and I would like to know if the symbol involved with this lea instruction is a jump-table. For instance, given a
2015 Jul 31
2
[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc
I'll look into it, thanks for the report. On Thu, Jul 30, 2015 at 11:01 PM, Jun Koi <junkoi2004 at gmail.com> wrote: > Any ideas on this bug? > > Thanks. > > > On Wed, Jul 29, 2015 at 12:17 AM, Jun Koi <junkoi2004 at gmail.com> wrote: > >> Hello, >> >> There is an issue in the latest Sparc code: while we can encode POPC, >> decode
2015 Jul 31
0
[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc
Any ideas on this bug? Thanks. On Wed, Jul 29, 2015 at 12:17 AM, Jun Koi <junkoi2004 at gmail.com> wrote: > Hello, > > There is an issue in the latest Sparc code: while we can encode POPC, > decode results in crash in llvm-mc > > $ echo "popc %g1, %g2" | ./Release+Asserts/bin/llvm-mc -assemble > -triple=sparcv9 -show-encoding > .text > popc
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 Jun 04
1
[LLVMdev] MCAsmStreamer: format symbol attributes consistently
This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'. This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column. The patch applies cleanly on the svn head. Best regards, -- Arnaud de Grandmaison -------------- next part
2015 Jul 31
1
[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc
Hi James, Not sure if you've already found the problem but I've been looking at this issue a bit as a way to learn. What I've seen is that the wrong operand names are used for the instruction which causes the decoder emitter to fail to recognize the operands. The attached patch changes the names of the operands and adds a test for the disassembly of the instruction. I haven't
2016 Jan 22
2
Is there a reason why MCAsmStreamer class doesn't have its own .h file?
On Thu, Jan 21, 2016 at 4:04 PM, Craig Topper <craig.topper at gmail.com> wrote: > Isn't it also marked 'final' so it can't be inherited from anyway? What's > your need to inherit from it? > -- > ~Craig > Oops, missed the final part. I need to change the alignment. For my target it is sort of independent of the data layout. I was going to overwrite void
2016 Jan 22
3
Is there a reason why MCAsmStreamer class doesn't have its own .h file?
On Thu, Jan 21, 2016 at 5:03 PM, Craig Topper <craig.topper at gmail.com> wrote: > I dont' know why its final. That routine is just a method to force the > current write pointer to a specific alignment. Shouldn't you be changing > the callers to give you the alignment you want or don't want. > > > > -- > ~Craig > It looks like the callers get their
2011 Nov 20
0
[LLVMdev] How can I output assembly comments from emitPrologue()?
So, an update. I have managed to generate comments, although it does create a non-existent instruction. My method is as follows (and I would appreciate any comments on how to do it "better", although note that this won't make it into the final code :).) 1. I declared a "fake" instruction type to hold comments, ala: class FakeInst<dag outs, dag ins, string asmstr,
2011 Oct 14
0
[LLVMdev] Native MCAsmStreamer?
Hi all, I'm working on a new target, a 16 bit microcontroller, in the process of learning the LLVM backend things. It's going well so far, but I have a question: I'd like to use a pure MCAsmStreamer and not have another layer of glue. Right now, I have the following to make it compile: --- using namespace llvm; namespace { class HCS12AsmPrinter : public AsmPrinter { public:
2012 Oct 30
3
[LLVMdev] TargetELFWriterInfo used for anything?
> In consideration of those codes in XXXAsmPrinter class which print out > MachineInstr in .s format, I tend to think they are old codes that > might be obsolete and will be replaced with MC layer implementation, > but I am not sure. How about sending a patch which remove those obsolete code, and let others give comment? Cheers, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab,
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
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. 2. Attach it to an LLVM
2012 Oct 27
0
[LLVMdev] TargetELFWriterInfo used for anything?
2012/10/27 Jan Voung <jvoung at chromium.org>: > On Fri, Oct 26, 2012 at 6:01 PM, ��f�� (Wei-Ren Chen) > <chenwj at iis.sinica.edu.tw> wrote: >> >> Hi Jan, >> >> Why do you think TargetELFWriterInfo is not used (IIUC)? >> I see a lot of targets inherit class TargetELFWriterInfo >> for their ELF writer. >> > > Yes, a lot of targets
2011 May 23
0
[LLVMdev] Debug llc crash using bugpoint
Do something like this: bugpoint -run-llc <bitcode file> --tool-args -- <llc arguments> Cameron On May 23, 2011, at 1:33 PM, Arushi Aggarwal wrote: > 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:
2013 Aug 19
1
[LLVMdev] Offset in MCFixup
Hi, I'm trying to implement a 10-bit relocation that does not start at the beginning of a byte-boundary and I'm not entirely sure I understand the use by some targets of MCFixup.Offset and MCFixupKindInfo.TargetOffset. LLVM's documentation states that: MCFixup.Offset -"/// The byte index of start of the relocation inside the encoded instruction."