search for: thetripl

Displaying 20 results from an estimated 23 matches for "thetripl".

Did you mean: thetriple
2013 Jan 07
0
[LLVMdev] How to output a .S *and* a .OBJ file?
...://lists.llvm.org/pipermail/llvm-dev/attachments/20130107/06c571c4/attachment.html> -------------- next part -------------- // Initialize targets first, so that --version shows registered targets. InitializeAllTargets(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); Triple *TheTriple = NULL; if ( DoMingw ) { TheTriple = new Triple("i686-pc-mingw32"); } else { TheTriple = new Triple("i686-pc-win32"); } Assert(!TheTriple->getTriple().empty()) //TheTriple.setTriple(sys::getHostTriple()); 9 std::string Err; const Target *TheTarget = Target...
2011 Dec 19
2
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...Buffer); llvm::MCInst Inst; uint64_t Size = 0; disassembler->getInstruction(Inst, Size, *Buffer.take(), 0, llvm::nulls(), llvm::nulls()); // llvm::StringRef TheArchString("arm-apple-darwin"); // std::string normalized = llvm::Triple::normalize(TheArchString); // // llvm::Triple TheTriple; // TheTriple.setArch(llvm::Triple::arm); // TheTriple.setOS(llvm::Triple::Darwin); // TheTriple.setVendor(llvm::Triple::Apple); // llvm::Target *TheTarget = NULL; return 0; }
2017 Oct 11
3
TargetRegistry and MC object ownership.
...ose backbends I've broken), but I hit a big blocker when I get to Target in "llvm/Support/TargetRegistry.h". Target vends MC objects by calling registered ctor functions. E.g.: MCAsmBackend *createMCAsmBackend(const MCRegisterInfo &MRI, StringRef TheTriple, StringRef CPU, const MCTargetOptions &Options) const { if (!MCAsmBackendCtorFn) return nullptr; return MCAsmBackendCtorFn(*this, MRI, Triple(TheTriple), CPU, Options); } The callee owns the resulting object so ideally we would return a unique_ptr<M...
2011 Dec 19
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...Buffer); llvm::MCInst Inst; uint64_t Size = 0; disassembler->getInstruction(Inst, Size, *Buffer.take(), 0, llvm::nulls(), llvm::nulls()); // llvm::StringRef TheArchString("arm-apple-darwin"); // std::string normalized = llvm::Triple::normalize(TheArchString); // // llvm::Triple TheTriple; // TheTriple.setArch(llvm::Triple::arm); // TheTriple.setOS(llvm::Triple::Darwin); // TheTriple.setVendor(llvm::Triple::Apple); // llvm::Target *TheTarget = NULL; return 0; } _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://l...
2012 Jan 09
1
[LLVMdev] FW: generating ELF files on non-ELF platforms with MC
...MCContext &Ctx, MCAsmBackend &MAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); if (TheTriple.isOSWindows()) return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); return createELFStreamer(Ctx, MAB, _OS, _Em...
2012 Jan 04
4
[LLVMdev] generating ELF files on non-ELF platforms with MC
Hello, We're currently working on MC-JIT, focusing on runtime generation and loading of ELF object files, even on non-ELF platforms (i.e. Windows). However, we run into a problem with MC insisting to generate COFF objects on Windows, MachO on Macs and ELF only otherwise, based on the triple. Is there an existing method to generate ELF objects with MC on Windows, without modifying MC? Thanks
2011 Dec 19
3
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...Size = 0; > > disassembler->getInstruction(Inst, Size, *Buffer.take(), 0, > llvm::nulls(), llvm::nulls()); > > // llvm::StringRef TheArchString("arm-apple-darwin"); > // std::string normalized = llvm::Triple::normalize(TheArchString); > // > // llvm::Triple TheTriple; > // TheTriple.setArch(llvm::Triple::arm); > // TheTriple.setOS(llvm::Triple::Darwin); > // TheTriple.setVendor(llvm::Triple::Apple); > // llvm::Target *TheTarget = NULL; > > return 0; > } > _______________________________________________ > LLVM Developers mailing...
2012 Jan 09
0
[LLVMdev] generating ELF files on non-ELF platforms with MC
...MCContext &Ctx, MCAsmBackend &MAB, raw_ostream &_OS, MCCodeEmitter *_Emitter, bool RelaxAll, bool NoExecStack) { Triple TheTriple(TT); if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); if (TheTriple.isOSWindows()) return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); return createELFStreamer(Ctx, MAB, _OS, _Em...
2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...be able to create an aarch64 target without too much issue: llvm::InitializeAllTargetInfos(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmParsers(); llvm::InitializeAllDisassemblers(); std::string Error; std::string TripleName("aarch64-unknown-linux-gnu"); Triple TheTriple(Triple::normalize(TripleName)); const Target *TheTarget = TargetRegistry::lookupTarget(TripleName, Error); if (!TheTarget) { std::cerr << "llvm_insts_to_binary(): " << Error; return 1; } Then, I move on to creating some of the needed ASM / REG info and an MCCo...
2017 Dec 06
2
[AMDGPU] Strange results with different address spaces
> On Dec 6, 2017, at 02:28, Haidl, Michael <michael.haidl at uni-muenster.de> wrote: > > The IR goes through a backend agnostic preparation phase that brings it into SSA from and changes the AS from 0 to 1. This sounds possibly problematic to me. The IR should be created with the correct address space to begin with. Changing this in the middle sounds suspect. > After this
2011 Dec 20
0
[LLVMdev] Disassembly arbitrary machine-code byte arrays
...sassembler->getInstruction(Inst, Size, *Buffer.take(), 0, >> llvm::nulls(), llvm::nulls()); >> >> //  llvm::StringRef TheArchString("arm-apple-darwin"); >> //  std::string normalized = llvm::Triple::normalize(TheArchString); >> // >> //  llvm::Triple TheTriple; >> //  TheTriple.setArch(llvm::Triple::arm); >> //  TheTriple.setOS(llvm::Triple::Darwin); >> //  TheTriple.setVendor(llvm::Triple::Apple); >> //  llvm::Target *TheTarget = NULL; >> >> return 0; >> } >> ______________________________________________...
2013 Sep 25
1
[LLVMdev] arm64 / iOS support
...PE_ARM64_ALL); + } +}; + class ELFAArch64AsmBackend : public AArch64AsmBackend { public: uint8_t OSABI; @@ -581,5 +721,7 @@ MCAsmBackend * llvm::createAArch64AsmBackend(const Target &T, const MCRegisterInfo &MRI, StringRef TT, StringRef CPU) { Triple TheTriple(TT); + if (TheTriple.isOSDarwin()) + return new DarwinAArch64AsmBackend(T, TT, TheTriple.getOS()); return new ELFAArch64AsmBackend(T, TT, TheTriple.getOS()); } diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp index 8ec...
2012 Mar 14
2
[LLVMdev] How to set constant pool section?
...ntString = "!"; ConstantPoolSection = "\t.section \".rodata\",#alloc\n"; } That is wrong for LLVM 3.0 In latest LLVM versions, Sparc have MC subtarget and: SparcELFMCAsmInfo::SparcELFMCAsmInfo(const Target &T, StringRef TT) { IsLittleEndian = false; Triple TheTriple(TT); if (TheTriple.getArch() == Triple::sparcv9) PointerSize = 8; Data16bitsDirective = "\t.half\t"; Data32bitsDirective = "\t.word\t"; Data64bitsDirective = 0; // .xword is only supported by V9. ZeroDirective = "\t.skip\t"; CommentString = "!&q...
2016 May 23
0
Using an MCStreamer Directly to produce an object file?
2017 Aug 22
5
[RFC] mir-canon: A new tool for canonicalizing MIR for cleaner diffing.
Patch for review. On Mon, Aug 21, 2017 at 11:45 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> wrote: > Ping. > > Still working on preparing code for review. Will have a patch for review > ready in the coming days. > > PL > > On Tue, Aug 15, 2017 at 12:06 PM Puyan Lotfi <puyan.lotfi.llvm at gmail.com> > wrote: > >> Hi, >> >> >>
2015 May 23
3
[LLVMdev] Moving Private Label Prefixes from MCAsmInfo to MCObjectFileInfo
On 23 May 2015 at 00:08, Jim Grosbach <grosbach at apple.com> wrote: > This is the key question. The LLVM assumption is that these sorts of things > are inferable from the triple. Your observation here that the GNU world’s > notion of triples and LLVM’s need not be the same is a good one. Having a > split and a translation up in clang seems an interesting avenue to explore. >
2013 Oct 29
1
[LLVMdev] Getting TargetData and TargetLibraryInfo for determining Malloc size
Hello; I was trying to use the computeArraySize() function from the MemoryBuiltins.cpp file. It requires two arguments DataLayout *TD and const TargetLibraryInfo *TLI. Can anyone tell me how to get the TargetLibraryInfo? I am getting the DataLayout using: DataLayout *TD; TD = new DataLayout(&M); I hope that's the right way of getting it. Thanks a lot; -- Arnamoy Bhattacharyya
2016 Nov 17
3
DWARF Generator
...to take a look at how we can possibly fix the lib/CodeGen/DwarfGenerator.cpp and lib/CodeGen/DwarfGenerator.h. The code that sets up all the required classes for the AsmPrinter method is in the DwarfGen class from lib/CodeGen/DwarfGenerator.cpp in the following function: bool DwarfGen::init(Triple TheTriple, StringRef OutputFilename); The code in this function was looted from existing DwarfLinker.cpp code. This functions requires a valid triple and that triple is used to create a lot of the classes required to make the AsmPrinter. I am not sure if any other code uses the AsmPrinter like this besides...
2019 Feb 07
9
RFC: changing variable naming rules in LLVM codebase
TL;DR: change the rule for variable names from UpperCamelCase to lowerCamelCase. Just to get wider visibility on this, I'm raising this again as an RFC, as suggested by Roman Lebedev. My original post from last week is here and gives a rationale: http://lists.llvm.org/pipermail/llvm-dev/2019-February/129854.html. There seemed to be general agreement that the status quo is not ideal.
2016 Nov 18
4
DWARF Generator
...look at how we can possibly fix the lib/CodeGen/DwarfGenerator.cpp and lib/CodeGen/DwarfGenerator.h. The code that sets up all the required classes for the AsmPrinter method is in the DwarfGen class from lib/CodeGen/DwarfGenerator.cpp in the following function: > > bool DwarfGen::init(Triple TheTriple, StringRef OutputFilename); > > The code in this function was looted from existing DwarfLinker.cpp code. This functions requires a valid triple and that triple is used to create a lot of the classes required to make the AsmPrinter. I am not sure if any other code uses the AsmPrinter like th...