Displaying 8 results from an estimated 8 matches for "getnumentries".
2013 Nov 12
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...d,
Thanks for your efforts here. I have a few comments on your patch, although
I realise it's still a work in progress.
+class ConstantPool {
+ MCSymbol *Label;
+ typedef std::vector<const MCExpr*> EntryVecTy;
Use a SmallVector here?
+ MCSymbol *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);
W...
2013 Nov 16
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...ough I realise it's still a work in progress.
> >
> > +class ConstantPool {
> > + MCSymbol *Label;
> > + typedef std::vector<const MCExpr*> EntryVecTy;
> >
> > Use a SmallVector here?
> >
> > + MCSymbol *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 MCSecti...
2013 Nov 12
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...ments on your patch,
> although I realise it's still a work in progress.
>
> +class ConstantPool {
> + MCSymbol *Label;
> + typedef std::vector<const MCExpr*> EntryVecTy;
>
> Use a SmallVector here?
>
> + MCSymbol *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().getCu...
2013 Dec 17
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...tantPools.end(); CpI != CpE; ++CpI) {
+ const MCSection *Section = CpI->first;
+ ConstantPool &CP = CpI->second;
+ MCStreamer &Streamer = getParser().getStreamer();
+ Streamer.SwitchSection(Section);
+ Streamer.EmitLabel(CP.getLabel());
+ for (size_t I = 0; I < CP.getNumEntries(); ++I)
+ Streamer.EmitValue(CP.getEntry(I), 4);
+ }
+}
This is missing data-in-code indicators (see EmitDataRegion()).
+ at RUN: clang -target arm -integrated-as -c %s -o %t
+ at RUN: llvm-objdump -d %t | FileCheck %s
+ at RUN: llvm-objdump -r %t | FileCheck --check-prefix=RELOC %s
MC te...
2013 Dec 17
2
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...+CpI) {
> + const MCSection *Section = CpI->first;
> + ConstantPool &CP = CpI->second;
> + MCStreamer &Streamer = getParser().getStreamer();
> + Streamer.SwitchSection(Section);
> + Streamer.EmitLabel(CP.getLabel());
> + for (size_t I = 0; I < CP.getNumEntries(); ++I)
> + Streamer.EmitValue(CP.getEntry(I), 4);
> + }
> +}
>
> This is missing data-in-code indicators (see EmitDataRegion()).
I was not aware of that API, thanks for pointing it out. I added the calls
in the latest patch. See the ConstantPool::emitEntries() method.
>...
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
2013 Dec 17
0
[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler
...nst MCSection *Section = CpI->first;
>> + ConstantPool &CP = CpI->second;
>> + MCStreamer &Streamer = getParser().getStreamer();
>> + Streamer.SwitchSection(Section);
>> + Streamer.EmitLabel(CP.getLabel());
>> + for (size_t I = 0; I < CP.getNumEntries(); ++I)
>> + Streamer.EmitValue(CP.getEntry(I), 4);
>> + }
>> +}
>>
>> This is missing data-in-code indicators (see EmitDataRegion()).
>
> I was not aware of that API, thanks for pointing it out. I added the calls
> in the latest patch. See the Constan...
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