diff --git a/debian/changelog b/debian/changelog index ed2616cd..82a98f05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ llvm-toolchain-7 (1:7-7~exp3) experimental; urgency=medium * Remove the dump of cmake error file (too confusing) * Try to fix the bootstrap FTBFS : - on armel by forcing the link to -latomic - + - mips-rdhwr.diff: backport D51773 to fix an + assembly issue on mips. + Thanks to jrtc27 for finding the issue -- Sylvestre Ledru Tue, 23 Oct 2018 08:21:03 +0200 diff --git a/debian/patches/mips-rdhwr.diff b/debian/patches/mips-rdhwr.diff new file mode 100644 index 00000000..8a533d7a --- /dev/null +++ b/debian/patches/mips-rdhwr.diff @@ -0,0 +1,50 @@ +Index: llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td +=================================================================== +--- llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td ++++ llvm/trunk/lib/Target/Mips/Mips64InstrInfo.td +@@ -1139,3 +1139,6 @@ + "sltu\t$rs, $rt, $imm">, GPR_64; + def : MipsInstAlias<"sltu\t$rs, $imm", (SLTUImm64 GPR64Opnd:$rs, GPR64Opnd:$rs, + imm64:$imm)>, GPR_64; ++ ++def : MipsInstAlias<"rdhwr $rt, $rs", ++ (RDHWR64 GPR64Opnd:$rt, HWRegsOpnd:$rs, 0), 1>, GPR_64; +Index: llvm/trunk/test/CodeGen/Mips/tls.ll +=================================================================== +--- llvm/trunk/test/CodeGen/Mips/tls.ll ++++ llvm/trunk/test/CodeGen/Mips/tls.ll +@@ -48,14 +48,14 @@ + ; STATIC32-LABEL: f1: + ; STATIC32: lui $[[R0:[0-9]+]], %tprel_hi(t1) + ; STATIC32: addiu $[[R1:[0-9]+]], $[[R0]], %tprel_lo(t1) +-; STATIC32: rdhwr $3, $29 ++; STATIC32: rdhwr $3, $29{{$}} + ; STATIC32: addu $[[R2:[0-9]+]], $3, $[[R1]] + ; STATIC32: lw $2, 0($[[R2]]) + + ; STATIC64-LABEL: f1: + ; STATIC64: lui $[[R0:[0-9]+]], %tprel_hi(t1) + ; STATIC64: daddiu $[[R1:[0-9]+]], $[[R0]], %tprel_lo(t1) +-; STATIC64: rdhwr $3, $29, 0 ++; STATIC64: rdhwr $3, $29{{$}} + ; STATIC64: daddu $[[R2:[0-9]+]], $3, $[[R0]] + ; STATIC64: lw $2, 0($[[R2]]) + } +@@ -101,15 +101,15 @@ + ; STATIC32-LABEL: f2: + ; STATIC32: lui $[[R0:[0-9]+]], %hi(__gnu_local_gp) + ; STATIC32: addiu $[[GP:[0-9]+]], $[[R0]], %lo(__gnu_local_gp) +-; STATIC32: rdhwr $3, $29 ++; STATIC32: rdhwr $3, $29{{$}} + ; STATIC32: lw $[[R0:[0-9]+]], %gottprel(t2)($[[GP]]) + ; STATIC32: addu $[[R1:[0-9]+]], $3, $[[R0]] + ; STATIC32: lw $2, 0($[[R1]]) + + ; STATIC64-LABEL: f2: + ; STATIC64: lui $[[R0:[0-9]+]], %hi(%neg(%gp_rel(f2))) + ; STATIC64: daddiu $[[GP:[0-9]+]], $[[R0]], %lo(%neg(%gp_rel(f2))) +-; STATIC64: rdhwr $3, $29 ++; STATIC64: rdhwr $3, $29{{$}} + ; STATIC64: ld $[[R0:[0-9]+]], %gottprel(t2)($[[GP]]) + ; STATIC64: daddu $[[R1:[0-9]+]], $3, $[[R0]] + ; STATIC64: lw $2, 0($[[R1]]) diff --git a/debian/patches/series b/debian/patches/series index 2b88101e..230de792 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -84,4 +84,4 @@ hurd-tools_llvm-shlib_CMakeLists.txt.diff clangd-atomic-cmake.patch rustc-aarch64-test-failure.diff symbolizer-path.diff - +mips-rdhwr.diff