diff options
author | he <he@pkgsrc.org> | 2020-11-07 21:26:41 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2020-11-07 21:26:41 +0000 |
commit | fa5eda134d209be475c8a386e7f78d4f94ce7359 (patch) | |
tree | 4477d8976465d074528ed749273722f187730780 /lang/llvm | |
parent | d08bd78772fc17377e75a4b8f4fdfb891d61be8a (diff) | |
download | pkgsrc-fa5eda134d209be475c8a386e7f78d4f94ce7359.tar.gz |
Apply fix from
https://github.com/llvm/llvm-project/commit/a5d161c119d5a03c1ce834c6f4ce2576d6a064e4
so we avoid emitting a 64-bit-only instruction in 32-bit powerpc code.
Bump PKGREVISION.
Diffstat (limited to 'lang/llvm')
-rw-r--r-- | lang/llvm/Makefile | 4 | ||||
-rw-r--r-- | lang/llvm/distinfo | 4 | ||||
-rw-r--r-- | lang/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo.td | 22 |
3 files changed, 26 insertions, 4 deletions
diff --git a/lang/llvm/Makefile b/lang/llvm/Makefile index 299f2f2b915..ff2e591f8f6 100644 --- a/lang/llvm/Makefile +++ b/lang/llvm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.59 2020/11/05 09:08:33 ryoon Exp $ +# $NetBSD: Makefile,v 1.60 2020/11/07 21:26:41 he Exp $ # # when updating this, please also update: # devel/include-what-you-use @@ -25,7 +25,7 @@ DISTNAME= llvm-${LLVM_VERSION}.src PKGNAME= ${DISTNAME:S/.src//} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= lang devel MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/llvm/distinfo b/lang/llvm/distinfo index fba9212cab6..f412b6bbed2 100644 --- a/lang/llvm/distinfo +++ b/lang/llvm/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.27 2020/07/27 11:12:48 adam Exp $ +$NetBSD: distinfo,v 1.28 2020/11/07 21:26:41 he Exp $ SHA1 (llvm-10.0.1.src.tar.xz) = 25d07260f3b7bf4f647e115c4a663fdeda130fbd RMD160 (llvm-10.0.1.src.tar.xz) = 24ace1b46825972c77484a3e31401344c59cff46 @@ -7,7 +7,7 @@ Size (llvm-10.0.1.src.tar.xz) = 35270168 bytes SHA1 (patch-CMakeLists.txt) = 78e2dab2bf73f7e466ca2788fe6444e39b4ebd80 SHA1 (patch-cmake_config-ix.cmake) = 61967c51d724a76867e1c59f721d1ac0e4815023 SHA1 (patch-cmake_modules_AddLLVM.cmake) = 632861ed71b212568cfb2f05d5a486d052486db4 -SHA1 (patch-cmake_modules_CheckAtomic.cmake) = be4e6d4357ea68ca7a3ac62f7934055cea3132d0 SHA1 (patch-include_llvm-c_DataTypes.h) = 025c035e0e10871727391bd58936bd67b3e58244 SHA1 (patch-include_llvm_Analysis_ConstantFolding.h) = 56b9374da236c346565897977040255b9766cab8 +SHA1 (patch-lib_Target_PowerPC_PPCInstrInfo.td) = e238c39433ccfdb88e9bac1076d7c26c4d578882 SHA1 (patch-tools_llvm-shlib_CMakeLists.txt) = 28f417bbfa17f2e644042350da5b98c07b834968 diff --git a/lang/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo.td b/lang/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo.td new file mode 100644 index 00000000000..7b268d7e3eb --- /dev/null +++ b/lang/llvm/patches/patch-lib_Target_PowerPC_PPCInstrInfo.td @@ -0,0 +1,22 @@ +$NetBSD: patch-lib_Target_PowerPC_PPCInstrInfo.td,v 1.1 2020/11/07 21:26:41 he Exp $ + +Apply fix from +https://github.com/llvm/llvm-project/commit/a5d161c119d5a03c1ce834c6f4ce2576d6a064e4 +so we avoid emitting a 64-bit-only instruction in 32-bit ppc code. + +--- lib/Target/PowerPC/PPCInstrInfo.td.orig 2020-07-07 16:21:37.000000000 +0000 ++++ lib/Target/PowerPC/PPCInstrInfo.td +@@ -5025,8 +5025,11 @@ def RotateInsertByte1 { + dag Left = (RLWIMI RotateInsertByte3.Left, Swap4.Bits, 8, 24, 31); + } + +-def : Pat<(i32 (bitreverse i32:$A)), +- (RLDICL_32 RotateInsertByte1.Left, 0, 32)>; ++// Clear the upper half of the register when in 64-bit mode ++let Predicates = [In64BitMode] in ++def : Pat<(i32 (bitreverse i32:$A)), (RLDICL_32 RotateInsertByte1.Left, 0, 32)>; ++let Predicates = [In32BitMode] in ++def : Pat<(i32 (bitreverse i32:$A)), RotateInsertByte1.Left>; + + // Fast 64-bit reverse bits algorithm: + // Step 1: 1-bit swap (swap odd 1-bit and even 1-bit): |