search for: mcasmstream

Displaying 20 results from an estimated 65 matches for "mcasmstream".

Did you mean: mcasmstreamer
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 wha...
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...
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 09
1
[LLVMdev] AsmPrinter vs. MCAsmStreamer
I'm writing a backend using a mid-October svn snapshot of LLVM. I'm having a hard time figuring out the relationship between my XXXAsmPrinter and MCAsmStreamer. Can someone explain what each is responsible for? Looking at the existing targets, the XXXAsmPrinter implementations seem to implement both the legacy "create a .s file" behavior, using printInstruction/printOperand/etc as well as the newer "lower to MCInst" behavior (EmitIns...
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,...
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: HCS12AsmPrinter(TargetMachine &TM, MCStreamer &Streamer) : AsmPrinter(TM, Streamer) {}...
2016 Jan 22
2
Is there a reason why MCAsmStreamer class doesn't have its own .h file?
...9;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 MCAsmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, unsigned ValueSize, unsigned MaxBytesToEmit). What is the reason it was made final? Why not to separate this class into its own module? -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part --------------...
2013 Dec 19
1
[LLVMdev] [PATCH] MC: handle .cfi_startproc simple
...t passing this > Simple bool around correctly, and appending " simple" in the low asm > layer appropriately? What am I missing? > > Thanks. > > include/llvm/MC/MCStreamer.h | 2 +- > lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | 2 +- > lib/MC/MCAsmStreamer.cpp | 6 ++++-- > lib/MC/MCParser/AsmParser.cpp | 8 ++++++-- > lib/MC/MCStreamer.cpp | 2 +- > test/MC/AsmParser/cfi-startproc-simple.s | 7 +++++++ > 6 files changed, 20 insertions(+), 7 deletions(-) > create mode 100...
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...
2017 Dec 27
1
Convert MachineInstr to MCInst in AsmPrinter.cpp
...tructions are there for each jump-table (using a DenseMap). I have a workaround for all the problems stated above but I want to write a cleaner solution. - For finding an *lea *instruction and emitting a label before actually emitting it, I have modified the EmitInstruction() function in MCAsmStreamer.cpp wherein I keep track of how many lea instructions are there for each jump-table using a DenseMap. - As I require the number of lea instructions per jump-table in AsmPrinter.cpp, I have created a function in MCAsmStreamer.cpp which returns the DenseMap (added a declaration of this...
2011 May 23
0
[LLVMdev] Debug llc crash using bugpoint
...-- <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: 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 0x00...
2013 Aug 19
1
[LLVMdev] Offset in MCFixup
...MCFixupKindInfo.TargetOffset - "/// The bit offset to write the relocation into." So if the relocation starts at bit 20 (assuming that the leftmost bit is bit number 31) I'd say that MCFixup.Offset = 1 and MCFixupKindInfo.TargetOffset = 3 and this is somehow confirmed by the code in MCAsmStreamer::AddEncodingComment. All the relocation bits are correctly identified if I emit the encoding of an instruction. The other use of MCFixup.Offset is in MCELFStreamer::EmitInstToData and it looks like it uses MCFixup.Offset to calculate r_offset (Elf32) which is not what I was expecting because I g...
2010 Sep 18
2
[LLVMdev] Non-standard labels
...ds 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 add RegisterAsmStreamer in TargetRegistry.h... Which one is the best? Or maybe I have overlooked some easier solution? -Yuri Gribov
2011 Nov 30
2
[LLVMdev] Problem using a label to a MachineBasicBlock
...sicBlock will also be split at this call 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();...
2012 Jun 13
0
[LLVMdev] [NVPTX] For linkonce_odr NVPTX generates .weak, but even newest PTXAS can't handle it
...near '_Z4testv': syntax > error > ptxas fatal : Ptx assembly aborted due to errors > Thanks for the report. Unfortunately, this does not appear to have a trivial fix. As you mentioned, it is not the NVPTX back-end itself that is emitting the ".weak", but the default MCAsmStreamer implementation. Setting WeakDefDirective in the NVPTXMCAsmInfo class seems to trigger an emission of ".weak_directive", which doesn't help things. Setting LinkOnceDirective helps the ".weak" case, but there is code in LLVM that causes a special label to be produced when...
2012 Mar 27
1
[LLVMdev] R600, a new backend for AMD GPUs
On Mon, Mar 26, 2012 at 01:22:01PM -0400, Villmow, Micah wrote: > Tom, > Two things. One is missing tests. I have some I could send you, but they are mainly OpenCL based for the AMDIL backend, not for the R600. > I've started working on the tests, and I've pushed a few up to my llvm repo. I can add the AMDIL tests too if you want to send them. I think they will be helpful.
2018 Jun 30
2
Using BuildMI to insert Intel MPX instruction BNDCU failed
...TTInstPrinter.cpp:89:0 #14 0x00000000031d5811 llvm::MCTargetStreamer::prettyPrintAsm(llvm::MCInstPrinter&, llvm::raw_ostream&, llvm::MCInst const&, llvm::MCSubtargetInfo const&) /home/shenyouren/workspace/llvm/lib/MC/MCStreamer.cpp:856:0 #15 0x00000000031690e2 (anonymous namespace)::MCAsmStreamer::EmitInstruction(llvm::MCInst const&, llvm::MCSubtargetInfo const&, bool) /home/shenyouren/workspace/llvm/lib/MC/MCAsmStreamer.cpp:1752:0 #16 0x0000000002355fdf llvm::X86AsmPrinter::EmitAndCountInstruction(llvm::MCInst&) /home/shenyouren/workspace/llvm/lib/Target/X86/X86MCInstLower.cp...
2012 Jun 12
2
[LLVMdev] [NVPTX] For linkonce_odr NVPTX generates .weak, but even newest PTXAS can't handle it
Dear LLVM NVPTX maintainers, Just to have the issue recorded, I don't know how important it is: clang generates linkonce_odr out of __inline__, and NVPTX generates .weak out of linkonce_odr (how it happens - a big question, btw, because I can't find anything related in NVPTX asm printer - does it chain to some other printer?), and finally ptxas (both 4.2 and 5) fails to compile it to
2015 Jul 28
2
[LLVMdev] Wrong encoding/decoding for POPC instruction of Sparc
...tInfo const&, llvm::raw_ostream&) + 256 9 llvm-mc 0x000000010964f5e6 llvm::SparcInstPrinter::printInst(llvm::MCInst const*, llvm::raw_ostream&, llvm::StringRef, llvm::MCSubtargetInfo const&) + 86 10 llvm-mc 0x000000010965f90f (anonymous namespace)::MCAsmStreamer::EmitInstruction(llvm::MCInst const&, llvm::MCSubtargetInfo const&) + 2879 11 llvm-mc 0x00000001096043b3 llvm::Disassembler::disassemble(llvm::Target const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&...
2010 Sep 18
0
[LLVMdev] Non-standard labels
...Streamer::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 > add RegisterAsmStreamer in TargetRegistry.h... > > Which one is the best? Or maybe I have overlooked some easier solution? Hi Yuri, I don't really understand what you're trying to do, can you give an example? -Chris