1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/include/llvm/MC
Jack Carter dc0ebcb076 The ELF relocation record format is different for N64
which many Mips 64 ABIs use than for O64 which many 
if not all other target ABIs use.

Most architectures have the following 64 bit relocation record format:

  typedef struct
  {
    Elf64_Addr   r_offset; /* Address of reference */
    Elf64_Xword  r_info;   /* Symbol index and type of relocation */
  } Elf64_Rel;

  typedef struct
  {
    Elf64_Addr    r_offset;
    Elf64_Xword   r_info;
    Elf64_Sxword  r_addend;
  } Elf64_Rela;

Whereas N64 has the following format:

  typedef struct
  {
    Elf64_Addr    r_offset;/* Address of reference */
    Elf64_Word  r_sym;     /* Symbol index */
    Elf64_Byte  r_ssym;    /* Special symbol */
    Elf64_Byte  r_type3;   /* Relocation type */
    Elf64_Byte  r_type2;   /* Relocation type */
    Elf64_Byte  r_type;    /* Relocation type */
  } Elf64_Rel;

  typedef struct
  {
    Elf64_Addr    r_offset;/* Address of reference */
    Elf64_Word  r_sym;     /* Symbol index */
    Elf64_Byte  r_ssym;    /* Special symbol */
    Elf64_Byte  r_type3;   /* Relocation type */
    Elf64_Byte  r_type2;   /* Relocation type */
    Elf64_Byte  r_type;    /* Relocation type */
    Elf64_Sxword  r_addend;
  } Elf64_Rela;

The structure is the same size, but the r_info data element 
is now 5 separate elements. Besides the content aspects, 
endian byte reordering will be different for the area with 
each element being endianized separately.

I treat this as generic and continue to pass r_type as 
an integer masking and unmasking the byte sized N64 
values for N64 mode. I've implemented this and it causes no 
affect on other current targets.

This passes make check.

Jack

llvm-svn: 159299
2012-06-27 22:28:30 +00:00
..
MCParser Make member variables of AsmToken private. Remove unnecessary forward declarations. Remove an unnecessary include. 2012-04-15 22:00:22 +00:00
EDInstInfo.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MachineLocation.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MCAsmBackend.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCAsmInfo.h Remove another duplicated variable. We only need one to tell us if the linker 2012-06-22 13:32:49 +00:00
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmLayout.h
MCAssembler.h Refactor data-in-code annotations. 2012-05-18 19:12:01 +00:00
MCAtom.h
MCCodeEmitter.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCCodeGenInfo.h
MCContext.h Refactor data-in-code annotations. 2012-05-18 19:12:01 +00:00
MCDirectives.h Refactor data-in-code annotations. 2012-05-18 19:12:01 +00:00
MCDisassembler.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MCDwarf.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCELFObjectWriter.h The ELF relocation record format is different for N64 2012-06-27 22:28:30 +00:00
MCELFSymbolFlags.h
MCExpr.h Implement local-exec TLS on PowerPC. 2012-06-04 17:36:38 +00:00
MCFixup.h
MCFixupKindInfo.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MCInst.h
MCInstPrinter.h Move getOpcodeName from the various target InstPrinters into the superclass MCInstPrinter. 2012-04-02 08:32:38 +00:00
MCInstrAnalysis.h
MCInstrDesc.h Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables. 2012-03-11 01:57:56 +00:00
MCInstrInfo.h Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo." 2012-03-15 18:05:57 +00:00
MCInstrItineraries.h Revert r158679 - use case is unclear (and it increases the memory footprint). 2012-06-22 20:27:13 +00:00
MCLabel.h
MCMachObjectWriter.h Refactor data-in-code annotations. 2012-05-18 19:12:01 +00:00
MCMachOSymbolFlags.h
MCModule.h
MCObjectFileInfo.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MCObjectStreamer.h
MCObjectWriter.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCRegisterInfo.h Remove the old register list functions from MCRegisterInfo. 2012-06-01 23:28:34 +00:00
MCSection.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCSectionCOFF.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCSectionELF.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCSectionMachO.h Prune some includes and forward declarations. 2012-03-26 06:58:25 +00:00
MCStreamer.h EmitZerofill should take a 64-bit size or else it's chopping off large zero-filled global. rdar://11729134 2012-06-22 20:14:46 +00:00
MCSubtargetInfo.h
MCSymbol.h
MCTargetAsmLexer.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00
MCTargetAsmParser.h
MCValue.h
MCWin64EH.h
MCWinCOFFObjectWriter.h
SectionKind.h
SubtargetFeature.h Tidy up. Trailing whitespace. 2012-05-11 01:39:13 +00:00