search for: getcurrentsect

Displaying 14 results from an estimated 14 matches for "getcurrentsect".

2013 Nov 12
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...getLabel() {return Label;} + size_t getNumEntries() {return Entries.size();} + const MCExpr *getEntry(size_t Num) {return Entries[Num];} These can be const. + int64_t ConstantPoolCounter; This can be unsigned. + case AsmToken::Equal: { + const MCSection *Section = getParser().getStreamer().getCurrentSection().first; + assert(Section); We should probably check here that the mnemonic is actually 'ldr', e.g. see the AsmToken::Identifier case. +@ RUN: clang -target arm -integrated-as -c %s -o %t1 2> %t2; echo "ok" +@ RUN: cat %t2 | FileCheck %s Clang tests shouldn't be in t...
2013 Nov 12
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...tries() {return Entries.size();} const MCExpr > + *getEntry(size_t Num) {return Entries[Num];} > These can be const. > > + int64_t ConstantPoolCounter; > This can be unsigned. > > + case AsmToken::Equal: { > + const MCSection *Section = > getParser().getStreamer().getCurrentSection().first; > + assert(Section); > We should probably check here that the mnemonic is actually 'ldr', e.g. > see the AsmToken::Identifier case. > > +@ RUN: clang -target arm -integrated-as -c %s -o %t1 2> %t2; echo "ok" > +@ RUN: cat %t2 | FileCheck %s &gt...
2013 Dec 18
1
[LLVMdev] GCModuleInfo and MCJIT
...to emit the gc metadata in the data section. And it does not work with MCJIT. I don't know why, probably because somewhere, an AsmPrinter or MCJIT supposes that another section is active after the call to finishAssembly. To solve the problem, you just have to add const MCSection* sec = AP.getCurrentSection(); et the beginning of finishAssembly, and AP.OutStreamer.SwitchSection(sec); at the end. See you, Gaël 2013/12/18 Gaël Thomas <gael.thomas00 at gmail.com>: > Hi! > > I have now a more precise question, I hope that this time, someone > will be able to help me :) >...
2012 Oct 16
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Hi Greg, I'm afraid I've not looked into the infrastructure Jim put into place, so I've not really been able to answer the "how should I do it" questions, but hopefully I can comment on the ABI. > And probably questions for Tim, are these "section-relative" mapping > symbols, as defined in 4.6.5.1 of the ELF for ARM document? Yes, they are. > And what
2011 Jul 06
1
[LLVMdev] clang-llvm exceptions problem powerpc-apple-darwin
...itReference(const MCSymbol *Sym, unsigned Encoding) const { const TargetLoweringObjectFile &TLOF = getObjFileLowering(); const MCExpr *Exp = TLOF.getExprForDwarfReference(Sym, Mang, MMI, Encoding, OutStreamer); const MCSectionMachO * SecCur = dyn_cast<MCSectionMachO> (getCurrentSection()); const MCSectionMachO * SecRef = dyn_cast<MCSectionMachO>(&Sym- >getSection()); #if 0 OutStreamer.EmitAbsValue(Exp, GetSizeOfEncodedValue(Encoding)); #elif 0 if (SecRef->getType() == MCSectionMachO::S_COALESCED) OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue...
2013 Nov 16
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...xpr *getEntry(size_t Num) {return > > + Entries[Num];} > > These can be const. > > > > + int64_t ConstantPoolCounter; > > This can be unsigned. > > > > + case AsmToken::Equal: { > > + const MCSection *Section = > > getParser().getStreamer().getCurrentSection().first; > > + assert(Section); > > We should probably check here that the mnemonic is actually 'ldr', e.g. > > see the AsmToken::Identifier case. > > > > +@ RUN: clang -target arm -integrated-as -c %s -o %t1 2> %t2; echo "ok" > > +@ RU...
2013 Dec 18
0
[LLVMdev] GCModuleInfo and MCJIT
Hi! I have now a more precise question, I hope that this time, someone will be able to help me :) I'm now able to find the gc meta data. To find this data, I simply register a GCMetadataPrinter (just like during an AOT compilation). A GCMetadataprinter is called at the end of the compilation of a module after having assigned the slots to the live roots. I have almost everything except that
2012 Oct 17
0
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
...MappingSymbolCounter++); + MCSymbol *Symbol = getContext().GetOrCreateSymbol(UniqueName); + + MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol); + MCELF::SetType(SD, ELF::STT_NOTYPE); + MCELF::SetBinding(SD, ELF::STB_LOCAL); + SD.setExternal(false); + Symbol->setSection(*getCurrentSection()); + + const MCExpr *Value = MCSymbolRefExpr::Create(Start, getContext()); + Symbol->setVariableValue(Value); +} + +void MCELFStreamer::EmitDataRegion(MCDataRegionType Kind) { + switch (Kind) { + case MCDR_DataRegion: + case MCDR_DataRegionJT8: + case MCDR_DataRegio...
2013 Dec 15
2
[LLVMdev] GCModuleInfo and MCJIT
Hi all, So, MCJIT is working with vmkit, that's great. However, I need to retrieve the GCModuleInfo and the MachineCodeEmitter used during the compilation process. And I don't know how I should proceed? I'm trying to understand how they are preserved with the old jit, but I have to say that I'm a little bit lost because I haven't a global view of the code... So, any help would
2013 Nov 11
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
I have attached an initial patch that implements the ldr pseudo. It still needs some clean up and more tests, but I would like some feedback on the approach I used and if there are any objections to implementing it this way. Here is my approach: Add a finishParse() callback to the target asm parser This callback is invoked when the parse has finished successfully. It will be used to write out
2012 Oct 16
2
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Attached is an example of how to reproduce the issue. It uses a C file that happens to has a bunch of switch statements which are encoded as jump tables, giving us data-in-code. Usage: To build object files with clang via the -integrated-as versus via GCC: $ export NDK_DIR=<my_ndk_dir> $ export LLVM_DIR=<my_llvm_bin_dir> $ make To test that the generated objects contain the same
2012 Oct 16
5
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Getting closer... When emitting symbols, how do I set the symbol's value to the address of the current instruction? Do I need to emit a label in the current section and another that uses the former to point to the latter? If possible, a code sample would be very helpful. And probably questions for Tim, are these "section-relative" mapping symbols, as defined in 4.6.5.1 of the
2013 Dec 17
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...turn >>> + Entries[Num];} >>> These can be const. >>> >>> + int64_t ConstantPoolCounter; >>> This can be unsigned. >>> >>> + case AsmToken::Equal: { >>> + const MCSection *Section = >>> getParser().getStreamer().getCurrentSection().first; >>> + assert(Section); >>> We should probably check here that the mnemonic is actually 'ldr', e.g. >>> see the AsmToken::Identifier case. >>> >>> +@ RUN: clang -target arm -integrated-as -c %s -o %t1 2> %t2; echo "ok"...
2013 Nov 01
8
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
In an earlier email[1] I proposed adding support for the ldr pseud-instruction to the ARM integrated assembler. After some discussion the overall consensus seemed to be that it was worth adding. One concern was that we needed to have adequate testing. I promised to provide more details on what the behavior should be and provide some tests before starting the implementation. The FileCheck-ified