On 17 October 2012 15:05, Greg Fitzgerald <garious at gmail.com> wrote:> + virtual void EmitMappingSymbol(bool IsData);I'd use an enum, or have multiple internal implementations... EmitDataMappingSymbol -> { nop on base class, on ARM, prints "$d" } EmitCodeMappingSymbol -> { nop on base class, calling either EmitThumbMappingSymbol or EmitARMMappingSymbol (private) on ARM }> +void MCELFStreamer::EmitMappingSymbol(bool IsData) { > + // FIXME: The following is specific to the ARM. This should be moved > + // to ARMAsmBackend.Maybe MCARMELFStreamer (or whatever sounds nicer than that). ARMAsm is a big bag of code and nowadays, most of it is format agnostic, I think (asm, elf). -- cheers, --renato http://systemcall.org/
Greg Fitzgerald
2012-Oct-17 21:23 UTC
[LLVMdev] R_ARM_ABS32 disassembly with integrated-as
Thanks Renato. I'm finishing up a patch for this and will post it to llvm-commits. But one concern, to create an ARMELFStreamer as you recommend, I had to move MCELF.h to "include/llvm/MC" and added a MCELFStreamer.h to the same directory. That okay to do? -Greg On Wed, Oct 17, 2012 at 7:22 AM, Renato Golin <rengolin at systemcall.org>wrote:> On 17 October 2012 15:05, Greg Fitzgerald <garious at gmail.com> wrote: > > + virtual void EmitMappingSymbol(bool IsData); > > I'd use an enum, or have multiple internal implementations... > > EmitDataMappingSymbol -> { nop on base class, on ARM, prints "$d" } > EmitCodeMappingSymbol -> { nop on base class, calling either > EmitThumbMappingSymbol or EmitARMMappingSymbol (private) on ARM } > > > > +void MCELFStreamer::EmitMappingSymbol(bool IsData) { > > + // FIXME: The following is specific to the ARM. This should be moved > > + // to ARMAsmBackend. > > Maybe MCARMELFStreamer (or whatever sounds nicer than that). ARMAsm is > a big bag of code and nowadays, most of it is format agnostic, I think > (asm, elf). > > > -- > cheers, > --renato > > http://systemcall.org/ >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121017/06785194/attachment.html>
On 17 October 2012 22:23, Greg Fitzgerald <garious at gmail.com> wrote:> I had to move MCELF.h to "include/llvm/MC" and added a > MCELFStreamer.h to the same directory. That okay to do?This is not a trivial question, and I'll let others chip in. Superficially, you'd think so and it might make sense in the long run, but you have to consider why it wasn't there in the first place. It may be that it didn't need to (in which case, it's ok to move), or it may be that the design of MC needed those headers to be more private (in which case it might not be ok). Certainly, Tim or Jim know better than I do. -- cheers, --renato http://systemcall.org/
Seemingly Similar Threads
- [LLVMdev] R_ARM_ABS32 disassembly with integrated-as
- [LLVMdev] R_ARM_ABS32 disassembly with integrated-as
- [LLVMdev] R_ARM_ABS32 disassembly with integrated-as
- [LLVMdev] R_ARM_ABS32 disassembly with integrated-as
- [LLVMdev] R_ARM_ABS32 disassembly with integrated-as