Author: dim
Date: Thu Mar 26 17:28:54 2020
New Revision: 359334
URL: https://svnweb.freebsd.org/changeset/base/359334
Log:
Merge commit 459e8e948 from llvm git (by Justin Hibbits):
[PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32
Summary:
The linker is free to relax this (relocation R_PPC_GOT_TPREL16)
against R_PPC_TLS, if it sees fit (initial exec to local exec). If r0
is used, this can generate execution-invalid code (converts to 'addi
%rX, %r0, FOO, which translates in PPC-lingo to li %rX, FOO). Forbid
this instead.
This fixes static binaries using locales on FreeBSD/powerpc (tested
on FreeBSD/powerpcspe).
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D76662
Requested by: jhibbits
MFC after: 6 weeks
X-MFC-With: 358851
Modified:
head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td
==============================================================================
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Thu Mar
26 17:27:41 2020 (r359333)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstr64Bit.td Thu Mar
26 17:28:54 2020 (r359334)
@@ -1110,7 +1110,7 @@ def ADDISgotTprelHA: PPCEmitTimePseudo<(outs g8rc:$rD)
(PPCaddisGotTprelHA i64:$reg,
tglobaltlsaddr:$disp))]>,
isPPC64;
-def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc:$rD), (ins s16imm64:$disp,
g8rc_nox0:$reg),
+def LDgotTprelL: PPCEmitTimePseudo<(outs g8rc_nox0:$rD), (ins s16imm64:$disp,
g8rc_nox0:$reg),
"#LDgotTprelL",
[(set i64:$rD,
(PPCldGotTprelL tglobaltlsaddr:$disp, i64:$reg))]>,
Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td
==============================================================================
--- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td Thu Mar
26 17:27:41 2020 (r359333)
+++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCInstrInfo.td Thu Mar
26 17:28:54 2020 (r359334)
@@ -3167,7 +3167,7 @@ def PPC32GOT: PPCEmitTimePseudo<(outs gprc:$rD), (ins)
def PPC32PICGOT: PPCEmitTimePseudo<(outs gprc:$rD, gprc:$rT), (ins),
"#PPC32PICGOT",
[]>, NoEncode<"$rT">;
-def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc:$rD), (ins s16imm:$disp,
gprc_nor0:$reg),
+def LDgotTprelL32: PPCEmitTimePseudo<(outs gprc_nor0:$rD), (ins s16imm:$disp,
gprc_nor0:$reg),
"#LDgotTprelL32",
[(set i32:$rD,
(PPCldGotTprelL tglobaltlsaddr:$disp,
i32:$reg))]>;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"