search for: triplename

Displaying 8 results from an estimated 8 matches for "triplename".

2016 May 21
1
Using an MCStreamer Directly to produce an object file?
...".o" would be just fine to start with. I seem to 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...
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. >
2016 May 23
0
Using an MCStreamer Directly to produce an object file?
2012 Dec 10
2
[LLVMdev] typeinfo for llvm::MCAsmInfo is missing
...I fully understand that the problem is a bit OT for llvmdev, but I'm stuck for two days now and I really need some direct push. To the problem. I have a C++ shared library, that's working with llvm C++ api. Consider a function: static Object llvm_Target_createMCAsmInfo(Object self, Object tripleName) { llvm::Target target = from_ruby<llvm::Target>(self); char const *triple = from_ruby<char const *>(tripleName); llvm::MCAsmInfo *MAI = target.createMCAsmInfo(triple); return to_ruby<llvm::MCAsmInfo>(*MAI); } The problem here, is it's ok to use llvm::MCAsmInfo objects,...
2014 Aug 06
4
[LLVMdev] Looking for ideas on how to make llvm-objdump handle both arm and thumb disassembly from the same object file
...r suggestions. First a little back ground, the way darwin’s otool(1) does this is that it creates an llvm disassembler for both arm and thumb when disassembling a binary with 32-bit ARM cpu. It uses the C API in <llvm-c/Disassembler.h> and calls LLVMCreateDisasmCPU() twice, once with an arm TripleName and once with a matching thumb TripleName. Then for each 32-bit ARM cpu it will default to one or the other disassembler. Then as it disassembles and finds a symbol in the symbol table for the current PC being disassembled it will see of the symbol has the N_ARM_THUMB_DEF bit set or not. And the...
2012 Dec 10
0
[LLVMdev] typeinfo for llvm::MCAsmInfo is missing
...hat the problem is a bit OT for llvmdev, but I'm stuck for two days now and I really need some direct push. > > To the problem. I have a C++ shared library, that's working with llvm C++ api. Consider a function: > > static Object llvm_Target_createMCAsmInfo(Object self, Object tripleName) > { > llvm::Target target = from_ruby<llvm::Target>(self); > char const *triple = from_ruby<char const *>(tripleName); > > llvm::MCAsmInfo *MAI = target.createMCAsmInfo(triple); > return to_ruby<llvm::MCAsmInfo>(*MAI); > } > > The probl...
2018 Apr 03
0
Problems using LLVM as a disassembler.
...a PC (program counter) parameter that worked. You could use the PC as an offset within the buffer to start disassembling from. In LLVM 4.0 and above the only value of the PC parameter that works is zero. Please can someone look into fixing this? Kind Regards James P.S. Example code below: TripleName = "x86_64-pc-linux-gnu"; // Get the target. std::string Error; DecodeAsmX86_64::TheTarget = llvm::TargetRegistry::lookupTarget(TripleName, Error); if (!TheTarget) return 1; ... // Set up disassembler. DisAsm = TheTarget->createMCDisassembler(*STI, *Ctx);...
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
...t char *ProgName) { Str.reset(createLoggingStreamer(Str.take(), errs())); } - AsmParser Parser(SrcMgr, Ctx, *Str.get(), *MAI); - OwningPtr<TargetAsmParser> TAP(TheTarget->createAsmParser(Parser)); - if (!TAP) { + OwningPtr<AsmParser> Parser(TheTarget->createAsmParser(TripleName, SrcMgr, Ctx, + *Str.get(), *MAI)); + if (!Parser) { errs() << ProgName << ": error: this target does not support assembly parsing.\n"; return 1; } - Parser.setTargetParser(*TAP.get()); - -...