search for: getarch

Displaying 20 results from an estimated 33 matches for "getarch".

2019 Jan 23
3
答复: How to add new arch for llvm-cov show?
Hi vedant, The program didn't pass the checking "OF->getArch() != Triple(Arch).getArch()" loadBinaryFormat in CoverageMappingReader.cpp and returned an error. It's because "OF->getArch()" returned null and "Triple(Arch).getArch()" returned XXXX(name of my arch). The returned value of " OF->getArch()" is decide...
2019 Jan 24
2
答复: 答复: How to add new arch for llvm-cov show?
...; Yuchao (Michael) <michael.yuchao at huawei.com> 主题: Re: 答复: [llvm-dev] How to add new arch for llvm-cov show? On Jan 23, 2019, at 1:24 AM, xuruobin <xuruobin at huawei.com<mailto:xuruobin at huawei.com>> wrote: Hi vedant, The program didn't pass the checking "OF->getArch() != Triple(Arch).getArch()" loadBinaryFormat in CoverageMappingReader.cpp and returned an error. It's because "OF->getArch()" returned null and "Triple(Arch).getArch()" returned XXXX(name of my arch). The returned value of " OF->getArch()" is decided...
2019 Jan 25
2
答复: How to add new arch for llvm-cov show?
...ense ELF file reader get nothing because my compiler doesn’t write these information. It seems I have to find somewhere(maybe an ELF file writer) to write e_machine so my reader will read this. But I have no idea where to write it now. 2. In CoverageMapping.cpp, there is a checking “OF->getArch() != Triple(Arch).getArch()” and it makes an error if not equal. “OF->getArch” will go into a switch/case and the code enters the default branch which returns an UnknownArch. I hacked the code to make default branch return Triple::XXXX(only a temporary solution for the first point). Where shoul...
2019 Jan 22
2
How to add new arch for llvm-cov show?
Hi all, I'm trying to support llvm-cov for a new architecture and I have successfully built compiler-rt for my arch. Following steps shown in https://clang.llvm.org/docs/SourceBasedCodeCoverage.html , I encountered an error for the last step(step of llvm-cov show). The command line was (supposed my arch is XXXX) "llvm-cov show -arch=XXXX ./foo -instr-profile=foo.profdata" and the
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...t;m_Group>; def march_EQ : Joined<["-"], "march=">, Group<m_Group>; --- ./tools/clang/lib/Driver/Driver.cpp.orig +++ ./tools/clang/lib/Driver/Driver.cpp @@ -1700,6 +1700,9 @@ static llvm::Triple computeTargetTriple(StringRef DefaultTargetTriple, if (Target.getArch() == llvm::Triple::ppc) Target.setArch(llvm::Triple::ppc64); } + } else if (Args.getLastArg(options::OPT_mx32)) { + if (Target.getArch() == llvm::Triple::x86_64) + Target.setEnvironment(llvm::Triple::GNUX32); } return Target; --- ./tools/clang/lib/Basic/Targets.cpp.or...
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...lChains.h 2013-08-18 13:39:12.822210498 +0000 @@ -121,7 +121,7 @@ SmallVectorImpl<StringRef> &BiarchLibDirs, SmallVectorImpl<StringRef> &BiarchTripleAliases); - void ScanLibDirForGCCTriple(llvm::Triple::ArchType TargetArch, + void ScanLibDirForGCCTriple(llvm::Triple TargetTriple, const llvm::opt::ArgList &Args, const std::string &LibDir, StringRef CandidateTriple, --- ./tools/clang/lib/Driver/Tools.cpp.orig 2...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi, I'm working on bringing up complete coverage for a Gentoo x32 "desktop" system. I've been cooking up quite a few patches for various packages to push upstream, but right now, the biggest blocker is the lack of support for building with/codegen targeting x32 in llvm/clang. Since the x32 patches were sent last year, I see support code has landed in LLVM, and basic handling of
2014 Jan 06
2
[LLVMdev] Why do X86_32TargetMachine and X86_64TargetMachine classes exist?
...two subclasses of X86TargetMachine are basically identical. The *only* thing that's different is the constructor. And that *only* differs in the is64Bit argument that it passes to the X86TargetMachine constructor. Replacing the hard-coded 'true' or 'false' with 'Triple(TT).getArch()==Triple::x86_64' makes them *actually* identical. Can we just ditch the subclasses, move the fields and methods that they share into the X86TargetMachine class, and use that instead? Or am I missing something? In the patch I'm about to post to llvm-commits, I *stop* using the X86_64Targ...
2014 Jun 19
2
[LLVMdev] [PATCH] triples for baremetal
...unittests/ADT/TripleTest.cpp (revision 211122) +++ unittests/ADT/TripleTest.cpp (working copy) @@ -123,12 +123,6 @@ EXPECT_EQ(Triple::UnknownOS, T.getOS()); EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment()); - T = Triple("arm-none-none-eabi"); - EXPECT_EQ(Triple::arm, T.getArch()); - EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); - EXPECT_EQ(Triple::UnknownOS, T.getOS()); - EXPECT_EQ(Triple::EABI, T.getEnvironment()); - T = Triple("huh"); EXPECT_EQ(Triple::UnknownArch, T.getArch()); } @@ -246,7 +240,7 @@ EXPECT_EQ("i486--linux-gnu", Trip...
2014 Jun 17
4
[LLVMdev] triples for baremetal
[+llvmdev, -llvm-dev] (Oopsies, llvmdev doesn't have a hyphen in it like all the others do) On 6/17/14, 10:45 AM, Jonathan Roelofs wrote: > [+llvm-dev, cfe-dev] > > Was "Re: [PATCH] ARM: allow inline atomics on Cortex M" > > On 6/17/14, 10:42 AM, Jonathan Roelofs wrote: >> >> >> On 6/17/14, 9:35 AM, Renato Golin wrote: >>> On 17 June 2014
2012 Dec 17
2
[LLVMdev] target arm
Hello, I'm trying to use clang to compile a file in an x86 machine (running i386 GNU/Linux) to ARM. In the end, all I want is for the bit code (I use -emit-llvm) getArch() result to be Triple::ARM. I tried to use "-target arm" but I get a "fatal error: 'bits/predefs.h' file not found". Is there any easy way to make the target architecture "ARM" without running into such trouble? Thanks! Alon ________________________________...
2004 May 03
1
Install of 3.1 aborts
...y list. But anaconda fails, announcing: You are trying to install on a machne which isn't supported by this release of CentOS-3 The error message stems from this part of anaconda code in packages.py: # this is a crappy hack, but I don't want bug reports from these people if (iutil.getArch() == "i386") and (not grpset.hdrlist.has_key("kernel")): intf.messageWindow(_("Error"), _("You are trying to install on a machine " "which isn't supported by this release of "...
2016 Jan 03
2
Diff to add ARMv6L to Target parser
...expected result. The code that I had been using (within Swift’s Driver.cpp the following: static llvm::Triple computeTargetTriple(StringRef DefaultTargetTriple) { llvm::Triple triple = llvm::Triple(DefaultTargetTriple); // Canonicalization of all armv6 sub architectures to armv6 if (triple.getArch() == llvm::Triple::ArchType::arm) { if (triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6 || triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m || triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6k || triple.getSubArch() == llvm...
2014 Jul 09
5
[LLVMdev] [PATCH][REQUEST] Could someone submit this CSR Kalimba definitions patch please?
...BM, - NVIDIA + NVIDIA, + CSR }; enum OSType { UnknownOS, @@ -164,9 +150,6 @@ /// The parsed arch type. ArchType Arch; - /// The parsed subarchitecture type. - SubArchType SubArch; - /// The parsed vendor type. VendorType Vendor; @@ -209,9 +192,6 @@ /// getArch - Get the parsed architecture type of this triple. ArchType getArch() const { return Arch; } - /// getSubArch - get the parsed subarchitecture type for this triple. - SubArchType getSubArch() const { return SubArch; } - /// getVendor - Get the parsed vendor type of this triple. Vendo...
2014 Jan 06
3
[LLVMdev] Why do X86_32TargetMachine and X86_64TargetMachine classes exist?
...Reloc::Model RM, CodeModel::Model CM, > > CodeGenOpt::Level OL) > > - : X86TargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, false), > > + : X86TargetMachine(T, TT, CPU, FS, Options, RM, CM, OL, Triple(TT).getArch()) > > Think this is missing a "==Triple::x86_64” at the end, yes? Nah, I turned that parameter into a Triple::ArchType so that I can pass x86_16 as an option too. See the patch on llvm-commits which adds the x86_16 target. Currently working on a few codegen bugs with building the Lin...
2016 Jul 10
2
Implementation of DWARF expression parser
...The description of D6771 reads, "It requires a few preliminary patches like landing D6243 and adding a MCRegisterInfo in the DWARFContext". The latter, adding an MCRegisterInfo, seems to be a bit beyond me. Specifically, while I can get a target architecture from a given ObjectFile using getArch(), I’m not sure how to turn this into an MCRegisterInfo (or really anything, such as Target, that could lead to one). My most recent attempt, using TargetRegistry::lookupTarget() to get a Target and then use createMCRegInfo(), fails with a complaint that no targets are registered, and I’m still too...
2007 Feb 15
0
yum does not update x86_64
...les Setting up Package Sacks Excluding Incompatible Archs Finished Reading Local RPMDB Building updates object What I do without success: # yum clean all # rm -f /var/lib/rpm/__db.00* # rpm --rebuilddb I created a python script like used by yum : # -*- python -*- # arch.py import os import re def getArch(): arch = os.uname()[4] newarch = None if re.search('86', arch): newarch = 'i386' if re.search('sparc', arch) or re.search('sun', arch): newarch = 'sparc' if re.search('alpha', arch): newarch = 'alpha...
2012 Dec 17
0
[LLVMdev] target arm
...es at cs.uiuc.edu] On Behalf Of Shaltiel, Alon Sent: 17 December 2012 17:15 To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] target arm Hello, I'm trying to use clang to compile a file in an x86 machine (running i386 GNU/Linux) to ARM. In the end, all I want is for the bit code (I use -emit-llvm) getArch() result to be Triple::ARM. I tried to use "-target arm" but I get a "fatal error: 'bits/predefs.h' file not found". Is there any easy way to make the target architecture "ARM" without running into such trouble? Thanks! Alon ________________________________...
2013 Aug 22
1
[LLVMdev] X32 ABI support for Clang/compiler-rt (re: clang patch)
On Thu, 2013-08-22 at 12:29 +0400, Alexey Samsonov wrote: > On Thu, Aug 22, 2013 at 11:56 AM, Steven Newbury <steve at snewbury.org.uk>wrote: > > > On Thu, 2013-08-22 at 11:50 +0400, Alexey Samsonov wrote: > > > On Thu, Aug 22, 2013 at 11:39 AM, Steven Newbury <steve at snewbury.org.uk > > >wrote: > > > > > > > On Thu, 2013-08-22 at
2012 Mar 14
2
[LLVMdev] How to set constant pool section?
...stantPoolSection = "\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 = "!"; HasLEB128 = true; Su...