freebsd-dev/contrib
Dimitry Andric f10421e96d Merge commit f46ba4f07 from llvm git (by Simon Atanasyan):
[mips] Use less registers to load address of TargetExternalSymbol

  There is no pattern matched `add hi, (MipsLo texternalsym)`. As a
  result, loading an address of 32-bit symbol requires two registers
  and one more additional instruction:
  ```
  addiu $1, $zero, %lo(foo)
  lui   $2, %hi(foo)
  addu  $25, $2, $1
  ```

  This patch adds the missed pattern and enables generation more
  effective set of instructions:
  ```
  lui   $1, %hi(foo)
  addiu $25, $1, %lo(foo)
  ```

  Differential Revision: https://reviews.llvm.org/D66771

  llvm-svn: 370196

Merge commit 59bb3609f from llvm git (by Simon Atanasyan):

  [mips] Fix 64-bit address loading in case of applying 32-bit mask to
  the result

  If result of 64-bit address loading combines with 32-bit mask, LLVM
  tries to optimize the code and remove "redundant" loading of upper
  32-bits of the address. It leads to incorrect code on MIPS64 targets.

  MIPS backend creates the following chain of commands to load 64-bit
  address in the `MipsTargetLowering::getAddrNonPICSym64` method:
  ```
  (add (shl (add (shl (add %highest(sym), %higher(sym)),
		      16),
		 %hi(sym)),
	    16),
       %lo(%sym))
  ```

  If the mask presents, LLVM decides to optimize the chain of commands.
  It really does not make sense to load upper 32-bits because the
  0x0fffffff mask anyway clears them. After removing redundant commands
  we get this chain:
  ```
  (add (shl (%hi(sym), 16), %lo(%sym))
  ```

  There is no patterns matched `(MipsHi (i64 symbol))`. Due a bug in
  `SYM_32` predicate definition, backend incorrectly selects a pattern
  for a 32-bit symbols and uses the `lui` instruction for loading
  `%hi(sym)`.

  As a result we get incorrect set of instructions with unnecessary
  16-bit left shifting:
  ```
  lui     at,0x0
      R_MIPS_HI16     foo
  dsll    at,at,0x10
  daddiu  at,at,0
      R_MIPS_LO16     foo
  ```

  This patch resolves two problems:
  - Fix `SYM_32/SYM_64` predicates to prevent selection of patterns
    dedicated to 32-bit symbols in case of using N64 ABI.
  - Add missed patterns for 64-bit symbols for `%hi/%lo`.

  Fix PR42736.

  Differential Revision: https://reviews.llvm.org/D66228

  llvm-svn: 370268

These two commits fix a miscompilation of the kernel for mips64, and
should allow clang to be used as the default compiler for mips64.

