mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[mips] Do not emit R_MIPS_JALR for sym+offset in case of O32 ABI
O32 ABI uses relocations in REL format. Relocation's addend is written in place. R_MIPS_JALR relocation points to the `jalr` instruction which does not have a place to store the relocation addend. So it's impossible to save non-zero "offset". This patch blocks emission of `R_MIPS_JALR` relocations in such cases. Differential Revision: https://reviews.llvm.org/D70201
This commit is contained in:
parent
e95e1acfea
commit
09ede0e521
@ -562,6 +562,19 @@ public:
|
||||
return getSTI().getFeatureBits()[Mips::FeatureFP64Bit];
|
||||
}
|
||||
|
||||
bool isJalrRelocAvailable(const MCExpr *JalExpr) {
|
||||
if (!EmitJalrReloc)
|
||||
return false;
|
||||
MCValue Res;
|
||||
if (!JalExpr->evaluateAsRelocatable(Res, nullptr, nullptr))
|
||||
return false;
|
||||
if (Res.getSymB() != nullptr)
|
||||
return false;
|
||||
if (Res.getConstant() != 0)
|
||||
return ABI.IsN32() || ABI.IsN64();
|
||||
return true;
|
||||
}
|
||||
|
||||
const MipsABIInfo &getABI() const { return ABI; }
|
||||
bool isABI_N32() const { return ABI.IsN32(); }
|
||||
bool isABI_N64() const { return ABI.IsN64(); }
|
||||
@ -2048,7 +2061,7 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
|
||||
JalrInst.addOperand(MCOperand::createReg(Mips::RA));
|
||||
JalrInst.addOperand(MCOperand::createReg(Mips::T9));
|
||||
|
||||
if (EmitJalrReloc) {
|
||||
if (isJalrRelocAvailable(JalExpr)) {
|
||||
// As an optimization hint for the linker, before the JALR we add:
|
||||
// .reloc tmplabel, R_{MICRO}MIPS_JALR, symbol
|
||||
// tmplabel:
|
||||
|
@ -127,30 +127,30 @@ local_label:
|
||||
nop
|
||||
|
||||
# O32: lw $25, %got(local_label+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32: # fixup A - offset: 0, value: %got(local_label+8), kind: fixup_Mips_GOT
|
||||
# O32: addiu $25, $25, %lo(local_label+8) # encoding: [0x27,0x39,A,A]
|
||||
# O32: # fixup A - offset: 0, value: %lo(local_label+8), kind: fixup_Mips_LO16
|
||||
# O32-NEXT: .reloc ($tmp1), R_MIPS_JALR, local_label
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got(local_label+8), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, %lo(local_label+8) # encoding: [0x27,0x39,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %lo(local_label+8), kind: fixup_Mips_LO16
|
||||
# O32-NOT: .reloc
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_GOT16 .text
|
||||
# ELF-O32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-O32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR local_label
|
||||
# ELF-O32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# XO32: lw $25, %got(local_label+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got(local_label+8), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo(local_label+8) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo(local_label+8), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp1), R_MIPS_JALR, local_label
|
||||
# XO32-NOT: .reloc
|
||||
|
||||
# ELF-XO32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT16 .text
|
||||
# ELF-XO32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-XO32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-XO32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XO32-NEXT: R_MIPS_JALR local_label
|
||||
# ELF-XO32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32: lw $25, %got_disp(local_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-NEXT: # fixup A - offset: 0, value: %got_disp(local_label), kind: fixup_Mips_GOT_DISP
|
||||
@ -200,7 +200,7 @@ local_label:
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got(local_label+8), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, %lo(local_label+8) # encoding: [0x33,0x39,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo(local_label+8), kind: fixup_MICROMIPS_LO16
|
||||
# O32-MM-NEXT: .reloc ($tmp1), R_MICROMIPS_JALR, local_label
|
||||
# O32-MM-NOT: .reloc
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -212,7 +212,7 @@ local_label:
|
||||
# Expanding "jal weak_label":
|
||||
# O32: lw $25, %call16(weak_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_Mips_CALL16
|
||||
# O32-NEXT: .reloc ($tmp2), R_MIPS_JALR, weak_label
|
||||
# O32-NEXT: .reloc ($tmp1), R_MIPS_JALR, weak_label
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_CALL16 weak_label
|
||||
@ -224,7 +224,7 @@ local_label:
|
||||
# XO32-NEXT: addu $25, $25, $gp # encoding: [0x03,0x3c,0xc8,0x21]
|
||||
# XO32-NEXT: lw $25, %call_lo(weak_label)($25) # encoding: [0x8f,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %call_lo(weak_label), kind: fixup_Mips_CALL_LO16
|
||||
# XO32-NEXT: .reloc ($tmp2), R_MIPS_JALR, weak_label
|
||||
# XO32-NEXT: .reloc ($tmp1), R_MIPS_JALR, weak_label
|
||||
|
||||
# ELF-XO32: 3c 19 00 00 lui $25, 0
|
||||
# ELF-XO32-MEXT: R_MIPS_CALL_HI16 weak_label
|
||||
@ -284,7 +284,7 @@ local_label:
|
||||
|
||||
# O32-MM: lw $25, %call16(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM: # fixup A - offset: 0, value: %call16(weak_label), kind: fixup_MICROMIPS_CALL16
|
||||
# O32-MM-NEXT: .reloc ($tmp2), R_MICROMIPS_JALR, weak_label
|
||||
# O32-MM-NEXT: .reloc ($tmp1), R_MICROMIPS_JALR, weak_label
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -296,13 +296,13 @@ local_label:
|
||||
# O32: lw $25, %got(weak_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got(weak_label), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, 8 # encoding: [0x27,0x39,0x00,0x08]
|
||||
# O32-NEXT: .reloc ($tmp3), R_MIPS_JALR, weak_label
|
||||
# O32-NOT: .reloc
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_GOT16 weak_label
|
||||
# ELF-O32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR weak_label
|
||||
# ELF-O32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# XO32: lui $25, %got_hi(weak_label+8) # encoding: [0x3c,0x19,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got_hi(weak_label+8), kind: fixup_Mips_GOT_HI16
|
||||
@ -310,7 +310,7 @@ local_label:
|
||||
# XO32-NEXT: lw $25, %got_lo(weak_label)($25) # encoding: [0x8f,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got_lo(weak_label), kind: fixup_Mips_GOT_LO16
|
||||
# XO32-NEXT: addiu $25, $25, 8 # encoding: [0x27,0x39,0x00,0x08]
|
||||
# XO32-NEXT: .reloc ($tmp3), R_MIPS_JALR, weak_label
|
||||
# XO32-NOT: .reloc
|
||||
|
||||
# ELF-XO32: 3c 19 00 00 lui $25, 0
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT_HI16 weak_label
|
||||
@ -319,7 +319,7 @@ local_label:
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT_LO16 weak_label
|
||||
# ELF-XO32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-XO32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XO32-NEXT: R_MIPS_JALR weak_label
|
||||
# ELF-XO32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32: lw $25, %got_disp(weak_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-NEXT: # fixup A - offset: 0, value: %got_disp(weak_label), kind: fixup_Mips_GOT_DISP
|
||||
@ -380,7 +380,7 @@ local_label:
|
||||
# O32-MM: lw $25, %got(weak_label)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got(weak_label), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, 8 # encoding: [0x33,0x39,0x00,0x08]
|
||||
# O32-MM-NEXT: .reloc ($tmp3), R_MICROMIPS_JALR, weak_label
|
||||
# O32-MM-NOT: .reloc
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -392,7 +392,7 @@ local_label:
|
||||
# Expanding "jal global_label":
|
||||
# O32: lw $25, %call16(global_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_Mips_CALL16
|
||||
# O32-NEXT: .reloc ($tmp4), R_MIPS_JALR, global_label
|
||||
# O32-NEXT: .reloc ($tmp2), R_MIPS_JALR, global_label
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_CALL16 global_label
|
||||
@ -404,7 +404,7 @@ local_label:
|
||||
# XO32-NEXT: addu $25, $25, $gp # encoding: [0x03,0x3c,0xc8,0x21]
|
||||
# XO32-NEXT: lw $25, %call_lo(global_label)($25) # encoding: [0x8f,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %call_lo(global_label), kind: fixup_Mips_CALL_LO16
|
||||
# XO32-NEXT: .reloc ($tmp4), R_MIPS_JALR, global_label
|
||||
# XO32-NEXT: .reloc ($tmp2), R_MIPS_JALR, global_label
|
||||
|
||||
# ELF-XO32: 3c 19 00 00 lui $25, 0
|
||||
# ELF-XO32-NEXT: R_MIPS_CALL_HI16 global_label
|
||||
@ -464,7 +464,7 @@ local_label:
|
||||
|
||||
# O32-MM: lw $25, %call16(global_label)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %call16(global_label), kind: fixup_MICROMIPS_CALL16
|
||||
# O32-MM-NEXT: .reloc ($tmp4), R_MICROMIPS_JALR, global_label
|
||||
# O32-MM-NEXT: .reloc ($tmp2), R_MICROMIPS_JALR, global_label
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -476,13 +476,13 @@ local_label:
|
||||
# O32: lw $25, %got(global_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got(global_label), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, 8 # encoding: [0x27,0x39,0x00,0x08]
|
||||
# O32-NEXT: .reloc ($tmp5), R_MIPS_JALR, global_label
|
||||
# O32-NOT: .reloc
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_GOT16 global_label
|
||||
# ELF-O32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR global_label
|
||||
# ELF-O32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# XO32: lui $25, %got_hi(global_label+8) # encoding: [0x3c,0x19,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got_hi(global_label+8), kind: fixup_Mips_GOT_HI16
|
||||
@ -490,7 +490,7 @@ local_label:
|
||||
# XO32-NEXT: lw $25, %got_lo(global_label)($25) # encoding: [0x8f,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got_lo(global_label), kind: fixup_Mips_GOT_LO16
|
||||
# XO32-NEXT: addiu $25, $25, 8 # encoding: [0x27,0x39,0x00,0x08]
|
||||
# XO32-NEXT: .reloc ($tmp5), R_MIPS_JALR, global_label
|
||||
# XO32-NOT: .reloc
|
||||
|
||||
# ELF-XO32: 3c 19 00 00 lui $25, 0
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT_HI16 global_label
|
||||
@ -499,7 +499,7 @@ local_label:
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT_LO16 global_label
|
||||
# ELF-XO32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-XO32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XO32-NEXT: R_MIPS_JALR global_label
|
||||
# ELF-XO32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32: lw $25, %got_disp(global_label)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-NEXT: # fixup A - offset: 0, value: %got_disp(global_label), kind: fixup_Mips_GOT_DISP
|
||||
@ -560,7 +560,7 @@ local_label:
|
||||
# O32-MM: lw $25, %got(global_label)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got(global_label), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, 8 # encoding: [0x33,0x39,0x00,0x08]
|
||||
# O32-MM-NEXT: .reloc ($tmp5), R_MICROMIPS_JALR, global_label
|
||||
# O32-MM-NOT: .reloc
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -580,7 +580,7 @@ local_label:
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got(.text), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo(.text) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo(.text), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp6), R_MIPS_JALR, .text
|
||||
# XO32-NEXT: .reloc ($tmp3), R_MIPS_JALR, .text
|
||||
|
||||
# ELF-XO32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT16 .text
|
||||
@ -642,14 +642,14 @@ local_label:
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got(.text+8), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo(.text+8) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo(.text+8), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp7), R_MIPS_JALR, .text
|
||||
# XO32-NOT: .reloc
|
||||
|
||||
# ELF-XO32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT16 .text
|
||||
# ELF-XO32-NEXT: 27 39 00 08 addiu $25, $25, 8
|
||||
# ELF-XO32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-XO32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XO32-NEXT: R_MIPS_JALR .text
|
||||
# ELF-XO32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32: lw $25, %got_disp(.text)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-NEXT: # fixup A - offset: 0, value: %got_disp(.text), kind: fixup_Mips_GOT_DISP
|
||||
@ -700,11 +700,11 @@ local_label:
|
||||
nop
|
||||
|
||||
# Expanding "jal 1f":
|
||||
# O32: lw $25, %got($tmp8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got($tmp8), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, %lo($tmp8) # encoding: [0x27,0x39,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %lo($tmp8), kind: fixup_Mips_LO16
|
||||
# O32-NEXT: .reloc ($tmp9), R_MIPS_JALR, ($tmp8)
|
||||
# O32: lw $25, %got($tmp4)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got($tmp4), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, %lo($tmp4) # encoding: [0x27,0x39,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %lo($tmp4), kind: fixup_Mips_LO16
|
||||
# O32-NEXT: .reloc ($tmp5), R_MIPS_JALR, ($tmp4)
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_GOT16 .text
|
||||
@ -713,11 +713,11 @@ local_label:
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR $tmp0
|
||||
|
||||
# XO32: lw $25, %got($tmp8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got($tmp8), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo($tmp8) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo($tmp8), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp9), R_MIPS_JALR, ($tmp8)
|
||||
# XO32: lw $25, %got($tmp4)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got($tmp4), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo($tmp4) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo($tmp4), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp5), R_MIPS_JALR, ($tmp4)
|
||||
|
||||
# ELF-XO32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT16 .text
|
||||
@ -756,11 +756,11 @@ local_label:
|
||||
# ELF-XN64-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XN64-NEXT: R_MIPS_JALR/R_MIPS_NONE/R_MIPS_NONE .Ltmp0
|
||||
|
||||
# O32-MM: lw $25, %got($tmp8)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got($tmp8), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, %lo($tmp8) # encoding: [0x33,0x39,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo($tmp8), kind: fixup_MICROMIPS_LO16
|
||||
# O32-MM-NEXT: .reloc ($tmp9), R_MICROMIPS_JALR, ($tmp8)
|
||||
# O32-MM: lw $25, %got($tmp4)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got($tmp4), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, %lo($tmp4) # encoding: [0x33,0x39,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo($tmp4), kind: fixup_MICROMIPS_LO16
|
||||
# O32-MM-NEXT: .reloc ($tmp5), R_MICROMIPS_JALR, ($tmp4)
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -769,31 +769,31 @@ local_label:
|
||||
jal 1f+8
|
||||
nop
|
||||
|
||||
# O32: lw $25, %got(($tmp8)+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got(($tmp8)+8), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, %lo(($tmp8)+8) # encoding: [0x27,0x39,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %lo(($tmp8)+8), kind: fixup_Mips_LO16
|
||||
# O32-NEXT: .reloc ($tmp10), R_MIPS_JALR, ($tmp8)
|
||||
# O32: lw $25, %got(($tmp4)+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %got(($tmp4)+8), kind: fixup_Mips_GOT
|
||||
# O32-NEXT: addiu $25, $25, %lo(($tmp4)+8) # encoding: [0x27,0x39,A,A]
|
||||
# O32-NEXT: # fixup A - offset: 0, value: %lo(($tmp4)+8), kind: fixup_Mips_LO16
|
||||
# O32-NOT: .reloc
|
||||
|
||||
# ELF-O32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-O32-NEXT: R_MIPS_GOT16 .text
|
||||
# ELF-O32-NEXT: 27 39 00 c0 addiu $25, $25, 192
|
||||
# ELF-O32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR $tmp0
|
||||
# ELF-O32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# XO32: lw $25, %got(($tmp8)+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got(($tmp8)+8), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo(($tmp8)+8) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo(($tmp8)+8), kind: fixup_Mips_LO16
|
||||
# XO32-NEXT: .reloc ($tmp10), R_MIPS_JALR, ($tmp8)
|
||||
# XO32: lw $25, %got(($tmp4)+8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %got(($tmp4)+8), kind: fixup_Mips_GOT
|
||||
# XO32-NEXT: addiu $25, $25, %lo(($tmp4)+8) # encoding: [0x27,0x39,A,A]
|
||||
# XO32-NEXT: # fixup A - offset: 0, value: %lo(($tmp4)+8), kind: fixup_Mips_LO16
|
||||
# XO32-NOT: .reloc
|
||||
|
||||
# ELF-XO32: 8f 99 00 00 lw $25, 0($gp)
|
||||
# ELF-XO32-NEXT: R_MIPS_GOT16 .text
|
||||
# ELF-XO32-NEXT: 27 39 00 e0 addiu $25, $25, 224
|
||||
# ELF-XO32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-XO32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XO32-NEXT: R_MIPS_JALR $tmp0
|
||||
# ELF-XO32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32: lw $25, %got_disp(.Ltmp8)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-NEXT: # fixup A - offset: 0, value: %got_disp(.Ltmp8), kind: fixup_Mips_GOT_DISP
|
||||
@ -829,11 +829,11 @@ local_label:
|
||||
# ELF-XN64-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-XN64-NEXT: R_MIPS_JALR/R_MIPS_NONE/R_MIPS_NONE .Ltmp0
|
||||
|
||||
# O32-MM: lw $25, %got(($tmp8)+8)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got(($tmp8)+8), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, %lo(($tmp8)+8) # encoding: [0x33,0x39,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo(($tmp8)+8), kind: fixup_MICROMIPS_LO16
|
||||
# O32-MM-NEXT: .reloc ($tmp10), R_MICROMIPS_JALR, ($tmp8)
|
||||
# O32-MM: lw $25, %got(($tmp4)+8)($gp) # encoding: [0xff,0x3c,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %got(($tmp4)+8), kind: fixup_MICROMIPS_GOT16
|
||||
# O32-MM-NEXT: addiu $25, $25, %lo(($tmp4)+8) # encoding: [0x33,0x39,A,A]
|
||||
# O32-MM-NEXT: # fixup A - offset: 0, value: %lo(($tmp4)+8), kind: fixup_MICROMIPS_LO16
|
||||
# O32-MM-NOT: .reloc
|
||||
|
||||
# MIPS: jalr $25 # encoding: [0x03,0x20,0xf8,0x09]
|
||||
# MM: jalr $ra, $25 # encoding: [0x03,0xf9,0x0f,0x3c]
|
||||
@ -894,7 +894,7 @@ local_label:
|
||||
# ELF-O32-NEXT: 27 39 00 cc addiu $25, $25, 204
|
||||
# ELF-O32-NEXT: R_MIPS_LO16 .text
|
||||
# ELF-O32-NEXT: 03 20 f8 09 jalr $25
|
||||
# ELF-O32-NEXT: R_MIPS_JALR forward_local
|
||||
# ELF-O32-NEXT: 00 00 00 00 nop
|
||||
|
||||
# N32-FIXME: lw $25, %got_disp(forward_local)($gp) # encoding: [0x8f,0x99,A,A]
|
||||
# N32-FIXME: # fixup A - offset: 0, value: %got_disp(forward_local), kind: fixup_Mips_GOT_DISP
|
||||
|
Loading…
Reference in New Issue
Block a user