Date: Thu, 22 Mar 2018 21:57:10 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331377 - in user/markj/vm-playground: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolc... Message-ID: <201803222157.w2MLvA1Z038891@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Thu Mar 22 21:57:10 2018 New Revision: 331377 URL: https://svnweb.freebsd.org/changeset/base/331377 Log: Merge from user/jeff/numa Added: user/markj/vm-playground/contrib/processor-trace/ - copied from r331373, user/jeff/numa/contrib/processor-trace/ user/markj/vm-playground/lib/libc/gen/getentropy.3 - copied unchanged from r331373, user/jeff/numa/lib/libc/gen/getentropy.3 user/markj/vm-playground/lib/libc/gen/getentropy.c - copied unchanged from r331373, user/jeff/numa/lib/libc/gen/getentropy.c user/markj/vm-playground/lib/libc/sys/getrandom.2 - copied unchanged from r331373, user/jeff/numa/lib/libc/sys/getrandom.2 user/markj/vm-playground/lib/libc/tests/gen/getentropy_test.c - copied unchanged from r331373, user/jeff/numa/lib/libc/tests/gen/getentropy_test.c user/markj/vm-playground/lib/libcasper/services/cap_pwd/cap_pwd.3 - copied unchanged from r331373, user/jeff/numa/lib/libcasper/services/cap_pwd/cap_pwd.3 user/markj/vm-playground/lib/libcasper/services/cap_sysctl/cap_sysctl.3 - copied unchanged from r331373, user/jeff/numa/lib/libcasper/services/cap_sysctl/cap_sysctl.3 user/markj/vm-playground/lib/libipt/ - copied from r331373, user/jeff/numa/lib/libipt/ user/markj/vm-playground/stand/lua/hook.lua - copied unchanged from r331373, user/jeff/numa/stand/lua/hook.lua user/markj/vm-playground/sys/compat/linux/linux_errno.c - copied unchanged from r331373, user/jeff/numa/sys/compat/linux/linux_errno.c user/markj/vm-playground/sys/compat/linux/linux_errno.inc - copied unchanged from r331373, user/jeff/numa/sys/compat/linux/linux_errno.inc user/markj/vm-playground/sys/contrib/libb2/ - copied from r331373, user/jeff/numa/sys/contrib/libb2/ user/markj/vm-playground/sys/crypto/blake2/ - copied from r331373, user/jeff/numa/sys/crypto/blake2/ user/markj/vm-playground/sys/dev/tcp_log/ - copied from r331373, user/jeff/numa/sys/dev/tcp_log/ user/markj/vm-playground/sys/kern/sys_getrandom.c - copied unchanged from r331373, user/jeff/numa/sys/kern/sys_getrandom.c user/markj/vm-playground/sys/modules/blake2/ - copied from r331373, user/jeff/numa/sys/modules/blake2/ user/markj/vm-playground/sys/netinet/cc/cc_newreno.h - copied unchanged from r331373, user/jeff/numa/sys/netinet/cc/cc_newreno.h user/markj/vm-playground/sys/netinet/tcp_log_buf.c - copied unchanged from r331373, user/jeff/numa/sys/netinet/tcp_log_buf.c user/markj/vm-playground/sys/netinet/tcp_log_buf.h - copied unchanged from r331373, user/jeff/numa/sys/netinet/tcp_log_buf.h user/markj/vm-playground/tests/sys/kern/sys_getrandom.c - copied unchanged from r331373, user/jeff/numa/tests/sys/kern/sys_getrandom.c user/markj/vm-playground/tests/sys/opencrypto/blake2-kat.h - copied unchanged from r331373, user/jeff/numa/tests/sys/opencrypto/blake2-kat.h user/markj/vm-playground/tests/sys/opencrypto/blake2_test.c - copied unchanged from r331373, user/jeff/numa/tests/sys/opencrypto/blake2_test.c Deleted: user/markj/vm-playground/sys/crypto/chacha20/chacha20.c user/markj/vm-playground/sys/crypto/chacha20/chacha20.h user/markj/vm-playground/sys/modules/chacha20/ Modified: user/markj/vm-playground/Makefile.inc1 user/markj/vm-playground/ObsoleteFiles.inc user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c user/markj/vm-playground/contrib/blacklist/bin/conf.c user/markj/vm-playground/contrib/elftoolchain/nm/nm.c user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S user/markj/vm-playground/contrib/llvm/projects/libunwind/src/config.h user/markj/vm-playground/contrib/llvm/projects/libunwind/src/libunwind.cpp user/markj/vm-playground/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp user/markj/vm-playground/contrib/telnet/telnetd/telnetd.c user/markj/vm-playground/etc/mtree/BSD.include.dist user/markj/vm-playground/etc/mtree/BSD.root.dist user/markj/vm-playground/include/Makefile user/markj/vm-playground/include/unistd.h user/markj/vm-playground/lib/Makefile user/markj/vm-playground/lib/libc/gen/Makefile.inc user/markj/vm-playground/lib/libc/gen/Symbol.map user/markj/vm-playground/lib/libc/gen/arc4random.c user/markj/vm-playground/lib/libc/include/libc_private.h user/markj/vm-playground/lib/libc/sys/Makefile.inc user/markj/vm-playground/lib/libc/sys/Symbol.map user/markj/vm-playground/lib/libc/sys/mlock.2 user/markj/vm-playground/lib/libc/tests/gen/Makefile user/markj/vm-playground/lib/libcasper/libcasper/libcasper.3 user/markj/vm-playground/lib/libcasper/services/cap_dns/cap_dns.3 user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.3 user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.c user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.h user/markj/vm-playground/lib/libcasper/services/cap_pwd/Makefile user/markj/vm-playground/lib/libcasper/services/cap_sysctl/Makefile user/markj/vm-playground/lib/libjail/jail.c user/markj/vm-playground/lib/libmd/sha512.3 user/markj/vm-playground/lib/libsysdecode/errno.c user/markj/vm-playground/lib/libthr/thread/thr_cancel.c user/markj/vm-playground/lib/libzstd/Makefile user/markj/vm-playground/libexec/tftpd/tests/functional.c user/markj/vm-playground/release/arm64/RPI3.conf user/markj/vm-playground/release/tools/gce.conf user/markj/vm-playground/sbin/ifconfig/ifieee80211.c user/markj/vm-playground/sbin/ipfw/ipfw.8 user/markj/vm-playground/sbin/savecore/savecore.8 user/markj/vm-playground/share/man/man4/altq.4 user/markj/vm-playground/share/man/man4/audit.4 user/markj/vm-playground/share/man/man4/cc_newreno.4 user/markj/vm-playground/share/man/man4/mod_cc.4 user/markj/vm-playground/share/man/man7/development.7 user/markj/vm-playground/share/man/man9/altq.9 user/markj/vm-playground/share/man/man9/cnv.9 user/markj/vm-playground/share/man/man9/owll.9 user/markj/vm-playground/share/man/man9/rwlock.9 user/markj/vm-playground/share/man/man9/style.9 user/markj/vm-playground/share/man/man9/zone.9 user/markj/vm-playground/share/misc/bsd-family-tree user/markj/vm-playground/share/misc/committers-ports.dot user/markj/vm-playground/share/mk/bsd.libnames.mk user/markj/vm-playground/share/mk/src.libnames.mk user/markj/vm-playground/share/mk/src.opts.mk user/markj/vm-playground/stand/common/bootstrap.h user/markj/vm-playground/stand/defaults/loader.conf user/markj/vm-playground/stand/defaults/loader.conf.5 user/markj/vm-playground/stand/defs.mk user/markj/vm-playground/stand/efi/boot1/boot1.c user/markj/vm-playground/stand/efi/loader/framebuffer.c user/markj/vm-playground/stand/forth/Makefile user/markj/vm-playground/stand/forth/efi.4th user/markj/vm-playground/stand/forth/loader.rc user/markj/vm-playground/stand/i386/loader/loader.rc user/markj/vm-playground/stand/lua/Makefile user/markj/vm-playground/stand/lua/color.lua user/markj/vm-playground/stand/lua/config.lua user/markj/vm-playground/stand/lua/core.lua user/markj/vm-playground/stand/lua/core.lua.8 user/markj/vm-playground/stand/lua/drawer.lua user/markj/vm-playground/stand/lua/loader.lua user/markj/vm-playground/stand/lua/menu.lua user/markj/vm-playground/stand/lua/screen.lua user/markj/vm-playground/sys/amd64/acpica/acpi_wakecode.S user/markj/vm-playground/sys/amd64/amd64/apic_vector.S user/markj/vm-playground/sys/amd64/amd64/atpic_vector.S user/markj/vm-playground/sys/amd64/amd64/cpu_switch.S user/markj/vm-playground/sys/amd64/amd64/db_interface.c user/markj/vm-playground/sys/amd64/amd64/exception.S user/markj/vm-playground/sys/amd64/amd64/fpu.c user/markj/vm-playground/sys/amd64/amd64/gdb_machdep.c user/markj/vm-playground/sys/amd64/amd64/locore.S user/markj/vm-playground/sys/amd64/amd64/mpboot.S user/markj/vm-playground/sys/amd64/amd64/sigtramp.S user/markj/vm-playground/sys/amd64/amd64/support.S user/markj/vm-playground/sys/amd64/amd64/xen-locore.S user/markj/vm-playground/sys/amd64/ia32/ia32_exception.S user/markj/vm-playground/sys/amd64/linux/linux_support.s user/markj/vm-playground/sys/amd64/linux/linux_sysvec.c user/markj/vm-playground/sys/amd64/linux32/linux.h user/markj/vm-playground/sys/amd64/linux32/linux32_support.s user/markj/vm-playground/sys/amd64/linux32/linux32_sysvec.c user/markj/vm-playground/sys/amd64/sgx/sgx_support.S user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_clkmsr.c user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_mp.c user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c user/markj/vm-playground/sys/arm/annapurna/alpine/alpine_machdep.c user/markj/vm-playground/sys/arm/arm/bcopy_page.S user/markj/vm-playground/sys/arm/arm/bcopyinout.S user/markj/vm-playground/sys/arm/arm/copystr.S user/markj/vm-playground/sys/arm/arm/cpu_asm-v6.S user/markj/vm-playground/sys/arm/arm/exception.S user/markj/vm-playground/sys/arm/arm/fusu.S user/markj/vm-playground/sys/arm/arm/hypervisor-stub.S user/markj/vm-playground/sys/arm/arm/in_cksum_arm.S user/markj/vm-playground/sys/arm/arm/locore-v4.S user/markj/vm-playground/sys/arm/arm/locore-v6.S user/markj/vm-playground/sys/arm/arm/pmap-v4.c user/markj/vm-playground/sys/arm/arm/support.S user/markj/vm-playground/sys/arm/arm/swtch-v4.S user/markj/vm-playground/sys/arm/arm/swtch-v6.S user/markj/vm-playground/sys/arm/arm/swtch.S user/markj/vm-playground/sys/arm/at91/at91_rst.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_fb.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_fbd.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_machdep.c user/markj/vm-playground/sys/arm/freescale/fsl_ocotp.c user/markj/vm-playground/sys/arm/freescale/vybrid/vf_machdep.c user/markj/vm-playground/sys/arm/mv/mv_common.c user/markj/vm-playground/sys/arm/samsung/exynos/chrome_ec.c user/markj/vm-playground/sys/arm/samsung/exynos/exynos5_ehci.c user/markj/vm-playground/sys/arm/ti/am335x/am335x_lcd.c user/markj/vm-playground/sys/arm/ti/am335x/am335x_lcd_syscons.c user/markj/vm-playground/sys/arm64/arm64/bzero.S user/markj/vm-playground/sys/arm64/arm64/copyinout.S user/markj/vm-playground/sys/arm64/arm64/exception.S user/markj/vm-playground/sys/arm64/arm64/locore.S user/markj/vm-playground/sys/arm64/arm64/support.S user/markj/vm-playground/sys/arm64/arm64/swtch.S user/markj/vm-playground/sys/cam/nvme/nvme_da.c user/markj/vm-playground/sys/cam/scsi/scsi_all.h user/markj/vm-playground/sys/cam/scsi/scsi_ch.c user/markj/vm-playground/sys/cam/scsi/scsi_da.c user/markj/vm-playground/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/markj/vm-playground/sys/cddl/dev/dtrace/aarch64/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/amd64/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/arm/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/i386/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/riscv/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/fbt/x86/fbt_isa.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_syscall.h user/markj/vm-playground/sys/compat/freebsd32/freebsd32_syscalls.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_sysent.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_systrace_args.c user/markj/vm-playground/sys/compat/freebsd32/syscalls.master user/markj/vm-playground/sys/compat/linux/linux_emul.h user/markj/vm-playground/sys/compat/linuxkpi/common/include/linux/pci.h user/markj/vm-playground/sys/conf/files user/markj/vm-playground/sys/conf/files.amd64 user/markj/vm-playground/sys/conf/files.i386 user/markj/vm-playground/sys/conf/kern.opts.mk user/markj/vm-playground/sys/conf/kern.post.mk user/markj/vm-playground/sys/conf/kmod.mk user/markj/vm-playground/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c user/markj/vm-playground/sys/dev/cardbus/cardbus.c user/markj/vm-playground/sys/dev/cxgbe/common/t4_hw.c user/markj/vm-playground/sys/dev/cxgbe/t4_main.c user/markj/vm-playground/sys/dev/drm/drm_bufs.c user/markj/vm-playground/sys/dev/drm/drm_irq.c user/markj/vm-playground/sys/dev/e1000/em_txrx.c user/markj/vm-playground/sys/dev/e1000/if_em.c user/markj/vm-playground/sys/dev/e1000/if_em.h user/markj/vm-playground/sys/dev/efidev/efidev.c user/markj/vm-playground/sys/dev/efidev/efirt.c (contents, props changed) user/markj/vm-playground/sys/dev/efidev/efirtc.c user/markj/vm-playground/sys/dev/fdt/fdt_common.c user/markj/vm-playground/sys/dev/flash/mx25l.c user/markj/vm-playground/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S user/markj/vm-playground/sys/dev/hyperv/vmbus/i386/vmbus_vector.S user/markj/vm-playground/sys/dev/ixgbe/if_ix.c user/markj/vm-playground/sys/dev/ixgbe/if_ixv.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_82598.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_82599.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_api.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_common.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_common.h user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb_82598.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb_82599.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_phy.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_type.h user/markj/vm-playground/sys/dev/ixgbe/ixgbe_vf.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_x540.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_x550.c user/markj/vm-playground/sys/dev/jedec_dimm/jedec_dimm.c user/markj/vm-playground/sys/dev/md/md.c user/markj/vm-playground/sys/dev/mpr/mpi/mpi2.h user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_cnfg.h user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_history.txt user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_ioc.h user/markj/vm-playground/sys/dev/mpr/mpr_ioctl.h user/markj/vm-playground/sys/dev/mpr/mpr_sas.c user/markj/vm-playground/sys/dev/mpr/mpr_sas_lsi.c user/markj/vm-playground/sys/dev/mpr/mpr_user.c user/markj/vm-playground/sys/dev/mpr/mprvar.h user/markj/vm-playground/sys/dev/nvme/nvme.h user/markj/vm-playground/sys/dev/nvme/nvme_private.h user/markj/vm-playground/sys/dev/nvme/nvme_qpair.c user/markj/vm-playground/sys/dev/ofw/ofw_subr.c user/markj/vm-playground/sys/dev/ofw/openfirmio.c user/markj/vm-playground/sys/dev/ow/owc_gpiobus.c user/markj/vm-playground/sys/dev/pccard/pccard.c user/markj/vm-playground/sys/dev/pccbb/pccbb.c user/markj/vm-playground/sys/dev/random/randomdev.c user/markj/vm-playground/sys/dev/rtwn/if_rtwn_ridx.h user/markj/vm-playground/sys/dev/rtwn/rtl8188e/r88e_rx.c user/markj/vm-playground/sys/dev/rtwn/rtl8192c/r92c_rx.c user/markj/vm-playground/sys/dev/rtwn/rtl8812a/r12a_rx.c user/markj/vm-playground/sys/dev/usb/controller/musb_otg.c user/markj/vm-playground/sys/dev/usb/controller/musb_otg.h user/markj/vm-playground/sys/dev/usb/wlan/if_urtw.c user/markj/vm-playground/sys/dev/usb/wlan/if_zyd.c user/markj/vm-playground/sys/dev/vnic/thunder_bgx_fdt.c user/markj/vm-playground/sys/dts/Makefile user/markj/vm-playground/sys/geom/label/g_label.c user/markj/vm-playground/sys/i386/acpica/acpi_wakecode.S user/markj/vm-playground/sys/i386/i386/apic_vector.s user/markj/vm-playground/sys/i386/i386/atpic_vector.s user/markj/vm-playground/sys/i386/i386/bioscall.s user/markj/vm-playground/sys/i386/i386/exception.s user/markj/vm-playground/sys/i386/i386/locore.s user/markj/vm-playground/sys/i386/i386/mpboot.s user/markj/vm-playground/sys/i386/i386/sigtramp.s user/markj/vm-playground/sys/i386/i386/support.s user/markj/vm-playground/sys/i386/i386/swtch.s user/markj/vm-playground/sys/i386/i386/vm86.c user/markj/vm-playground/sys/i386/i386/vm86bios.s user/markj/vm-playground/sys/i386/ibcs2/ibcs2_ipc.c user/markj/vm-playground/sys/i386/ibcs2/ibcs2_misc.c user/markj/vm-playground/sys/i386/linux/linux.h user/markj/vm-playground/sys/i386/linux/linux_locore.s user/markj/vm-playground/sys/i386/linux/linux_support.s user/markj/vm-playground/sys/i386/linux/linux_sysvec.c user/markj/vm-playground/sys/kern/init_main.c user/markj/vm-playground/sys/kern/init_sysent.c user/markj/vm-playground/sys/kern/kern_cpuset.c user/markj/vm-playground/sys/kern/kern_jail.c user/markj/vm-playground/sys/kern/kern_lock.c user/markj/vm-playground/sys/kern/kern_mutex.c user/markj/vm-playground/sys/kern/kern_rwlock.c user/markj/vm-playground/sys/kern/kern_sendfile.c user/markj/vm-playground/sys/kern/kern_shutdown.c user/markj/vm-playground/sys/kern/kern_sx.c user/markj/vm-playground/sys/kern/subr_eventhandler.c user/markj/vm-playground/sys/kern/subr_witness.c user/markj/vm-playground/sys/kern/syscalls.c user/markj/vm-playground/sys/kern/syscalls.master user/markj/vm-playground/sys/kern/systrace_args.c user/markj/vm-playground/sys/kern/vfs_bio.c user/markj/vm-playground/sys/kern/vfs_mountroot.c user/markj/vm-playground/sys/mips/cavium/octeon_cop2.S user/markj/vm-playground/sys/mips/ingenic/jz4780_mpboot.S user/markj/vm-playground/sys/mips/mips/exception.S user/markj/vm-playground/sys/mips/mips/fp.S user/markj/vm-playground/sys/mips/mips/locore.S user/markj/vm-playground/sys/mips/mips/mpboot.S user/markj/vm-playground/sys/mips/mips/octeon_cop2_swtch.S user/markj/vm-playground/sys/mips/mips/support.S user/markj/vm-playground/sys/mips/mips/swtch.S user/markj/vm-playground/sys/mips/nlm/mpreset.S user/markj/vm-playground/sys/modules/Makefile user/markj/vm-playground/sys/modules/crypto/Makefile user/markj/vm-playground/sys/modules/dtrace/dtrace/Makefile user/markj/vm-playground/sys/modules/hyperv/vmbus/Makefile user/markj/vm-playground/sys/modules/imx/imx_spi/Makefile user/markj/vm-playground/sys/modules/iser/Makefile user/markj/vm-playground/sys/modules/linux/Makefile user/markj/vm-playground/sys/modules/linux64/Makefile user/markj/vm-playground/sys/modules/linux_common/Makefile user/markj/vm-playground/sys/modules/netgraph/checksum/Makefile user/markj/vm-playground/sys/modules/netmap/Makefile user/markj/vm-playground/sys/modules/sgx/Makefile user/markj/vm-playground/sys/net/bpf.c user/markj/vm-playground/sys/net/bpfdesc.h user/markj/vm-playground/sys/net/if_ethersubr.c user/markj/vm-playground/sys/net/if_llatbl.h user/markj/vm-playground/sys/net/if_media.h user/markj/vm-playground/sys/netinet/cc/cc.c user/markj/vm-playground/sys/netinet/cc/cc.h user/markj/vm-playground/sys/netinet/cc/cc_newreno.c user/markj/vm-playground/sys/netinet/if_ether.c user/markj/vm-playground/sys/netinet/in.c user/markj/vm-playground/sys/netinet/in_pcb.c user/markj/vm-playground/sys/netinet/tcp.h user/markj/vm-playground/sys/netinet/tcp_input.c user/markj/vm-playground/sys/netinet/tcp_output.c user/markj/vm-playground/sys/netinet/tcp_subr.c user/markj/vm-playground/sys/netinet/tcp_syncache.c user/markj/vm-playground/sys/netinet/tcp_timer.c user/markj/vm-playground/sys/netinet/tcp_timewait.c user/markj/vm-playground/sys/netinet/tcp_usrreq.c user/markj/vm-playground/sys/netinet/tcp_var.h user/markj/vm-playground/sys/netinet6/in6.c user/markj/vm-playground/sys/netinet6/in6_pcb.c user/markj/vm-playground/sys/netipsec/xform.h user/markj/vm-playground/sys/netipsec/xform_ah.c user/markj/vm-playground/sys/netipsec/xform_esp.c user/markj/vm-playground/sys/netipsec/xform_ipcomp.c user/markj/vm-playground/sys/netpfil/pf/pf_table.c user/markj/vm-playground/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c user/markj/vm-playground/sys/opencrypto/cryptodev.c user/markj/vm-playground/sys/opencrypto/cryptodev.h user/markj/vm-playground/sys/opencrypto/cryptosoft.c user/markj/vm-playground/sys/opencrypto/xform_auth.h user/markj/vm-playground/sys/powerpc/aim/locore32.S user/markj/vm-playground/sys/powerpc/aim/locore64.S user/markj/vm-playground/sys/powerpc/booke/locore.S user/markj/vm-playground/sys/powerpc/booke/pmap.c user/markj/vm-playground/sys/powerpc/cpufreq/mpc85xx_jog.c user/markj/vm-playground/sys/powerpc/powerpc/cpu_subr64.S user/markj/vm-playground/sys/powerpc/powerpc/sigcode32.S user/markj/vm-playground/sys/powerpc/powerpc/sigcode64.S user/markj/vm-playground/sys/powerpc/powerpc/swtch32.S user/markj/vm-playground/sys/powerpc/powerpc/swtch64.S user/markj/vm-playground/sys/powerpc/pseries/platform_chrp.c user/markj/vm-playground/sys/riscv/riscv/copyinout.S user/markj/vm-playground/sys/riscv/riscv/exception.S user/markj/vm-playground/sys/riscv/riscv/locore.S user/markj/vm-playground/sys/riscv/riscv/support.S user/markj/vm-playground/sys/riscv/riscv/swtch.S user/markj/vm-playground/sys/security/audit/audit_bsm_klib.c user/markj/vm-playground/sys/sparc64/pci/psycho.c user/markj/vm-playground/sys/sparc64/sbus/sbus.c user/markj/vm-playground/sys/sparc64/sparc64/exception.S user/markj/vm-playground/sys/sparc64/sparc64/interrupt.S user/markj/vm-playground/sys/sparc64/sparc64/locore.S user/markj/vm-playground/sys/sparc64/sparc64/mp_exception.S user/markj/vm-playground/sys/sparc64/sparc64/mp_locore.S user/markj/vm-playground/sys/sparc64/sparc64/support.S user/markj/vm-playground/sys/sparc64/sparc64/swtch.S user/markj/vm-playground/sys/sys/_stdarg.h user/markj/vm-playground/sys/sys/cdefs.h user/markj/vm-playground/sys/sys/ioccom.h user/markj/vm-playground/sys/sys/kernel.h user/markj/vm-playground/sys/sys/ktr_class.h user/markj/vm-playground/sys/sys/linker_set.h user/markj/vm-playground/sys/sys/lock.h user/markj/vm-playground/sys/sys/random.h user/markj/vm-playground/sys/sys/smp.h user/markj/vm-playground/sys/sys/syscall.h user/markj/vm-playground/sys/sys/syscall.mk user/markj/vm-playground/sys/sys/sysproto.h user/markj/vm-playground/sys/vm/uma.h user/markj/vm-playground/sys/vm/vm.h user/markj/vm-playground/sys/vm/vm_fault.c user/markj/vm-playground/sys/vm/vm_page.c user/markj/vm-playground/sys/vm/vm_pageout.h user/markj/vm-playground/sys/vm/vm_phys.c user/markj/vm-playground/sys/vm/vm_phys.h user/markj/vm-playground/sys/vm/vm_reserv.c user/markj/vm-playground/sys/vm/vm_reserv.h user/markj/vm-playground/sys/x86/include/ucontext.h user/markj/vm-playground/sys/x86/include/x86_var.h user/markj/vm-playground/sys/x86/isa/isa_dma.c user/markj/vm-playground/sys/x86/x86/autoconf.c user/markj/vm-playground/sys/x86/x86/cpu_machdep.c user/markj/vm-playground/sys/x86/x86/intr_machdep.c user/markj/vm-playground/tests/sys/aio/aio_kqueue_test.c user/markj/vm-playground/tests/sys/aio/aio_test.c user/markj/vm-playground/tests/sys/kern/Makefile user/markj/vm-playground/tests/sys/opencrypto/Makefile user/markj/vm-playground/usr.bin/calendar/calendars/calendar.freebsd user/markj/vm-playground/usr.bin/netstat/inet.c user/markj/vm-playground/usr.bin/netstat/main.c user/markj/vm-playground/usr.bin/netstat/netstat.1 user/markj/vm-playground/usr.bin/netstat/netstat.h user/markj/vm-playground/usr.bin/truss/syscalls.c user/markj/vm-playground/usr.sbin/efibootmgr/efibootmgr.c user/markj/vm-playground/usr.sbin/rpcbind/rpcbind.c user/markj/vm-playground/usr.sbin/syslogd/syslogd.c Directory Properties: user/markj/vm-playground/ (props changed) user/markj/vm-playground/cddl/ (props changed) user/markj/vm-playground/cddl/contrib/opensolaris/ (props changed) user/markj/vm-playground/contrib/blacklist/ (props changed) user/markj/vm-playground/contrib/elftoolchain/ (props changed) user/markj/vm-playground/contrib/llvm/ (props changed) user/markj/vm-playground/contrib/llvm/projects/libunwind/ (props changed) user/markj/vm-playground/contrib/llvm/tools/clang/ (props changed) user/markj/vm-playground/sys/cddl/contrib/opensolaris/ (props changed) user/markj/vm-playground/sys/contrib/zstd/ (props changed) Modified: user/markj/vm-playground/Makefile.inc1 ============================================================================== --- user/markj/vm-playground/Makefile.inc1 Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/Makefile.inc1 Thu Mar 22 21:57:10 2018 (r331377) @@ -1394,6 +1394,14 @@ INSTALLKERNEL= ${_kernel} .endif .endfor +_cleankernobj_fast_depend_hack: .PHONY +# 20180320 remove stale generated assym.s after renaming to .inc in r331254 +.if exists(${OBJTOP}/sys/${KERNCONF}/assym.s) + @echo Removing stale generated assym files + @rm -f ${OBJTOP}/sys/${KERNCONF}/assym.* \ + ${OBJTOP}/sys/${KERNCONF}/.depend.assym.* +.endif + ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # @@ -1429,6 +1437,8 @@ buildkernel: .MAKE .PHONY @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} +.else + ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack .endif .if !defined(NO_KERNELOBJ) @echo Modified: user/markj/vm-playground/ObsoleteFiles.inc ============================================================================== --- user/markj/vm-playground/ObsoleteFiles.inc Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/ObsoleteFiles.inc Thu Mar 22 21:57:10 2018 (r331377) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays +OLD_DIRS+=boot/overlays +# 20180311: remove sys/sys/i386/include/pcaudioio.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pcaudioio.h +.endif +# 20180310: remove sys/sys/dataacq.h +OLD_FILES+=usr/include/sys/dataacq.h # 20180306: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill @@ -51,7 +59,6 @@ OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz # 20180206: remove gdbtui OLD_FILES+=usr/bin/gdbtui # 20180201: Obsolete forth files -OLD_FILES+=boot/efi.4th OLD_FILES+=boot/pcibios.4th # 20180114: new clang import which bumps version from 5.0.1 to 6.0.0. OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h Modified: user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 21:57:10 2018 (r331377) @@ -35,7 +35,7 @@ int main(int argc, char **argv) { for (;;) { - (void) syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); } return (0); Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 21:57:10 2018 (r331377) @@ -22,6 +22,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017-2018 Mark Johnston <markj@FreeBSD.org> */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 21:57:10 2018 (r331377) @@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags) "cannot take address of bit-field\n"); } - dtt.dtt_object = NULL; - dtt.dtt_ctfp = cp->dn_ctfp; - dtt.dtt_type = cp->dn_type; + dtt = (dtrace_typeinfo_t){ + .dtt_ctfp = cp->dn_ctfp, + .dtt_type = cp->dn_type, + }; if (dt_type_pointer(&dtt) == -1) { xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n", Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 21:57:10 2018 (r331377) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); } Modified: user/markj/vm-playground/contrib/blacklist/bin/conf.c ============================================================================== --- user/markj/vm-playground/contrib/blacklist/bin/conf.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/blacklist/bin/conf.c Thu Mar 22 21:57:10 2018 (r331377) @@ -1119,6 +1119,7 @@ conf_parse(const char *f) confset_free(&lc); confset_free(&rc); fclose(fp); + free(line); return; } } Modified: user/markj/vm-playground/contrib/elftoolchain/nm/nm.c ============================================================================== --- user/markj/vm-playground/contrib/elftoolchain/nm/nm.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/elftoolchain/nm/nm.c Thu Mar 22 21:57:10 2018 (r331377) @@ -1310,14 +1310,17 @@ read_elf(Elf *elf, const char *filename, Elf_Kind kind line_info = malloc(sizeof(struct line_info_head)); func_info = malloc(sizeof(struct func_info_head)); var_info = malloc(sizeof(struct var_info_head)); + if (line_info != NULL) + SLIST_INIT(line_info); + if (func_info != NULL) + SLIST_INIT(func_info); + if (var_info != NULL) + SLIST_INIT(var_info); if (line_info == NULL || func_info == NULL || var_info == NULL) { warn("malloc"); (void) dwarf_finish(dbg, &de); goto process_sym; } - SLIST_INIT(line_info); - SLIST_INIT(func_info); - SLIST_INIT(var_info); while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, &de)) == DW_DLV_OK) { Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 21:57:10 2018 (r331377) @@ -206,6 +206,8 @@ class MCAssembler { (private) handleFixup(const MCAsmLayout &Layout, MCFragment &F, const MCFixup &Fixup); public: + std::vector<std::pair<StringRef, const MCSymbol *>> Symvers; + /// Construct a new assembler instance. // // FIXME: How are we going to parameterize this? Two obvious options are stay Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -51,6 +51,8 @@ class MCELFStreamer : public MCObjectStreamer { (publi unsigned ByteAlignment) override; void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -519,9 +519,10 @@ class MCStreamer { (public) /// /// This corresponds to an assembler statement such as: /// .symver _start, foo@@SOME_VERSION - /// \param Alias - The versioned alias (i.e. "foo@@SOME_VERSION") + /// \param AliasName - The versioned alias (i.e. "foo@@SOME_VERSION") /// \param Aliasee - The aliased symbol (i.e. "_start") - virtual void emitELFSymverDirective(MCSymbol *Alias, const MCSymbol *Aliasee); + virtual void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee); /// \brief Emit a Linker Optimization Hint (LOH) directive. /// \param Args - Arguments of the LOH. Modified: user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -3697,7 +3697,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Va if (Ops.size() == 2) { // getelementptr P, 0 -> P. - if (match(Ops[1], m_Zero())) + if (match(Ops[1], m_Zero()) && Ops[0]->getType() == GEPTy) return Ops[0]; Type *Ty = SrcTy; @@ -3706,7 +3706,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef<Va uint64_t C; uint64_t TyAllocSize = Q.DL.getTypeAllocSize(Ty); // getelementptr P, N -> P if P points to a type of zero size. - if (TyAllocSize == 0) + if (TyAllocSize == 0 && Ops[0]->getType() == GEPTy) return Ops[0]; // The following transforms are only safe if the ptrtoint cast Modified: user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -2018,8 +2018,16 @@ static bool isInBoundsIndices(ArrayRef<IndexTy> Idxs) // If the first index is one and all the rest are zero, it's in bounds, // by the one-past-the-end rule. - if (!cast<ConstantInt>(Idxs[0])->isOne()) - return false; + if (auto *CI = dyn_cast<ConstantInt>(Idxs[0])) { + if (!CI->isOne()) + return false; + } else { + auto *CV = cast<ConstantDataVector>(Idxs[0]); + CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()); + if (!CI || !CI->isOne()) + return false; + } + for (unsigned i = 1, e = Idxs.size(); i != e; ++i) if (!cast<Constant>(Idxs[i])->isNullValue()) return false; @@ -2049,15 +2057,18 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe ArrayRef<Value *> Idxs) { if (Idxs.empty()) return C; - if (isa<UndefValue>(C)) { - Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value * const *)Idxs.data(), Idxs.size())); + Type *GEPTy = GetElementPtrInst::getGEPReturnType( + C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + + if (isa<UndefValue>(C)) return UndefValue::get(GEPTy); - } Constant *Idx0 = cast<Constant>(Idxs[0]); if (Idxs.size() == 1 && (Idx0->isNullValue() || isa<UndefValue>(Idx0))) - return C; + return GEPTy->isVectorTy() && !C->getType()->isVectorTy() + ? ConstantVector::getSplat( + cast<VectorType>(GEPTy)->getNumElements(), C) + : C; if (C->isNullValue()) { bool isNull = true; Modified: user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -128,8 +128,6 @@ class ELFObjectWriter : public MCObjectWriter { /// @name Symbol Table Data /// @{ - BumpPtrAllocator Alloc; - StringSaver VersionSymSaver{Alloc}; StringTableBuilder StrTabBuilder{StringTableBuilder::ELF}; /// @} @@ -391,27 +389,29 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem const MCAsmLayout &Layout) { // The presence of symbol versions causes undefined symbols and // versions declared with @@@ to be renamed. - for (const MCSymbol &A : Asm.symbols()) { - const auto &Alias = cast<MCSymbolELF>(A); - // Not an alias. - if (!Alias.isVariable()) - continue; - auto *Ref = dyn_cast<MCSymbolRefExpr>(Alias.getVariableValue()); - if (!Ref) - continue; - const auto &Symbol = cast<MCSymbolELF>(Ref->getSymbol()); - - StringRef AliasName = Alias.getName(); + for (const std::pair<StringRef, const MCSymbol *> &P : Asm.Symvers) { + StringRef AliasName = P.first; + const auto &Symbol = cast<MCSymbolELF>(*P.second); size_t Pos = AliasName.find('@'); - if (Pos == StringRef::npos) - continue; + assert(Pos != StringRef::npos); + StringRef Prefix = AliasName.substr(0, Pos); + StringRef Rest = AliasName.substr(Pos); + StringRef Tail = Rest; + if (Rest.startswith("@@@")) + Tail = Rest.substr(Symbol.isUndefined() ? 2 : 1); + + auto *Alias = + cast<MCSymbolELF>(Asm.getContext().getOrCreateSymbol(Prefix + Tail)); + Asm.registerSymbol(*Alias); + const MCExpr *Value = MCSymbolRefExpr::create(&Symbol, Asm.getContext()); + Alias->setVariableValue(Value); + // Aliases defined with .symvar copy the binding from the symbol they alias. // This is the first place we are able to copy this information. - Alias.setExternal(Symbol.isExternal()); - Alias.setBinding(Symbol.getBinding()); + Alias->setExternal(Symbol.isExternal()); + Alias->setBinding(Symbol.getBinding()); - StringRef Rest = AliasName.substr(Pos); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; @@ -420,7 +420,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem !Rest.startswith("@@@")) report_fatal_error("A @@ version cannot be undefined"); - Renames.insert(std::make_pair(&Symbol, &Alias)); + Renames.insert(std::make_pair(&Symbol, Alias)); } } @@ -836,44 +836,7 @@ void ELFObjectWriter::computeSymbolTable( HasLargeSectionIndex = true; } - // The @@@ in symbol version is replaced with @ in undefined symbols and @@ - // in defined ones. - // - // FIXME: All name handling should be done before we get to the writer, - // including dealing with GNU-style version suffixes. Fixing this isn't - // trivial. - // - // We thus have to be careful to not perform the symbol version replacement - // blindly: - // - // The ELF format is used on Windows by the MCJIT engine. Thus, on - // Windows, the ELFObjectWriter can encounter symbols mangled using the MS - // Visual Studio C++ name mangling scheme. Symbols mangled using the MSVC - // C++ name mangling can legally have "@@@" as a sub-string. In that case, - // the EFLObjectWriter should not interpret the "@@@" sub-string as - // specifying GNU-style symbol versioning. The ELFObjectWriter therefore - // checks for the MSVC C++ name mangling prefix which is either "?", "@?", - // "__imp_?" or "__imp_@?". - // - // It would have been interesting to perform the MS mangling prefix check - // only when the target triple is of the form *-pc-windows-elf. But, it - // seems that this information is not easily accessible from the - // ELFObjectWriter. StringRef Name = Symbol.getName(); - SmallString<32> Buf; - if (!Name.startswith("?") && !Name.startswith("@?") && - !Name.startswith("__imp_?") && !Name.startswith("__imp_@?")) { - // This symbol isn't following the MSVC C++ name mangling convention. We - // can thus safely interpret the @@@ in symbol names as specifying symbol - // versioning. - size_t Pos = Name.find("@@@"); - if (Pos != StringRef::npos) { - Buf += Name.substr(0, Pos); - unsigned Skip = MSD.SectionIndex == ELF::SHN_UNDEF ? 2 : 1; - Buf += Name.substr(Pos + Skip); - Name = VersionSymSaver.save(Buf.c_str()); - } - } // Sections have their own string table if (Symbol.getType() != ELF::STT_SECTION) { Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -129,6 +129,9 @@ class MCAsmStreamer final : public MCStreamer { (publi void ChangeSection(MCSection *Section, const MCExpr *Subsection) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; + void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) override; void EmitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override; @@ -409,6 +412,14 @@ void MCAsmStreamer::ChangeSection(MCSection *Section, *MAI, getContext().getObjectFileInfo()->getTargetTriple(), OS, Subsection); } +} + +void MCAsmStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + OS << ".symver "; + Aliasee->print(OS, MAI); + OS << ", " << AliasName; + EmitEOL(); } void MCAsmStreamer::EmitLabel(MCSymbol *Symbol, SMLoc Loc) { Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -337,6 +337,11 @@ void MCELFStreamer::emitELFSize(MCSymbol *Symbol, cons cast<MCSymbolELF>(Symbol)->setSize(Value); } +void MCELFStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + getAssembler().Symvers.push_back({AliasName, Aliasee}); +} + void MCELFStreamer::EmitLocalCommonSymbol(MCSymbol *S, uint64_t Size, unsigned ByteAlignment) { auto *Symbol = cast<MCSymbolELF>(S); Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -767,12 +767,8 @@ bool ELFAsmParser::ParseDirectiveSymver(StringRef, SML if (AliasName.find('@') == StringRef::npos) return TokError("expected a '@' in the name"); - MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); MCSymbol *Sym = getContext().getOrCreateSymbol(Name); - const MCExpr *Value = MCSymbolRefExpr::create(Sym, getContext()); - - getStreamer().EmitAssignment(Alias, Value); - getStreamer().emitELFSymverDirective(Alias, Sym); + getStreamer().emitELFSymverDirective(AliasName, Sym); return false; } Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -925,7 +925,7 @@ void MCStreamer::EmitCOFFSymbolType(int Type) { llvm_unreachable("this directive only supported on COFF targets"); } void MCStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {} -void MCStreamer::emitELFSymverDirective(MCSymbol *Alias, +void MCStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) {} void MCStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) {} Modified: user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -24,7 +24,6 @@ #include "llvm/IR/GlobalAlias.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Mangler.h" #include "llvm/IR/Module.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -69,81 +68,6 @@ void ModuleSymbolTable::addModule(Module *M) { }); } -// Ensure ELF .symver aliases get the same binding as the defined symbol -// they alias with. -static void handleSymverAliases(const Module &M, RecordStreamer &Streamer) { - if (Streamer.symverAliases().empty()) - return; - - // The name in the assembler will be mangled, but the name in the IR - // might not, so we first compute a mapping from mangled name to GV. - Mangler Mang; - SmallString<64> MangledName; - StringMap<const GlobalValue *> MangledNameMap; - auto GetMangledName = [&](const GlobalValue &GV) { - if (!GV.hasName()) - return; - - MangledName.clear(); - MangledName.reserve(GV.getName().size() + 1); - Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); - MangledNameMap[MangledName] = &GV; - }; - for (const Function &F : M) - GetMangledName(F); - for (const GlobalVariable &GV : M.globals()) - GetMangledName(GV); - for (const GlobalAlias &GA : M.aliases()) - GetMangledName(GA); - - // Walk all the recorded .symver aliases, and set up the binding - // for each alias. - for (auto &Symver : Streamer.symverAliases()) { - const MCSymbol *Aliasee = Symver.first; - MCSymbolAttr Attr = MCSA_Invalid; - - // First check if the aliasee binding was recorded in the asm. - RecordStreamer::State state = Streamer.getSymbolState(Aliasee); - switch (state) { - case RecordStreamer::Global: - case RecordStreamer::DefinedGlobal: - Attr = MCSA_Global; - break; - case RecordStreamer::UndefinedWeak: - case RecordStreamer::DefinedWeak: - Attr = MCSA_Weak; - break; - default: - break; - } - - // If we don't have a symbol attribute from assembly, then check if - // the aliasee was defined in the IR. - if (Attr == MCSA_Invalid) { - const auto *GV = M.getNamedValue(Aliasee->getName()); - if (!GV) { - auto MI = MangledNameMap.find(Aliasee->getName()); - if (MI != MangledNameMap.end()) - GV = MI->second; - else - continue; - } - if (GV->hasExternalLinkage()) - Attr = MCSA_Global; - else if (GV->hasLocalLinkage()) - Attr = MCSA_Local; - else if (GV->isWeakForLinker()) - Attr = MCSA_Weak; - } - if (Attr == MCSA_Invalid) - continue; - - // Set the detected binding on each alias with this aliasee. - for (auto &Alias : Symver.second) - Streamer.EmitSymbolAttribute(Alias, Attr); - } -} - void ModuleSymbolTable::CollectAsmSymbols( const Module &M, function_ref<void(StringRef, BasicSymbolRef::Flags)> AsmSymbol) { @@ -176,7 +100,7 @@ void ModuleSymbolTable::CollectAsmSymbols( MCObjectFileInfo MOFI; MCContext MCCtx(MAI.get(), MRI.get(), &MOFI); MOFI.InitMCObjectFileInfo(TT, /*PIC*/ false, MCCtx); - RecordStreamer Streamer(MCCtx); + RecordStreamer Streamer(MCCtx, M); T->createNullTargetStreamer(Streamer); std::unique_ptr<MemoryBuffer> Buffer(MemoryBuffer::getMemBuffer(InlineAsm)); @@ -195,7 +119,7 @@ void ModuleSymbolTable::CollectAsmSymbols( if (Parser->Run(false)) return; - handleSymverAliases(M, Streamer); + Streamer.flushSymverDirectives(); for (auto &KV : Streamer) { StringRef Key = KV.first(); Modified: user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// #include "RecordStreamer.h" +#include "llvm/IR/Mangler.h" +#include "llvm/IR/Module.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" using namespace llvm; @@ -70,7 +73,8 @@ void RecordStreamer::markUsed(const MCSymbol &Symbol) void RecordStreamer::visitUsedSymbol(const MCSymbol &Sym) { markUsed(Sym); } -RecordStreamer::RecordStreamer(MCContext &Context) : MCStreamer(Context) {} +RecordStreamer::RecordStreamer(MCContext &Context, const Module &M) + : MCStreamer(Context), M(M) {} RecordStreamer::const_iterator RecordStreamer::begin() { return Symbols.begin(); @@ -112,7 +116,109 @@ void RecordStreamer::EmitCommonSymbol(MCSymbol *Symbol markDefined(*Symbol); } -void RecordStreamer::emitELFSymverDirective(MCSymbol *Alias, +RecordStreamer::State RecordStreamer::getSymbolState(const MCSymbol *Sym) { + auto SI = Symbols.find(Sym->getName()); + if (SI == Symbols.end()) + return NeverSeen; + return SI->second; +} + +void RecordStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) { - SymverAliasMap[Aliasee].push_back(Alias); + SymverAliasMap[Aliasee].push_back(AliasName); +} + +void RecordStreamer::flushSymverDirectives() { + // Mapping from mangled name to GV. + StringMap<const GlobalValue *> MangledNameMap; + // The name in the assembler will be mangled, but the name in the IR + // might not, so we first compute a mapping from mangled name to GV. + Mangler Mang; + SmallString<64> MangledName; + for (const GlobalValue &GV : M.global_values()) { + if (!GV.hasName()) + continue; + MangledName.clear(); + MangledName.reserve(GV.getName().size() + 1); + Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); + MangledNameMap[MangledName] = &GV; + } + + // Walk all the recorded .symver aliases, and set up the binding + // for each alias. + for (auto &Symver : SymverAliasMap) { + const MCSymbol *Aliasee = Symver.first; + MCSymbolAttr Attr = MCSA_Invalid; + bool IsDefined = false; + + // First check if the aliasee binding was recorded in the asm. + RecordStreamer::State state = getSymbolState(Aliasee); + switch (state) { + case RecordStreamer::Global: + case RecordStreamer::DefinedGlobal: + Attr = MCSA_Global; + break; + case RecordStreamer::UndefinedWeak: + case RecordStreamer::DefinedWeak: + Attr = MCSA_Weak; + break; + default: + break; + } + + switch (state) { + case RecordStreamer::Defined: + case RecordStreamer::DefinedGlobal: + case RecordStreamer::DefinedWeak: + IsDefined = true; + break; + case RecordStreamer::NeverSeen: + case RecordStreamer::Global: + case RecordStreamer::Used: + case RecordStreamer::UndefinedWeak: + break; + } + + if (Attr == MCSA_Invalid || !IsDefined) { + const GlobalValue *GV = M.getNamedValue(Aliasee->getName()); + if (!GV) { + auto MI = MangledNameMap.find(Aliasee->getName()); + if (MI != MangledNameMap.end()) + GV = MI->second; + } + if (GV) { + // If we don't have a symbol attribute from assembly, then check if + // the aliasee was defined in the IR. + if (Attr == MCSA_Invalid) { + if (GV->hasExternalLinkage()) + Attr = MCSA_Global; + else if (GV->hasLocalLinkage()) + Attr = MCSA_Local; + else if (GV->isWeakForLinker()) + Attr = MCSA_Weak; + } + IsDefined = IsDefined || !GV->isDeclarationForLinker(); + } + } + + // Set the detected binding on each alias with this aliasee. + for (auto AliasName : Symver.second) { + std::pair<StringRef, StringRef> Split = AliasName.split("@@@"); + SmallString<128> NewName; + if (!Split.second.empty() && !Split.second.startswith("@")) { + // Special processing for "@@@" according + // https://sourceware.org/binutils/docs/as/Symver.html + const char *Separator = IsDefined ? "@@" : "@"; + AliasName = + (Split.first + Separator + Split.second).toStringRef(NewName); + } + MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); + // TODO: Handle "@@@". Depending on SymbolAttribute value it needs to be + // converted into @ or @@. + const MCExpr *Value = MCSymbolRefExpr::create(Aliasee, getContext()); + EmitAssignment(Alias, Value); + if (Attr != MCSA_Invalid) + EmitSymbolAttribute(Alias, Attr); + } + } } Modified: user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -20,25 +20,32 @@ namespace llvm { +class GlobalValue; +class Module; + class RecordStreamer : public MCStreamer { public: enum State { NeverSeen, Global, Defined, DefinedGlobal, DefinedWeak, Used, UndefinedWeak}; private: + const Module &M; StringMap<State> Symbols; // Map of aliases created by .symver directives, saved so we can update // their symbol binding after parsing complete. This maps from each // aliasee to its list of aliases. - DenseMap<const MCSymbol *, std::vector<MCSymbol *>> SymverAliasMap; + DenseMap<const MCSymbol *, std::vector<StringRef>> SymverAliasMap; + /// Get the state recorded for the given symbol. + State getSymbolState(const MCSymbol *Sym); + void markDefined(const MCSymbol &Symbol); void markGlobal(const MCSymbol &Symbol, MCSymbolAttr Attribute); void markUsed(const MCSymbol &Symbol); void visitUsedSymbol(const MCSymbol &Sym) override; public: - RecordStreamer(MCContext &Context); + RecordStreamer(MCContext &Context, const Module &M); using const_iterator = StringMap<State>::const_iterator; @@ -54,20 +61,11 @@ class RecordStreamer : public MCStreamer { (public) void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; /// Record .symver aliases for later processing. - void emitELFSymverDirective(MCSymbol *Alias, + void emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) override; - /// Return the map of .symver aliasee to associated aliases. - DenseMap<const MCSymbol *, std::vector<MCSymbol *>> &symverAliases() { - return SymverAliasMap; - } - - /// Get the state recorded for the given symbol. - State getSymbolState(const MCSymbol *Sym) { - auto SI = Symbols.find(Sym->getName()); - if (SI == Symbols.end()) - return NeverSeen; - return SI->second; - } + // Emit ELF .symver aliases and ensure they have the same binding as the + // defined symbol they alias with. + void flushSymverDirectives(); }; } // end namespace llvm Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 21:57:10 2018 (r331377) @@ -53,6 +53,38 @@ # define _LIBUNWIND_CONTEXT_SIZE 64 # define _LIBUNWIND_CURSOR_SIZE 76 # define _LIBUNWIND_MAX_REGISTER 96 +# elif defined(__mips__) +# if defined(_ABIO32) && _MIPS_SIM == _ABIO32 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 50 +# define _LIBUNWIND_CURSOR_SIZE 61 +# else +# define _LIBUNWIND_CONTEXT_SIZE 18 +# define _LIBUNWIND_CURSOR_SIZE 29 +# endif +# elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 78 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 46 +# endif +# elif defined(_ABI64) && _MIPS_SIM == _ABI64 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 79 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 47 +# endif +# else +# error "Unsupported MIPS ABI and/or environment" +# endif +# define _LIBUNWIND_MAX_REGISTER 66 # else # error "Unsupported architecture." # endif @@ -63,6 +95,8 @@ # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 # define _LIBUNWIND_MAX_REGISTER 120 Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 21:57:10 2018 (r331377) @@ -604,4 +604,74 @@ enum { UNW_RISCV_D31 = 95, }; +// MIPS registers +enum { + UNW_MIPS_R0 = 0, + UNW_MIPS_R1 = 1, + UNW_MIPS_R2 = 2, + UNW_MIPS_R3 = 3, + UNW_MIPS_R4 = 4, + UNW_MIPS_R5 = 5, + UNW_MIPS_R6 = 6, + UNW_MIPS_R7 = 7, + UNW_MIPS_R8 = 8, + UNW_MIPS_R9 = 9, + UNW_MIPS_R10 = 10, + UNW_MIPS_R11 = 11, + UNW_MIPS_R12 = 12, + UNW_MIPS_R13 = 13, + UNW_MIPS_R14 = 14, + UNW_MIPS_R15 = 15, + UNW_MIPS_R16 = 16, + UNW_MIPS_R17 = 17, + UNW_MIPS_R18 = 18, + UNW_MIPS_R19 = 19, + UNW_MIPS_R20 = 20, + UNW_MIPS_R21 = 21, + UNW_MIPS_R22 = 22, + UNW_MIPS_R23 = 23, + UNW_MIPS_R24 = 24, + UNW_MIPS_R25 = 25, + UNW_MIPS_R26 = 26, + UNW_MIPS_R27 = 27, + UNW_MIPS_R28 = 28, + UNW_MIPS_R29 = 29, + UNW_MIPS_R30 = 30, + UNW_MIPS_R31 = 31, + UNW_MIPS_F0 = 32, + UNW_MIPS_F1 = 33, + UNW_MIPS_F2 = 34, + UNW_MIPS_F3 = 35, + UNW_MIPS_F4 = 36, + UNW_MIPS_F5 = 37, + UNW_MIPS_F6 = 38, + UNW_MIPS_F7 = 39, + UNW_MIPS_F8 = 40, + UNW_MIPS_F9 = 41, + UNW_MIPS_F10 = 42, + UNW_MIPS_F11 = 43, + UNW_MIPS_F12 = 44, + UNW_MIPS_F13 = 45, + UNW_MIPS_F14 = 46, + UNW_MIPS_F15 = 47, + UNW_MIPS_F16 = 48, + UNW_MIPS_F17 = 49, + UNW_MIPS_F18 = 50, + UNW_MIPS_F19 = 51, + UNW_MIPS_F20 = 52, + UNW_MIPS_F21 = 53, + UNW_MIPS_F22 = 54, + UNW_MIPS_F23 = 55, + UNW_MIPS_F24 = 56, + UNW_MIPS_F25 = 57, + UNW_MIPS_F26 = 58, + UNW_MIPS_F27 = 59, + UNW_MIPS_F28 = 60, + UNW_MIPS_F29 = 61, + UNW_MIPS_F30 = 62, + UNW_MIPS_F31 = 63, + UNW_MIPS_HI = 64, + UNW_MIPS_LO = 65, +}; + #endif Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -148,6 +148,7 @@ class __attribute__((visibility("hidden"))) LocalAddre return val; } uintptr_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); static uint64_t getULEB128(pint_t &addr, pint_t end); static int64_t getSLEB128(pint_t &addr, pint_t end); @@ -169,6 +170,14 @@ inline uintptr_t LocalAddressSpace::getP(pint_t addr) #endif } +inline uint64_t LocalAddressSpace::getRegister(pint_t addr) { +#if defined(__LP64__) || defined(__mips64) + return get64(addr); +#else + return get32(addr); +#endif +} + /// Read a ULEB128 into a 64-bit word. inline uint64_t LocalAddressSpace::getULEB128(pint_t &addr, pint_t end) { const uint8_t *p = (uint8_t *)addr; @@ -496,6 +505,7 @@ class OtherAddressSpace { (public) uint32_t get32(pint_t addr); uint64_t get64(pint_t addr); pint_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); uint64_t getULEB128(pint_t &addr, pint_t end); int64_t getSLEB128(pint_t &addr, pint_t end); pint_t getEncodedP(pint_t &addr, pint_t end, uint8_t encoding, @@ -529,6 +539,11 @@ template <typename P> uint64_t OtherAddressSpace<P>::g template <typename P> typename P::uint_t OtherAddressSpace<P>::getP(pint_t addr) { return P::getP(*(uint64_t *)localCopy(addr)); +} + +template <typename P> +typename P::uint_t OtherAddressSpace<P>::getRegister(pint_t addr) { + return P::getRegister(*(uint64_t *)localCopy(addr)); } template <typename P> Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -83,10 +83,10 @@ typename A::pint_t DwarfInstructions<A, R>::getSavedRe const RegisterLocation &savedReg) { switch (savedReg.location) { case CFI_Parser<A>::kRegisterInCFA: - return addressSpace.getP(cfa + (pint_t)savedReg.value); + return addressSpace.getRegister(cfa + (pint_t)savedReg.value); case CFI_Parser<A>::kRegisterAtExpression: - return addressSpace.getP( + return addressSpace.getRegister( evaluateExpression((pint_t)savedReg.value, addressSpace, registers, cfa)); Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -2168,6 +2168,612 @@ inline void Registers_riscv::setVectorRegister(int, v1 _LIBUNWIND_ABORT("no riscv vector register support yet"); } #endif // _LIBUNWIND_TARGET_RISCV + +#if defined(_LIBUNWIND_TARGET_MIPS_O32) +/// Registers_mips_o32 holds the register state of a thread in a 32-bit MIPS +/// process. +class _LIBUNWIND_HIDDEN Registers_mips_o32 { +public: + Registers_mips_o32(); + Registers_mips_o32(const void *registers); + + bool validRegister(int num) const; + uint32_t getRegister(int num) const; + void setRegister(int num, uint32_t value); + bool validFloatRegister(int num) const; + double getFloatRegister(int num) const; + void setFloatRegister(int num, double value); + bool validVectorRegister(int num) const; + v128 getVectorRegister(int num) const; + void setVectorRegister(int num, v128 value); + const char *getRegisterName(int num); + void jumpto(); + static int lastDwarfRegNum() { return 65; } + + uint32_t getSP() const { return _registers.__r[29]; } + void setSP(uint32_t value) { _registers.__r[29] = value; } + uint32_t getIP() const { return _registers.__pc; } + void setIP(uint32_t value) { _registers.__pc = value; } + +private: + struct mips_o32_thread_state_t { + uint32_t __r[32]; + uint32_t __pc; + uint32_t __hi; + uint32_t __lo; + }; + + mips_o32_thread_state_t _registers; +#ifdef __mips_hard_float + /// O32 with 32-bit floating point registers only uses half of this + /// space. However, using the same layout for 32-bit vs 64-bit + /// floating point registers results in a single context size for + /// O32 with hard float. + uint32_t _padding; + double _floats[32]; +#endif +}; + +inline Registers_mips_o32::Registers_mips_o32(const void *registers) { + static_assert((check_fit<Registers_mips_o32, unw_context_t>::does_fit), + "mips_o32 registers do not fit into unw_context_t"); + memcpy(&_registers, static_cast<const uint8_t *>(registers), + sizeof(_registers)); +} + +inline Registers_mips_o32::Registers_mips_o32() { + memset(&_registers, 0, sizeof(_registers)); +} + +inline bool Registers_mips_o32::validRegister(int regNum) const { + if (regNum == UNW_REG_IP) + return true; + if (regNum == UNW_REG_SP) + return true; + if (regNum < 0) + return false; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803222157.w2MLvA1Z038891>