Requested by:	arichards
MFC after:	3 days
2020-01-13 20:31:10 +00:00
..
amd amd: add deprecation warning on program startup 2019-11-22 15:06:07 +00:00
apr
apr-util
atf
bearssl
binutils binutils: Fix bugs found by -Wpointer-compare 2019-10-24 22:34:48 +00:00
blacklist blacklistd.conf.5: pluralization correction 2019-11-06 17:01:35 +00:00
bmake
bsnmp bsnmpd(1): Replace dubious srandomdev+random(3) with arc4random(3) 2019-12-13 05:13:25 +00:00
byacc
bzip2 Upgrade to Bzip2 version 1.0.8. 2019-08-11 06:26:03 +00:00
capsicum-test Integrate capsicum-test into the FreeBSD test suite 2019-04-01 21:24:50 +00:00
com_err
cortex-strings
dialog
diff
dma
dtc
ee
elftoolchain Update ELF Tool Chain to upstream r3769 2019-12-05 13:20:15 +00:00
expat MFV r355071: libbsdxml (expat) 2.2.9. 2019-11-25 07:48:16 +00:00
file MFV r354798: 2019-11-18 04:22:04 +00:00
flex
gcc powerpc: Transition to Secure-PLT, like most other OSs 2019-06-25 00:40:44 +00:00
gcclibs
gdb [PPC64] Fix GDB sigtramp detection 2019-11-01 11:28:43 +00:00
gdtoa
googletest googletest: pick from upstream: Don't allow signed/unsigned wchar_t in gcc 9 and later 2019-12-21 02:44:50 +00:00
gperf
hyperv/tools
ipfilter Fix a typo (upto --> up to) and reword to improve word flow. 2019-12-02 20:39:40 +00:00
jemalloc jemalloc: pick from upstream: Fix GCC-9.1 warning with macro GET_ARG_NUMERIC 2019-12-21 02:44:38 +00:00
ldns
ldns-host
less MFV r349535: less v551. 2019-06-29 18:41:40 +00:00
libarchive MFV r356415 2020-01-06 13:21:10 +00:00
libbegemot
libc-pwcache
libc-vis
libcxxrt Include <stdint.h> in unwind-arm.h, since it uses uint32_t and uint64_t 2019-09-13 21:00:19 +00:00
libdivsufsort
libedit Fix arm and aarch64 builds of libedit after r352275 2019-09-14 21:49:42 +00:00
libevent
libexecinfo Sync up with NetBSD libexecinfo changes 2014-2019 2019-10-26 06:59:59 +00:00
libgnuregex
libpcap MFV r355890: 2019-12-21 21:05:53 +00:00
libstdc++ libstdc++: remove gets 2019-09-01 16:41:24 +00:00
libucl
libxo Import libxo-1.3.1: 2019-11-07 18:06:44 +00:00
llvm-project Merge commit f46ba4f07 from llvm git (by Simon Atanasyan): 2020-01-13 20:31:10 +00:00
lua
mandoc Update mandoc to cvs snapshot 2019-07-23 2019-07-26 10:00:33 +00:00
mknod
mtree mtree -O: Fix not descending on hash collisions 2019-09-12 20:46:46 +00:00
ncurses
netbsd-tests Re-apply fixed r354847 2019-11-20 19:43:34 +00:00
netcat Add -M option to nc(1), which makes it print the TCP connection 2019-12-14 10:53:52 +00:00
ngatm
ntp Disable ntpd stack gap. When ASLR with STACK GAP != 0 ntpd suffers SIGSEGV. 2019-11-15 16:34:35 +00:00
nvi vi.1: Fix a typo 2019-12-09 17:58:22 +00:00
ofed Add ConnectX-6 DX HCA ID to libmlx5. 2019-05-08 11:04:09 +00:00
one-true-awk Another partial revert of r301289. 2019-06-03 05:25:22 +00:00
openbsm auditd(8): fix long-standing uninitialized memory use bug 2019-11-28 00:46:03 +00:00
opencsd/decoder Remove a stale file left after merging. 2019-10-10 13:44:12 +00:00
openpam
openresolv MFV 354917, 354918, 354919 2019-11-20 23:56:20 +00:00
opie
pam_modules/pam_passwdqc
pf
pjdfstest
pnpinfo
processor-trace Update Intel Processor Trace decoder library. 2019-10-10 12:46:34 +00:00
sendmail Fix various -Wpointer-compare warnings 2019-10-08 21:14:09 +00:00
serf
smbfs mount_smbfs: Issue a warning when .nsmbrc section name contains lowercase characters. 2020-01-03 12:54:14 +00:00
sqlite3 MFV r354257: 2019-11-03 01:25:46 +00:00
subversion
tcp_wrappers Remove a duplicate global (rfc931_timeout). 2019-07-17 23:43:14 +00:00
tcpdump MFV r353143 (phillip): 2019-12-21 21:02:50 +00:00
tcsh Update tcsh to git revision 83c5be0 bringing in a number of bug fixes. 2019-10-21 21:21:34 +00:00
telnet libtelnet: Replace bogus use of srandomdev + random to generate "public key pair" 2019-12-13 05:42:57 +00:00
tnftp
traceroute The variable names in the description of the port number usage is 2019-06-20 12:38:41 +00:00
tzcode
tzdata Import tzdata 2019c 2019-09-12 00:19:16 +00:00
unbound Unbound's config.h is manually maintained, using a ./configure produced 2020-01-13 06:55:31 +00:00
unvis
vis
wpa MFV r346563: 2019-08-22 18:52:30 +00:00
xz