search for: emitgprel32value

Displaying 12 results from an estimated 12 matches for "emitgprel32value".

2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
... For MachO, that's been moved to a target hook, but for ELF that's directly in ELFObjectWriter.cpp still, including all the target specific bits. >> >> For your specific problem, I suspect what needs to happen is something like: >> >> 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and >> 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()). >> >> Regards, >> >> -Jim >> >> On Nov 15, 2011, at 9:57...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
...aren't intended to be subclassed by targets. -Jim On Nov 14, 2011, at 5:50 PM, Carter, Jack wrote: > I need to create a subclass that derives from MCELFStreamer. > > We use MCELFStreamer for direct object generation and need to override a virtual method in the base class MCStreamer::EmitGPRel32Value(). > > I have been having trouble creating the subclass due to #include issues. I can't seem to get it right at the lib/target/<my target>/MCTargetDesc level. My first thought is always that I am doing something wrong and that may still be the issue, but it is suspicious that no one...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
I need to create a subclass that derives from MCELFStreamer. We use MCELFStreamer for direct object generation and need to override a virtual method in the base class MCStreamer::EmitGPRel32Value(). I have been having trouble creating the subclass due to #include issues. I can't seem to get it right at the lib/target/<my target>/MCTargetDesc level. My first thought is always that I am doing something wrong and that may still be the issue, but it is suspicious that no one has subc...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...tWriter::RecordRelocation() hook. For MachO, that's been moved to a target hook, but for ELF that's directly in ELFObjectWriter.cpp still, including all the target specific bits. For your specific problem, I suspect what needs to happen is something like: 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()). Regards, -Jim On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote: > Well Jim, that may just be my...
2011 Nov 15
2
[LLVMdev] MCELFStreamer subclassing
...tWriter::RecordRelocation() hook. For MachO, that's been moved to a target hook, but for ELF that's directly in ELFObjectWriter.cpp still, including all the target specific bits. For your specific problem, I suspect what needs to happen is something like: 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()). Regards, -Jim On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote: > Well Jim, that may just be my...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...should add the following to MC/MCFixup.h: FK_GPRel_1, ///< A one-byte pc relative fixup. FK_GPRel_2, ///< A two-byte pc relative fixup. FK_GPRel_4, ///< A four-byte pc relative fixup. FK_GPRel_8, ///< A eight-byte pc relative fixup. In MC/MCStreamer.cpp MCStreamer::EmitGpRel32Value() Figure out how to mark it with the imprint of FK_GPRel_4 In MC/ELFObjectWriter.cpp MipsELFObjectWriter::GetRelocType() Add a switch case for FK_GPRel_4 to put out the correct target specific relocation. Is that correct? Did I miss anything? Thanks, Jack
2011 Nov 17
0
[LLVMdev] Rephrased: How to get function virtual starting address from MCSymbolRefExpr?
...s of the section , but really need to know the virtual address of the beginning of the function that contains the label whose symbol expression we have. I have a case where I the expression (MCSymbolRefExpr) is the offset from the beginning of the function. AsmPrinter::EmitJumpTableEntry() calls EmitGPRel32Value()<http://llvm.org/doxygen/classllvm_1_1MCStreamer.html#a3c0872c5c75608d870c0b6aaf0d206ed> case MachineJumpTableInfo::EK_GPRel32BlockAddress<http://llvm.org/doxygen/classllvm_1_1MachineJumpTableInfo.html#aaa21facdbb167f7c33d21907b8e5b9d3a0145ef8496d090993849ec0d7ca947f7>: { // E...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...ation() hook. For MachO, that's been moved to a target hook, but for ELF that's directly in ELFObjectWriter.cpp still, including all the target specific bits. > > For your specific problem, I suspect what needs to happen is something like: > > 1) In MCELFStreamer(), implement EmitGPRel32Value() to add an appropriate fixup, and > 2) in ELFObjectWriter.cpp, teach the Mips bits what relocation type to use for that fixup, if it doesn't know already. (MipsELFObjectWriter::GetRelocType()). > > Regards, > > -Jim > > On Nov 15, 2011, at 9:57 AM, Carter, Jack wrote: &...
2011 Nov 15
0
[LLVMdev] MCELFStreamer subclassing
...ren't intended to be subclassed by targets. -Jim On Nov 14, 2011, at 5:50 PM, Carter, Jack wrote: > I need to create a subclass that derives from MCELFStreamer. > > We use MCELFStreamer for direct object generation and need to override a virtual method in the base class MCStreamer::EmitGPRel32Value(). > > I have been having trouble creating the subclass due to #include issues. I can't seem to get it right at the lib/target/<my target>/MCTargetDesc level. My first thought is always that I am doing something wrong and that may still be the issue, but it is suspicious that no on...
2010 Jul 16
0
[LLVMdev] Win32 COFF Support - Patch 3
...ByteAlignment); > + uint64_t Size, unsigned ByteAlignment); > virtual void EmitBytes(StringRef Data, unsigned AddrSpace); > virtual void EmitValue(const MCExpr *Value, unsigned Size, > unsigned AddrSpace); > virtual void EmitGPRel32Value(const MCExpr *Value); > virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, > - unsigned ValueSize, unsigned MaxBytesToEmit); > + unsigned ValueSize, unsigned MaxBytesToEmit); > virtual void EmitCode...
2010 Jul 14
2
[LLVMdev] Win32 COFF Support - Patch 3
On Sun, Jul 11, 2010 at 6:10 PM, Chris Lattner <clattner at apple.com> wrote: > This probably needs to be slightly tweaked to work with mainline.  I don't see anything objectionable, but I think Daniel needs to review this one. Updated patch to work with mainline. http://github.com/Bigcheese/llvm-mirror/commit/d19a4c82c18afc4830c09b70f02d162292231c94 - Michael Spencer
2011 Nov 16
0
[LLVMdev] Emitting switch table data to section (previously - subclassing MCELFStreamer)
I have managed to produce correct relocation records for my jump table with the below code, but am baffled to how to emit the text addresses to the data section. I'm sure it is just a few lines of code. Any suggestions? Jack void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) { MCDataFragment *DF = getOrCreateDataFragment(); int Size = 4; // Assumption is that this is alway for 4 byte value DF->addFixup(MCFixup::Create(DF->getContents().size(), Value, FK_GPRel_4)); DF->...