search for: asmbackend

Displaying 20 results from an estimated 24 matches for "asmbackend".

2014 Oct 31
2
[LLVMdev] TSFlags in AsmBackend
Hello LLVM, I'd like to check TSFlags in my AsmBackend code. However AsmBackend objects don't have a reference to MCInstrInfo, which is the only way I've seen to reach TSFlags. A quickie grep shows that none of the existing targets check TSFlags in their AsmBackends. Is there any reason I shouldn't check TSFlags in AsmBackend? If not, w...
2020 Jan 06
2
Encode target-abi into LLVM bitcode for LTO.
...iple, mcpu or -mabi, but in RISC-V, target-abi is only derived from -mabi and -mattr option, so the one of solutions is encoding target-abi in IR via LLVM module flags metadata. But there is an another issue in assembler. In current LLVM design, there is no mechanism to extract info from IR before AsmBackend construction, so I use some little weird approach to init target-abi option before construct AsmBackend[1] or reassign target-abi option in getSubtargetImpl and do some hack in backend[2]. 1. https://reviews.llvm.org/D72245#change-sHyISc6hOqcy (see llc.cpp) 2. https://reviews.llvm.org/D72246 (see...
2020 Jul 01
4
Handling far branches with fixups or ELF relocs
Hello, I'm working on an LLVM backend for an experimental microprocessor. Work is going on nicely, and I've until now found the answer to all my questions directly in the LLVM source code, or in the documentation. However, I'm having problems with the AsmBackend class and the handling of fixups. The processor I'm working with has a single conditional branch instruction, JCC, that takes an IP-relative 9-bit immediate offset as operand. A second version of the instruction takes a register as operand and can therefore jump to any 32-bit address. In...
2020 Jan 06
2
Encode target-abi into LLVM bitcode for LTO.
...bi is only derived from -mabi and -mattr >> option, so the one of solutions is encoding target-abi in IR via LLVM >> module flags metadata. >> >> But there is an another issue in assembler. In current LLVM design, there >> is no mechanism to extract info from IR before AsmBackend construction, so >> I use some little weird approach to init target-abi option before construct >> AsmBackend[1] or reassign target-abi option in getSubtargetImpl and do some >> hack in backend[2]. >> >> 1. https://reviews.llvm.org/D72245#change-sHyISc6hOqcy (see llc.c...
2020 Jan 07
2
Encode target-abi into LLVM bitcode for LTO.
...or -mabi, but in RISC-V, target-abi is only derived from -mabi and -mattr option, so the one of solutions is encoding target-abi in IR via LLVM module flags metadata. > > But there is an another issue in assembler. In current LLVM design, there is no mechanism to extract info from IR before AsmBackend construction, so I use some little weird approach to init target-abi option before construct AsmBackend[1] or reassign target-abi option in getSubtargetImpl and do some hack in backend[2]. > > 1. https://reviews.llvm.org/D72245#change-sHyISc6hOqcy <https://reviews.llvm.org/D72245#change-s...
2012 Dec 17
0
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
...ing issue is the need to post the relocation model such as PIC, CPIC or non-shared. The object method that allows me to update the e_flags at the target level, <target>ELFObjectWriter::getEFlags(), had no access to any target specific information . MipsELFObjectWriter is created during MipsAsmBackend construction which is create during an invocation of createMipsAsmBackend(). create<target>AsmBackend is called by: the codegen (integrated assembler) llvm-mc (standalone assembler) clang (cc1as_main.cpp) My solution for getting access of target specific data to <target>ELFObjec...
2012 Dec 15
2
[LLVMdev] [MC] [llvm-mc] Getting target specific information to <target>ELFObjectWriter
On Fri, Dec 14, 2012 at 1:03 PM, Carter, Jack <jcarter at mips.com> wrote: > Eli, > > This is the kind of feedback I want. I believe I have to add to the base class so it should be generally useful. I can see string being better for the value. I still am enamoured with an enumeration for the tab though: int->string. How would that be a limitation? > I guess that's fine,
2010 Apr 17
0
[LLVMdev] Intro to the MC Project
...eks I suspect. So I will give it a try. :) I was able to quickly hack a JITObjectWriter and I am able to execute simple functions (with no relocation in it). I'm hitting some designs questions and before going in relocations, I think, it's good to discuss them : - I have created a JITX86AsmBackend which creates the JITObjectWriter. The function which is registered to create AsmBackend (createX86_32/64AsmBackend) needs to know if it should create a classical (ELF, or Darwin/Macho) AsmBackend or a JIT one. To discriminate, I see 2 possibilities : - Add an argument to createAsmBackend functions...
2020 Jan 07
2
Encode target-abi into LLVM bitcode for LTO.
...i, but in RISC-V, target-abi is only derived from -mabi and -mattr option, so the one of solutions is encoding target-abi in IR via LLVM module flags metadata. >> >> But there is an another issue in assembler. In current LLVM design, there is no mechanism to extract info from IR before AsmBackend construction, so I use some little weird approach to init target-abi option before construct AsmBackend[1] or reassign target-abi option in getSubtargetImpl and do some hack in backend[2]. >> >> 1. https://reviews.llvm.org/D72245#change-sHyISc6hOqcy <https://reviews.llvm.org/D72245#...
2010 Apr 16
2
[LLVMdev] Intro to the MC Project
...en points, you speak about upgrading the JIT code path. If I want to take a look (or at least try...) on it, what would be the "roadmap" ? >> >> I assume, a MCJITStreamer is needed. >> And probably a JITObjectWriter (inherits from MCObjectWriter) and an associated TargetAsmBackend specific to the JIT (JITX86AsmBackend) ? >> >> What would be the chaining of calls ? The JITObjectWriter::WriteObject is called via the AsmPrinter::doFinalization. But how the AsmPrinter will be created ? > > I'm not sure the best path forward on this, Daniel may have an opi...
2020 Jan 08
3
Encode target-abi into LLVM bitcode for LTO.
...one of solutions is encoding target-abi in IR via LLVM >>>>>> module flags metadata. >>>>>> >>>>>> But there is an another issue in assembler. In current LLVM design, >>>>>> there is no mechanism to extract info from IR before AsmBackend >>>>>> construction, so I use some little weird approach to init target-abi option >>>>>> before construct AsmBackend[1] or reassign target-abi option in >>>>>> getSubtargetImpl and do some hack in backend[2]. >>>>>> >>&g...
2015 Oct 15
2
ELF object writing from assembly file
Thanks a lot Tim. I am getting an error which says: "LLVM ERROR: unable to write nop sequence of 0 bytes" Is there any way that I can print out the Obj code (I mean bitstream representation of the assembly code which is going to be placed in the ELF file), before making any ELF file? Cheers, ES On Tue, Oct 13, 2015 at 3:02 PM, Tim Northover <t.p.northover at gmail.com> wrote:
2020 Jan 09
2
Encode target-abi into LLVM bitcode for LTO.
...rget-abi in IR via LLVM >>>>>>>> module flags metadata. >>>>>>>> >>>>>>>> But there is an another issue in assembler. In current LLVM design, >>>>>>>> there is no mechanism to extract info from IR before AsmBackend >>>>>>>> construction, so I use some little weird approach to init target-abi option >>>>>>>> before construct AsmBackend[1] or reassign target-abi option in >>>>>>>> getSubtargetImpl and do some hack in backend[2]. >>&gt...
2020 Jan 10
2
Encode target-abi into LLVM bitcode for LTO.
...n RISC-V, target-abi is only derived from -mabi and -mattr option, so the one of solutions is encoding target-abi in IR via LLVM module flags metadata. >>> >>> But there is an another issue in assembler. In current LLVM design, there is no mechanism to extract info from IR before AsmBackend construction, so I use some little weird approach to init target-abi option before construct AsmBackend[1] or reassign target-abi option in getSubtargetImpl and do some hack in backend[2]. >>> >>> 1. https://reviews.llvm.org/D72245#change-sHyISc6hOqcy (see llc.cpp) >>> 2...
2010 May 12
0
[LLVMdev] MC ELF support
...port, so that we can have test cases in the 'llvm-mc cat' mode, where it just parses and prints out again. On 0001: - What is hasRelocationAddend? It doesn't seem to be needed to me, and I'm not sure why it would be. If this is a private detail to ELF, it shouldn't go in TargetAsmBackend, but rather be an argument to the object writer constructor. - Feel free to submit a patch to split out ELFX86_{32,64}AsmBackend, if you want me to apply it. Little / obvious patches like that are great ones to get in first, and make subsequent patches easier to read. On 0002: - Looks great, ov...
2020 Jan 13
2
Encode target-abi into LLVM bitcode for LTO.
...abi and -mattr >> option, so the one of solutions is encoding target-abi in IR via LLVM >> module flags metadata. >> >>> >> >>> But there is an another issue in assembler. In current LLVM design, >> there is no mechanism to extract info from IR before AsmBackend >> construction, so I use some little weird approach to init target-abi option >> before construct AsmBackend[1] or reassign target-abi option in >> getSubtargetImpl and do some hack in backend[2]. >> >>> >> >>> 1. https://reviews.llvm.org/D72245#chan...
2010 May 11
2
[LLVMdev] MC ELF support
Hi guys, attached are a couple of work in progress patches for ELF support in the MC module. I'm sending this email to gather some general feedback on the code. Applying these patches doesn't get you a fully working llvm-mc that understands ELF; it's just the ground work. I've got a couple more small patches that fixup some places that assume Mach-O object format which I'll
2020 Jan 15
2
Encode target-abi into LLVM bitcode for LTO.
...;, "CodeView", "CodeViewGHash", "Debug Info Version" and others Objective-C related info in module level metadata. But I found several metadata info are handled at AsmPrinter::EmitStartOfAsmFile(Module &M), but there is no any similar interface in MC layer. ex. MCAsmBackend or MCStreamer. > I guess this starts to come from the other direction for me, then: what >>> purpose does the "target triple" in the module textual IR serve? I guess >>> it's not used to create the backend, but at best used to validate that it's >>&gt...
2020 Jan 27
2
Encode target-abi into LLVM bitcode for LTO.
...wGHash", > "Debug Info Version" and others Objective-C related info in module level > metadata. > > > > But I found several metadata info are handled at > AsmPrinter::EmitStartOfAsmFile(Module &M), but there is no any similar > interface in MC layer. ex. MCAsmBackend or MCStreamer. > > > > > > I guess this starts to come from the other direction for me, then: what > purpose does the "target triple" in the module textual IR serve? I guess > it's not used to create the backend, but at best used to validate that it's >...
2020 Jan 27
2
Encode target-abi into LLVM bitcode for LTO.
...ion" and others Objective-C related info in module level >>> metadata. >>> > >>> > But I found several metadata info are handled at >>> AsmPrinter::EmitStartOfAsmFile(Module &M), but there is no any similar >>> interface in MC layer. ex. MCAsmBackend or MCStreamer. >>> > >>> > >>> > I guess this starts to come from the other direction for me, then: >>> what purpose does the "target triple" in the module textual IR serve? I >>> guess it's not used to create the backend, but at b...