Date: Sat, 31 Jan 2015 11:24:28 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r277967 - in user/dchagin/lemul: . bin/cp bin/expr bin/mv cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline cddl/contrib/op... Message-ID: <201501311124.t0VBOSL5003769@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Jan 31 11:24:26 2015 New Revision: 277967 URL: https://svnweb.freebsd.org/changeset/base/277967 Log: Merge from HEAD. Added: user/dchagin/lemul/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff - copied unchanged from r277966, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff user/dchagin/lemul/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff - copied unchanged from r277966, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff user/dchagin/lemul/etc/tests/rc.d/ - copied from r277966, head/etc/tests/rc.d/ user/dchagin/lemul/sys/arm/arm/pmu.c - copied unchanged from r277966, head/sys/arm/arm/pmu.c user/dchagin/lemul/sys/arm/freescale/imx/imx6_audmux.c - copied unchanged from r277966, head/sys/arm/freescale/imx/imx6_audmux.c user/dchagin/lemul/sys/arm/freescale/imx/imx6_sdma.c - copied unchanged from r277966, head/sys/arm/freescale/imx/imx6_sdma.c user/dchagin/lemul/sys/arm/freescale/imx/imx6_sdma.h - copied unchanged from r277966, head/sys/arm/freescale/imx/imx6_sdma.h user/dchagin/lemul/sys/arm/freescale/imx/imx6_ssi.c - copied unchanged from r277966, head/sys/arm/freescale/imx/imx6_ssi.c user/dchagin/lemul/sys/dev/hwpmc/hwpmc_armv7.c - copied unchanged from r277966, head/sys/dev/hwpmc/hwpmc_armv7.c user/dchagin/lemul/sys/dev/hwpmc/hwpmc_armv7.h - copied unchanged from r277966, head/sys/dev/hwpmc/hwpmc_armv7.h user/dchagin/lemul/sys/dev/iscsi/icl_conn_if.m - copied unchanged from r277966, head/sys/dev/iscsi/icl_conn_if.m user/dchagin/lemul/sys/dev/iscsi/icl_soft.c - copied unchanged from r277966, head/sys/dev/iscsi/icl_soft.c user/dchagin/lemul/sys/dev/iscsi/icl_wrappers.h - copied unchanged from r277966, head/sys/dev/iscsi/icl_wrappers.h user/dchagin/lemul/tools/build/options/WITHOUT_AUTOFS - copied unchanged from r277966, head/tools/build/options/WITHOUT_AUTOFS user/dchagin/lemul/tools/build/options/WITHOUT_BHYVE - copied unchanged from r277966, head/tools/build/options/WITHOUT_BHYVE user/dchagin/lemul/tools/build/options/WITHOUT_BSDINSTALL - copied unchanged from r277966, head/tools/build/options/WITHOUT_BSDINSTALL user/dchagin/lemul/tools/build/options/WITHOUT_CCD - copied unchanged from r277966, head/tools/build/options/WITHOUT_CCD user/dchagin/lemul/tools/build/options/WITHOUT_EE - copied unchanged from r277966, head/tools/build/options/WITHOUT_EE user/dchagin/lemul/tools/build/options/WITHOUT_HAST - copied unchanged from r277966, head/tools/build/options/WITHOUT_HAST user/dchagin/lemul/tools/build/options/WITHOUT_ISCSI - copied unchanged from r277966, head/tools/build/options/WITHOUT_ISCSI user/dchagin/lemul/tools/build/options/WITHOUT_TALK - copied unchanged from r277966, head/tools/build/options/WITHOUT_TALK Replaced: user/dchagin/lemul/sys/dev/iscsi/icl.c - copied unchanged from r277966, head/sys/dev/iscsi/icl.c Deleted: user/dchagin/lemul/share/man/man9/spl.9 Modified: user/dchagin/lemul/Makefile.inc1 user/dchagin/lemul/ObsoleteFiles.inc user/dchagin/lemul/bin/cp/utils.c user/dchagin/lemul/bin/expr/expr.y user/dchagin/lemul/bin/mv/mv.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c user/dchagin/lemul/contrib/amd/amd/amfs_generic.c user/dchagin/lemul/contrib/amd/amd/amfs_program.c user/dchagin/lemul/contrib/amd/amd/readdir.c user/dchagin/lemul/contrib/amd/hlfsd/homedir.c user/dchagin/lemul/contrib/amd/hlfsd/stubs.c user/dchagin/lemul/contrib/elftoolchain/elfcopy/main.c user/dchagin/lemul/contrib/gdb/gdb/corelow.c user/dchagin/lemul/contrib/gdb/gdb/dwarf2expr.c user/dchagin/lemul/contrib/libcxxrt/stdexcept.cc user/dchagin/lemul/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp user/dchagin/lemul/contrib/llvm/tools/clang/include/clang/Driver/Options.td user/dchagin/lemul/contrib/llvm/tools/clang/lib/Driver/Tools.cpp user/dchagin/lemul/contrib/netbsd-tests/bin/expr/t_expr.sh user/dchagin/lemul/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c user/dchagin/lemul/contrib/sendmail/cf/m4/cfhead.m4 user/dchagin/lemul/contrib/tcpdump/print-ip.c user/dchagin/lemul/contrib/tcpdump/print-sl.c user/dchagin/lemul/contrib/tcpdump/tcpdump.c user/dchagin/lemul/etc/Makefile user/dchagin/lemul/etc/defaults/Makefile user/dchagin/lemul/etc/devd/Makefile user/dchagin/lemul/etc/mtree/BSD.tests.dist user/dchagin/lemul/etc/pam.d/Makefile user/dchagin/lemul/etc/rc.d/Makefile user/dchagin/lemul/etc/rc.d/ipfilter user/dchagin/lemul/etc/rc.d/local_unbound user/dchagin/lemul/etc/sendmail/Makefile user/dchagin/lemul/etc/tests/Makefile user/dchagin/lemul/games/fortune/fortune/fortune.6 user/dchagin/lemul/include/Makefile user/dchagin/lemul/lib/Makefile user/dchagin/lemul/lib/libc/gen/sem_new.c user/dchagin/lemul/lib/libc/gen/sem_post.3 user/dchagin/lemul/lib/libc/mips/gen/sigsetjmp.S user/dchagin/lemul/lib/libc/tests/c063/Makefile user/dchagin/lemul/lib/libnv/Makefile user/dchagin/lemul/lib/libnv/nv.3 user/dchagin/lemul/lib/libnv/nv.h user/dchagin/lemul/lib/libnv/nvlist.c user/dchagin/lemul/lib/libnv/nvpair.c user/dchagin/lemul/lib/libpmc/libpmc.c user/dchagin/lemul/lib/libproc/proc_sym.c user/dchagin/lemul/lib/libproc/tests/proc_test.c user/dchagin/lemul/lib/libthread_db/arch/i386/libpthread_md.c user/dchagin/lemul/lib/libutil/gr_util.c user/dchagin/lemul/lib/msun/src/s_scalbln.c user/dchagin/lemul/libexec/Makefile user/dchagin/lemul/libexec/rtld-elf/rtld.c user/dchagin/lemul/release/Makefile user/dchagin/lemul/release/picobsd/build/picobsd user/dchagin/lemul/release/scripts/make-manifest.sh user/dchagin/lemul/rescue/rescue/Makefile user/dchagin/lemul/sbin/Makefile user/dchagin/lemul/sbin/geom/class/mountver/gmountver.8 user/dchagin/lemul/sbin/ipfw/nat.c user/dchagin/lemul/sbin/rcorder/Makefile user/dchagin/lemul/sbin/rcorder/rcorder.c user/dchagin/lemul/share/Makefile user/dchagin/lemul/share/examples/Makefile user/dchagin/lemul/share/man/man3/tree.3 user/dchagin/lemul/share/man/man4/Makefile user/dchagin/lemul/share/man/man4/sfxge.4 user/dchagin/lemul/share/man/man5/Makefile user/dchagin/lemul/share/man/man5/src.conf.5 user/dchagin/lemul/share/man/man7/release.7 user/dchagin/lemul/share/man/man9/Makefile user/dchagin/lemul/share/man/man9/SYSCALL_MODULE.9 user/dchagin/lemul/share/man/man9/contigmalloc.9 user/dchagin/lemul/share/man/man9/pmap_enter.9 user/dchagin/lemul/share/misc/committers-src.dot user/dchagin/lemul/share/mk/src.opts.mk user/dchagin/lemul/sys/amd64/amd64/machdep.c user/dchagin/lemul/sys/amd64/conf/GENERIC user/dchagin/lemul/sys/amd64/vmm/amd/svm.c user/dchagin/lemul/sys/arm/arm/intr.c user/dchagin/lemul/sys/arm/arm/mem.c user/dchagin/lemul/sys/arm/broadcom/bcm2835/bcm2835_gpio.c user/dchagin/lemul/sys/arm/freescale/imx/files.imx6 user/dchagin/lemul/sys/arm/freescale/imx/imx6_anatop.c user/dchagin/lemul/sys/arm/freescale/imx/imx6_anatopreg.h user/dchagin/lemul/sys/arm/freescale/imx/imx6_anatopvar.h user/dchagin/lemul/sys/arm/freescale/imx/imx6_ccm.c user/dchagin/lemul/sys/arm/freescale/imx/imx6_ccmreg.h user/dchagin/lemul/sys/arm/freescale/imx/imx_ccmvar.h user/dchagin/lemul/sys/arm/include/pmc_mdep.h user/dchagin/lemul/sys/arm/ti/am335x/am335x_lcd.c user/dchagin/lemul/sys/arm/ti/am335x/am335x_prcm.c user/dchagin/lemul/sys/arm/ti/am335x/files.am335x user/dchagin/lemul/sys/arm/ti/files.ti user/dchagin/lemul/sys/arm/ti/ti_i2c.c user/dchagin/lemul/sys/arm/ti/ti_pruss.c user/dchagin/lemul/sys/arm/xilinx/zy7_gpio.c user/dchagin/lemul/sys/arm/xscale/ixp425/avila_gpio.c user/dchagin/lemul/sys/arm/xscale/ixp425/cambria_gpio.c user/dchagin/lemul/sys/boot/common/load_elf.c user/dchagin/lemul/sys/boot/efi/libefi/efinet.c user/dchagin/lemul/sys/boot/fdt/dts/arm/am335x.dtsi user/dchagin/lemul/sys/boot/fdt/dts/arm/apalis-imx6.dts user/dchagin/lemul/sys/boot/fdt/dts/arm/imx6.dtsi user/dchagin/lemul/sys/boot/forth/beastie.4th user/dchagin/lemul/sys/boot/forth/brand.4th user/dchagin/lemul/sys/boot/i386/libfirewire/firewire.c user/dchagin/lemul/sys/boot/i386/libi386/libi386.h user/dchagin/lemul/sys/boot/i386/libi386/smbios.c user/dchagin/lemul/sys/cam/ctl/ctl.c user/dchagin/lemul/sys/cam/ctl/ctl_frontend_iscsi.c user/dchagin/lemul/sys/cam/ctl/ctl_tpc.c user/dchagin/lemul/sys/cam/scsi/scsi_all.h user/dchagin/lemul/sys/cam/scsi/scsi_da.c user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c user/dchagin/lemul/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/dchagin/lemul/sys/conf/files user/dchagin/lemul/sys/conf/files.amd64 user/dchagin/lemul/sys/conf/files.arm user/dchagin/lemul/sys/conf/kern.mk user/dchagin/lemul/sys/conf/kern.opts.mk user/dchagin/lemul/sys/dev/acpica/acpi.c user/dchagin/lemul/sys/dev/alc/if_alc.c user/dchagin/lemul/sys/dev/ath/ath_hal/ah_internal.h user/dchagin/lemul/sys/dev/ath/ath_rate/sample/sample.c user/dchagin/lemul/sys/dev/ath/ath_rate/sample/sample.h user/dchagin/lemul/sys/dev/cxgbe/t4_main.c user/dchagin/lemul/sys/dev/cxgbe/tom/t4_ddp.c user/dchagin/lemul/sys/dev/drm2/i915/intel_display.c user/dchagin/lemul/sys/dev/fb/fbd.c user/dchagin/lemul/sys/dev/fdt/fdt_clock.c user/dchagin/lemul/sys/dev/hwpmc/hwpmc_arm.c user/dchagin/lemul/sys/dev/hwpmc/pmc_events.h user/dchagin/lemul/sys/dev/iscsi/icl.h user/dchagin/lemul/sys/dev/iscsi/iscsi.c user/dchagin/lemul/sys/dev/mem/memdev.c user/dchagin/lemul/sys/dev/mps/mps.c user/dchagin/lemul/sys/dev/mps/mps_user.c user/dchagin/lemul/sys/dev/netmap/netmap.c user/dchagin/lemul/sys/dev/ofw/openfirm.c user/dchagin/lemul/sys/dev/pci/pci_pci.c user/dchagin/lemul/sys/dev/sfxge/common/efsys.h user/dchagin/lemul/sys/dev/sfxge/common/efx_ev.c user/dchagin/lemul/sys/dev/sfxge/common/efx_tx.c user/dchagin/lemul/sys/dev/sfxge/sfxge.c user/dchagin/lemul/sys/dev/sfxge/sfxge.h user/dchagin/lemul/sys/dev/sfxge/sfxge_dma.c user/dchagin/lemul/sys/dev/sfxge/sfxge_ev.c user/dchagin/lemul/sys/dev/sfxge/sfxge_intr.c user/dchagin/lemul/sys/dev/sfxge/sfxge_port.c user/dchagin/lemul/sys/dev/sfxge/sfxge_tx.c user/dchagin/lemul/sys/dev/sfxge/sfxge_tx.h user/dchagin/lemul/sys/dev/syscons/syscons.c user/dchagin/lemul/sys/dev/virtio/block/virtio_blk.c user/dchagin/lemul/sys/dev/vt/hw/fb/vt_fb.c user/dchagin/lemul/sys/dev/vt/hw/fb/vt_fb.h user/dchagin/lemul/sys/dev/vt/vt.h user/dchagin/lemul/sys/dev/vt/vt_core.c user/dchagin/lemul/sys/fs/cd9660/cd9660_util.c user/dchagin/lemul/sys/fs/fdescfs/fdesc_vfsops.c user/dchagin/lemul/sys/fs/msdosfs/msdosfs_conv.c user/dchagin/lemul/sys/fs/smbfs/smbfs_subr.c user/dchagin/lemul/sys/fs/tmpfs/tmpfs.h user/dchagin/lemul/sys/fs/tmpfs/tmpfs_subr.c user/dchagin/lemul/sys/fs/tmpfs/tmpfs_vfsops.c user/dchagin/lemul/sys/fs/tmpfs/tmpfs_vnops.c user/dchagin/lemul/sys/fs/udf/udf_vnops.c user/dchagin/lemul/sys/i386/i386/mem.c user/dchagin/lemul/sys/kern/kern_jail.c user/dchagin/lemul/sys/kern/kern_timeout.c user/dchagin/lemul/sys/kern/subr_sglist.c user/dchagin/lemul/sys/kern/vfs_subr.c user/dchagin/lemul/sys/libkern/strtol.c user/dchagin/lemul/sys/libkern/strtoq.c user/dchagin/lemul/sys/libkern/strtoul.c user/dchagin/lemul/sys/libkern/strtouq.c user/dchagin/lemul/sys/mips/mips/mem.c user/dchagin/lemul/sys/modules/Makefile user/dchagin/lemul/sys/modules/aesni/Makefile user/dchagin/lemul/sys/modules/ctl/Makefile user/dchagin/lemul/sys/modules/cxgbe/if_cxgbe/Makefile user/dchagin/lemul/sys/modules/geom/Makefile user/dchagin/lemul/sys/modules/iscsi/Makefile user/dchagin/lemul/sys/netgraph/ng_parse.c user/dchagin/lemul/sys/netinet/sctp_input.c user/dchagin/lemul/sys/netinet/sctp_usrreq.c user/dchagin/lemul/sys/netinet/tcp_hostcache.c user/dchagin/lemul/sys/netinet/tcp_syncache.c user/dchagin/lemul/sys/netipsec/key.c user/dchagin/lemul/sys/powerpc/aim/machdep.c user/dchagin/lemul/sys/powerpc/pseries/plpar_iommu.c user/dchagin/lemul/sys/sparc64/sparc64/mem.c user/dchagin/lemul/sys/sys/cdefs.h user/dchagin/lemul/sys/sys/conf.h user/dchagin/lemul/sys/sys/eventhandler.h user/dchagin/lemul/sys/sys/jail.h user/dchagin/lemul/sys/sys/param.h user/dchagin/lemul/sys/sys/pmc.h user/dchagin/lemul/sys/sys/proc.h user/dchagin/lemul/sys/sys/tree.h user/dchagin/lemul/sys/ufs/ffs/ffs_softdep.c user/dchagin/lemul/sys/ufs/ffs/softdep.h user/dchagin/lemul/sys/ufs/ufs/ufs_quota.c user/dchagin/lemul/sys/ufs/ufs/ufs_vfsops.c user/dchagin/lemul/sys/vm/vm_fault.c user/dchagin/lemul/sys/vm/vm_map.c user/dchagin/lemul/sys/vm/vm_object.c user/dchagin/lemul/sys/vm/vm_object.h user/dchagin/lemul/sys/vm/vm_pageout.c user/dchagin/lemul/sys/x86/x86/tsc.c user/dchagin/lemul/tools/build/mk/OptionalObsoleteFiles.inc user/dchagin/lemul/tools/tools/nanobsd/rescue/build.sh user/dchagin/lemul/tools/tools/nanobsd/rescue/common user/dchagin/lemul/usr.bin/Makefile user/dchagin/lemul/usr.bin/grep/Makefile user/dchagin/lemul/usr.bin/kdump/kdump.c user/dchagin/lemul/usr.bin/sed/main.c user/dchagin/lemul/usr.bin/sed/process.c user/dchagin/lemul/usr.bin/touch/touch.c user/dchagin/lemul/usr.sbin/Makefile user/dchagin/lemul/usr.sbin/Makefile.amd64 user/dchagin/lemul/usr.sbin/autofs/autounmountd.c user/dchagin/lemul/usr.sbin/binmiscctl/binmiscctl.c user/dchagin/lemul/usr.sbin/bsdinstall/partedit/partedit_x86.c user/dchagin/lemul/usr.sbin/config/config.8 user/dchagin/lemul/usr.sbin/config/configvers.h user/dchagin/lemul/usr.sbin/config/main.c user/dchagin/lemul/usr.sbin/jail/jail.8 user/dchagin/lemul/usr.sbin/pciconf/pciconf.c user/dchagin/lemul/usr.sbin/pmcstudy/pmcstudy.c user/dchagin/lemul/usr.sbin/ppp/command.c user/dchagin/lemul/usr.sbin/ppp/ipcp.c user/dchagin/lemul/usr.sbin/ppp/ipv6cp.c user/dchagin/lemul/usr.sbin/ppp/radius.c user/dchagin/lemul/usr.sbin/ppp/server.c user/dchagin/lemul/usr.sbin/sa/db.c Directory Properties: user/dchagin/lemul/ (props changed) user/dchagin/lemul/cddl/ (props changed) user/dchagin/lemul/cddl/contrib/opensolaris/ (props changed) user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) user/dchagin/lemul/contrib/amd/ (props changed) user/dchagin/lemul/contrib/elftoolchain/ (props changed) user/dchagin/lemul/contrib/gdb/ (props changed) user/dchagin/lemul/contrib/libcxxrt/ (props changed) user/dchagin/lemul/contrib/llvm/ (props changed) user/dchagin/lemul/contrib/llvm/tools/clang/ (props changed) user/dchagin/lemul/contrib/sendmail/ (props changed) user/dchagin/lemul/contrib/tcpdump/ (props changed) user/dchagin/lemul/etc/ (props changed) user/dchagin/lemul/include/ (props changed) user/dchagin/lemul/lib/libc/ (props changed) user/dchagin/lemul/lib/libutil/ (props changed) user/dchagin/lemul/sbin/ (props changed) user/dchagin/lemul/sbin/ipfw/ (props changed) user/dchagin/lemul/share/ (props changed) user/dchagin/lemul/share/man/man4/ (props changed) user/dchagin/lemul/sys/ (props changed) user/dchagin/lemul/sys/amd64/vmm/ (props changed) user/dchagin/lemul/sys/boot/ (props changed) user/dchagin/lemul/sys/cddl/contrib/opensolaris/ (props changed) user/dchagin/lemul/sys/conf/ (props changed) user/dchagin/lemul/usr.sbin/jail/ (props changed) Modified: user/dchagin/lemul/Makefile.inc1 ============================================================================== --- user/dchagin/lemul/Makefile.inc1 Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/Makefile.inc1 Sat Jan 31 11:24:26 2015 (r277967) @@ -1437,6 +1437,9 @@ _elftctools= lib/libelftc \ usr.bin/nm \ usr.bin/size \ usr.bin/strings +# These are not required by the build, but can be useful for developers who +# cross-build on a FreeBSD 10 host: +_elftctools+= usr.bin/addr2line .endif .endif Modified: user/dchagin/lemul/ObsoleteFiles.inc ============================================================================== --- user/dchagin/lemul/ObsoleteFiles.inc Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/ObsoleteFiles.inc Sat Jan 31 11:24:26 2015 (r277967) @@ -38,6 +38,20 @@ # xargs -n1 | sort | uniq -d; # done +# 20150124: spl.9 and friends +OLD_FILES+=usr/share/man/man9/spl.9 +OLD_FILES+=usr/share/man/man9/spl0.9 +OLD_FILES+=usr/share/man/man9/splbio.9 +OLD_FILES+=usr/share/man/man9/splclock.9 +OLD_FILES+=usr/share/man/man9/splhigh.9 +OLD_FILES+=usr/share/man/man9/splimp.9 +OLD_FILES+=usr/share/man/man9/splnet.9 +OLD_FILES+=usr/share/man/man9/splsoftclock.9 +OLD_FILES+=usr/share/man/man9/splsofttty.9 +OLD_FILES+=usr/share/man/man9/splstatclock.9 +OLD_FILES+=usr/share/man/man9/spltty.9 +OLD_FILES+=usr/share/man/man9/splvm.9 +OLD_FILES+=usr/share/man/man9/splx.9 # 20150118: new clang import which bumps version from 3.5.0 to 3.5.1. OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h Modified: user/dchagin/lemul/bin/cp/utils.c ============================================================================== --- user/dchagin/lemul/bin/cp/utils.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/bin/cp/utils.c Sat Jan 31 11:24:26 2015 (r277967) @@ -330,7 +330,7 @@ copy_special(struct stat *from_stat, int int setfile(struct stat *fs, int fd) { - static struct timeval tv[2]; + static struct timespec tspec[2]; struct stat ts; int rval, gotstat, islink, fdval; @@ -340,10 +340,11 @@ setfile(struct stat *fs, int fd) fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); - if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) { - warn("%sutimes: %s", islink ? "l" : "", to.p_path); + tspec[0] = fs->st_atim; + tspec[1] = fs->st_mtim; + if (utimensat(AT_FDCWD, to.p_path, tspec, + islink ? AT_SYMLINK_NOFOLLOW : 0)) { + warn("utimensat: %s", to.p_path); rval = 1; } if (fdval ? fstat(fd, &ts) : Modified: user/dchagin/lemul/bin/expr/expr.y ============================================================================== --- user/dchagin/lemul/bin/expr/expr.y Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/bin/expr/expr.y Sat Jan 31 11:24:26 2015 (r277967) @@ -444,14 +444,26 @@ op_minus(struct val *a, struct val *b) return (r); } +/* + * We depend on undefined behaviour giving a result (in r). + * To test this result, pass it as volatile. This prevents + * optimizing away of the test based on the undefined behaviour. + */ void -assert_times(intmax_t a, intmax_t b, intmax_t r) +assert_times(intmax_t a, intmax_t b, volatile intmax_t r) { /* - * if first operand is 0, no overflow is possible, - * else result of division test must match second operand + * If the first operand is 0, no overflow is possible, + * else the result of the division test must match the + * second operand. + * + * Be careful to avoid overflow in the overflow test, as + * in assert_div(). Overflow in division would kill us + * with a SIGFPE before getting the test wrong. In old + * buggy versions, optimization used to give a null test + * instead of a SIGFPE. */ - if (a != 0 && r / a != b) + if ((a == -1 && b == INTMAX_MIN) || (a != 0 && r / a != b)) errx(ERR_EXIT, "overflow"); } Modified: user/dchagin/lemul/bin/mv/mv.c ============================================================================== --- user/dchagin/lemul/bin/mv/mv.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/bin/mv/mv.c Sat Jan 31 11:24:26 2015 (r277967) @@ -273,7 +273,7 @@ do_move(const char *from, const char *to static int fastcopy(const char *from, const char *to, struct stat *sbp) { - struct timeval tval[2]; + struct timespec ts[2]; static u_int blen = MAXPHYS; static char *bp = NULL; mode_t oldmode; @@ -350,10 +350,9 @@ err: if (unlink(to)) } else warn("%s: cannot stat", to); - tval[0].tv_sec = sbp->st_atime; - tval[1].tv_sec = sbp->st_mtime; - tval[0].tv_usec = tval[1].tv_usec = 0; - if (utimes(to, tval)) + ts[0] = sbp->st_atim; + ts[1] = sbp->st_mtim; + if (utimensat(AT_FDCWD, to, ts, 0)) warn("%s: set times", to); if (close(to_fd)) { Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Sat Jan 31 11:24:26 2015 (r277967) @@ -273,7 +273,7 @@ sub run_tests { } $fullname = "$dir/$name"; - $exe = "./$base.exe"; + $exe = "$dir/$base.exe"; $exe_pid = -1; if ($opt_a && ($status != 0 || $tag != 0 || $droptag != 0 || Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.baddef1.d Sat Jan 31 11:24:26 2015 (r277967) @@ -38,4 +38,4 @@ * */ -inline cyc_func_t i = "i am a cyclic function"; +inline dtrace_trap_func_t i = "i am a dtrace trap function"; Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/inline/err.D_OP_INCOMPAT.badxlate.d Sat Jan 31 11:24:26 2015 (r277967) @@ -38,4 +38,4 @@ * */ -inline vfs_t *invalid = xlate<psinfo_t>(curthread->t_procp); +inline struct vnode *invalid = xlate<psinfo_t>(curthread->td_proc); Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/tst.usdt.c Sat Jan 31 11:24:26 2015 (r277967) @@ -14,6 +14,8 @@ */ #include <sys/sdt.h> +#include <stdio.h> +#include <stdlib.h> #include "usdt.h" #define FMT "{" \ Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NL.char.d Sat Jan 31 11:24:26 2015 (r277967) @@ -36,8 +36,10 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = ' '; +#pragma clang diagnostic pop exit(0); } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_CHR_NULL.char.d Sat Jan 31 11:24:26 2015 (r277967) @@ -36,7 +36,9 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = ''; exit(0); +#pragma clang diagnostic pop } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/lexer/err.D_STR_NL.string.d Sat Jan 31 11:24:26 2015 (r277967) @@ -36,9 +36,11 @@ BEGIN { - +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Winvalid-pp-token" h = "hello there"; exit(0); +#pragma clang diagnostic pop } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.roch.d Sat Jan 31 11:24:26 2015 (r277967) @@ -74,13 +74,13 @@ fbt:::return (long long)curthread, pid, tid, (int)arg1, (int)arg0); } -mutex_enter:adaptive-acquire +mtx_lock:adaptive-acquire { printf(" %u 0x%llX %d %d lock:0x%llX", timestamp, (long long)curthread, pid, tid, arg0); } -mutex_exit:adaptive-release +mtx_unlock:adaptive-release { printf(" %u 0x%llX %d %d lock:0x%llX", timestamp, (long long) curthread, pid, tid, arg0); Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/nfs/tst.call3.c Sat Jan 31 11:24:26 2015 (r277967) @@ -28,6 +28,7 @@ #include <strings.h> #include <rpc/rpc.h> +#include <stdio.h> #include <stdlib.h> #include <sys/param.h> #include <rpcsvc/mount.h> Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/offsetof/err.D_UNKNOWN.badmemb.d Sat Jan 31 11:24:26 2015 (r277967) @@ -40,5 +40,5 @@ BEGIN { - trace(offsetof(vnode_t, v_no_such_member)); + trace(offsetof(struct vnode, v_no_such_member)); } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.args1.c Sat Jan 31 11:24:26 2015 (r277967) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <signal.h> +#include <stdlib.h> #include <unistd.h> int Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.fork.d Sat Jan 31 11:24:26 2015 (r277967) @@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry proc:::create /pid == $1/ { - child = args[0]->pr_pid; + child = args[0]->p_pid; trace(pid); } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.gcc.c Sat Jan 31 11:24:26 2015 (r277967) @@ -26,6 +26,8 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include <sys/types.h> +#include <sys/wait.h> #include <spawn.h> #include <signal.h> #include <stdio.h> Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret1.c Sat Jan 31 11:24:26 2015 (r277967) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <signal.h> +#include <stdlib.h> #include <unistd.h> /* Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.ret2.c Sat Jan 31 11:24:26 2015 (r277967) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <signal.h> +#include <stdlib.h> #include <unistd.h> /* Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d Sat Jan 31 11:24:26 2015 (r277967) @@ -44,7 +44,7 @@ pid$1:a.out:waiting:entry proc:::create /pid == $1/ { - child = args[0]->pr_pid; + child = args[0]->p_pid; } pid$1:a.out:go: Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak1.c Sat Jan 31 11:24:26 2015 (r277967) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <signal.h> +#include <stdlib.h> #include <unistd.h> /* Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.weak2.c Sat Jan 31 11:24:26 2015 (r277967) @@ -27,6 +27,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <signal.h> +#include <stdlib.h> #include <unistd.h> /* Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Sat Jan 31 11:24:26 2015 (r277967) @@ -25,7 +25,7 @@ BEGIN { - print((void)`p0); + print((void)`proc0); } BEGIN Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Sat Jan 31 11:24:26 2015 (r277967) @@ -22,13 +22,13 @@ typedef struct pancakes { int i; string s; - timespec_t t; + struct timespec t; } pancakes_t; translator pancakes_t < void *V > { i = 2 * 10; s = strjoin("I like ", "pancakes"); - t = *(timespec_t *)`dtrace_zero; + t = *(struct timespec *)`dtrace_zero; }; BEGIN Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Sat Jan 31 11:24:26 2015 (r277967) @@ -1,7 +1,7 @@ pancakes_t { int i = 0x14 string s = [ "I like pancakes" ] - timespec_t t = { + struct timespec t = { time_t tv_sec = 0 long tv_nsec = 0 } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d Sat Jan 31 11:24:26 2015 (r277967) @@ -44,7 +44,7 @@ BEGIN i = 0; } -syscall::*lwp*:entry +syscall::*wait*:entry { exit(0); } Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.discard.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -36,7 +36,7 @@ script() { $dtrace -s /dev/stdin <<EOF proc:::signal-discard - /args[1]->pr_pid == $child && + /args[1]->p_pid == $child && args[1]->pr_psargs == "$longsleep" && args[2] == SIGHUP/ { exit(0); Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.signal.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -42,7 +42,7 @@ script() /* * This is guaranteed to not race with signal-handle. */ - target = args[1]->pr_pid; + target = args[1]->p_pid; } proc:::signal-handle Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.func.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -60,14 +60,14 @@ spinny & child=$! # -# This is gutsy -- we're assuming that mutex_enter(9F) will show up in the +# This is gutsy -- we're assuming that mtx_lock(9) will show up in the # output. This is most likely _not_ to show up in the output if the # platform does not support arbitrary resolution interval timers -- but # the above script was stress-tested down to 100 hertz and still ran # successfully on all platforms, so one is hopeful that this test will pass # even in that case. # -script | tee /dev/fd/2 | grep mutex_enter > /dev/null +script | tee /dev/fd/2 | grep mtx_lock > /dev/null status=$? kill $child Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.mod.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -63,7 +63,7 @@ child=$! # The only thing we can be sure of is that some module named "unix" (or # "genunix") did some work -- so that's all we'll check. # -script | tee /dev/fd/2 | grep unix > /dev/null +script | tee /dev/fd/2 | grep kernel > /dev/null status=$? kill $child Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.sym.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -63,7 +63,7 @@ child=$! # This is the same gutsy test as that found in the func() test; see that # test for the rationale. # -script | tee /dev/fd/2 | grep mutex_enter > /dev/null +script | tee /dev/fd/2 | grep mtx_lock > /dev/null status=$? kill $child Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/scalars/tst.selfarray2.d Sat Jan 31 11:24:26 2015 (r277967) @@ -31,8 +31,8 @@ #pragma D option dynvarsize=1m struct bar { - int pid; - kthread_t *curthread; + pid_t pid; + struct thread *curthread; }; self struct bar foo[int]; Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Sat Jan 31 11:24:26 2015 (r277967) @@ -28,6 +28,7 @@ #include <stdio.h> #include <sys/syscall.h> +#include <unistd.h> /*ARGSUSED*/ int Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh Sat Jan 31 11:24:26 2015 (r277967) @@ -106,11 +106,13 @@ cat > main.c <<EOF #include <dlfcn.h> #include <unistd.h> #include <stdio.h> +#include <signal.h> int main(int argc, char **argv) { void *live; + sigset_t mask; if ((live = dlopen("./livelib.so", RTLD_LAZY | RTLD_LOCAL)) == NULL) { printf("dlopen of livelib.so failed: %s\n", dlerror()); @@ -119,7 +121,8 @@ main(int argc, char **argv) (void) dlclose(live); - pause(); + (void) sigemptyset(&mask); + (void) sigsuspend(&mask); return (0); } @@ -133,7 +136,7 @@ fi script() { $dtrace -w -x bufsize=1k -c ./main -qs /dev/stdin <<EOF - syscall::pause:entry + syscall::sigsuspend:entry /pid == \$target/ { system("$dtrace -l -P test_prov*"); Modified: user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c ============================================================================== --- user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.forker.c Sat Jan 31 11:24:26 2015 (r277967) @@ -26,6 +26,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" +#include <sys/types.h> +#include <sys/wait.h> + +#include <stdlib.h> #include <unistd.h> #include "forker.h" Modified: user/dchagin/lemul/contrib/amd/amd/amfs_generic.c ============================================================================== --- user/dchagin/lemul/contrib/amd/amd/amfs_generic.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/amd/amd/amfs_generic.c Sat Jan 31 11:24:26 2015 (r277967) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) Modified: user/dchagin/lemul/contrib/amd/amd/amfs_program.c ============================================================================== --- user/dchagin/lemul/contrib/amd/amd/amfs_program.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/amd/amd/amfs_program.c Sat Jan 31 11:24:26 2015 (r277967) @@ -147,10 +147,12 @@ amfs_program_exec(char *info) (void) fclose(stdout); if (!logfp) logfp = stderr; /* initialize before possible first use */ - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; if (fileno(logfp) != fileno(stderr)) { (void) fclose(stderr); - (void) dup(fileno(logfp)); + if (dup(fileno(logfp)) == -1) + return errno; } /* Modified: user/dchagin/lemul/contrib/amd/amd/readdir.c ============================================================================== --- user/dchagin/lemul/contrib/amd/amd/readdir.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/amd/amd/readdir.c Sat Jan 31 11:24:26 2015 (r277967) @@ -63,6 +63,7 @@ static int key_already_in_chain(char *ke static nfsentry *make_entry_chain(am_node *mp, const nfsentry *current_chain, int fully_browsable); static int amfs_readdir_browsable(am_node *mp, nfscookie cookie, nfsdirlist *dp, nfsentry *ep, u_int count, int fully_browsable); +static const u_int dotdotcookie = DOT_DOT_COOKIE; /**************************************************************************** *** FUNCTIONS *** @@ -178,8 +179,9 @@ make_entry_chain(am_node *mp, const nfse /* we have space. put entry in next cell */ ++last_cookie; - chain[num_entries].ne_fileid = (u_int) last_cookie; - *(u_int *) chain[num_entries].ne_cookie = (u_int) last_cookie; + chain[num_entries].ne_fileid = last_cookie; + (void)memcpy(chain[num_entries].ne_cookie, &last_cookie, + sizeof(last_cookie)); chain[num_entries].ne_name = key; if (num_entries < max_entries - 1) { /* link to next one */ chain[num_entries].ne_nextentry = &chain[num_entries + 1]; @@ -253,7 +255,7 @@ amfs_readdir_browsable(am_node *mp, nfsc ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -300,9 +302,12 @@ amfs_readdir_browsable(am_node *mp, nfsc nfsentry *ne; for (j = 0, ne = te; ne; ne = ne->ne_nextentry) plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->ne_name); - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } plog(XLOG_DEBUG, "EOF is %d", dp->dl_eof); } return 0; @@ -412,7 +417,7 @@ amfs_generic_readdir(am_node *mp, nfscoo ep[0].ne_fileid = mp->am_gen; ep[0].ne_name = "."; ep[0].ne_nextentry = &ep[1]; - *(u_int *) ep[0].ne_cookie = 0; + (void)memset(ep[0].ne_cookie, 0, sizeof(u_int)); /* construct ".." */ if (mp->am_parent) @@ -429,9 +434,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) + for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } @@ -460,9 +468,9 @@ amfs_generic_readdir(am_node *mp, nfscoo am_node *xp_next = next_nonerror_node(xp->am_osib); if (xp_next) { - *(u_int *) ep->ne_cookie = xp_next->am_gen; + (void)memcpy(ep->ne_cookie, &xp_next->am_gen, sizeof(xp_next->am_gen)); } else { - *(u_int *) ep->ne_cookie = DOT_DOT_COOKIE; + (void)memcpy(ep->ne_cookie, &dotdotcookie, sizeof(dotdotcookie)); dp->dl_eof = TRUE; } @@ -488,9 +496,12 @@ amfs_generic_readdir(am_node *mp, nfscoo if (amuDebug(D_READDIR)) { nfsentry *ne; int j; - for (j=0,ne=ep; ne; ne=ne->ne_nextentry) + for (j=0,ne=ep; ne; ne=ne->ne_nextentry) { + u_int cookie; + (void)memcpy(&cookie, ne->ne_cookie, sizeof(cookie)); plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%d ck=%d", - j++, ne->ne_name, ne->ne_fileid, *(u_int *)ne->ne_cookie); + j++, ne->ne_name, ne->ne_fileid, cookie); + } } return 0; } Modified: user/dchagin/lemul/contrib/amd/hlfsd/homedir.c ============================================================================== --- user/dchagin/lemul/contrib/amd/hlfsd/homedir.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/amd/hlfsd/homedir.c Sat Jan 31 11:24:26 2015 (r277967) @@ -492,9 +492,10 @@ readent: /* read records */ buf[0] = '\0'; - fgets(buf, 256, passwd_fp); + if (fgets(buf, 256, passwd_fp) == NULL) + return NULL; passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ Modified: user/dchagin/lemul/contrib/amd/hlfsd/stubs.c ============================================================================== --- user/dchagin/lemul/contrib/amd/hlfsd/stubs.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/amd/hlfsd/stubs.c Sat Jan 31 11:24:26 2015 (r277967) @@ -164,8 +164,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, s if (gid != hlfs_gid) { res.ns_status = NFSERR_STALE; } else { - memset((char *) &uid, 0, sizeof(int)); - uid = *(u_int *) argp->fh_data; + (void)memcpy(&uid, argp->fh_data, sizeof(uid)); if (plt_search(uid) != (uid2home_t *) NULL) { res.ns_status = NFS_OK; un_fattr.na_fileid = uid; @@ -282,8 +281,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, } else { /* entry found and gid is permitted */ un_fattr.na_fileid = untab[idx].uid; res.dr_u.dr_drok_u.drok_attributes = un_fattr; - memset((char *) &un_fhandle, 0, sizeof(am_nfs_fh)); - *(u_int *) un_fhandle.fh_data = (u_int) untab[idx].uid; + memset(&un_fhandle, 0, sizeof(un_fhandle)); + memcpy(un_fhandle.fh_data, &untab[idx].uid, sizeof(untab[idx].uid)); xstrlcpy((char *) &un_fhandle.fh_data[sizeof(int)], untab[idx].username, sizeof(am_nfs_fh) - sizeof(int)); @@ -338,8 +337,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, } if (groupid == hlfs_gid) { - memset((char *) &userid, 0, sizeof(int)); - userid = *(u_int *) argp->fh_data; + memcpy(&userid, argp->fh_data, sizeof(userid)); username = (char *) &argp->fh_data[sizeof(int)]; if (!(res.rlr_u.rlr_data_u = mailbox(userid, username))) return (nfsreadlinkres *) NULL; Modified: user/dchagin/lemul/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- user/dchagin/lemul/contrib/elftoolchain/elfcopy/main.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/elftoolchain/elfcopy/main.c Sat Jan 31 11:24:26 2015 (r277967) @@ -210,7 +210,7 @@ static struct { }; static int copy_from_tempfile(const char *src, const char *dst, - int infd, int *outfd); + int infd, int *outfd, int in_place); static void create_file(struct elfcopy *ecp, const char *src, const char *dst); static void elfcopy_main(struct elfcopy *ecp, int argc, char **argv); @@ -523,33 +523,39 @@ create_tempfile(char **fn, int *fd) #undef _TEMPFILEPATH } +/* + * Copy temporary file with path src and file descriptor infd to path dst. + * If in_place is set act as if editing the file in place, avoiding rename() + * to preserve hard and symbolic links. Output file remains open, with file + * descriptor returned in outfd. + */ static int -copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd) +copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd, + int in_place) { int tmpfd; /* * First, check if we can use rename(). */ - if (rename(src, dst) >= 0) { - *outfd = infd; - return (0); - } else if (errno != EXDEV) - return (-1); - - /* - * If the rename() failed due to 'src' and 'dst' residing in - * two different file systems, invoke a helper function in - * libelftc to do the copy. - */ - - if (unlink(dst) < 0) - return (-1); + if (in_place == 0) { + if (rename(src, dst) >= 0) { + *outfd = infd; + return (0); + } else if (errno != EXDEV) + return (-1); + + /* + * If the rename() failed due to 'src' and 'dst' residing in + * two different file systems, invoke a helper function in + * libelftc to do the copy. + */ - if ((tmpfd = open(dst, O_CREAT | O_WRONLY, 0755)) < 0) - return (-1); + if (unlink(dst) < 0) + return (-1); + } - if (lseek(infd, 0, SEEK_SET) < 0) + if ((tmpfd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, 0755)) < 0) return (-1); if (elftc_copyfile(infd, tmpfd) < 0) @@ -578,6 +584,7 @@ create_file(struct elfcopy *ecp, const c struct stat sb; char *tempfile, *elftemp; int efd, ifd, ofd, ofd0, tfd; + int in_place; tempfile = NULL; @@ -718,10 +725,15 @@ copy_done: #endif if (tempfile != NULL) { - if (dst == NULL) + in_place = 0; + if (dst == NULL) { dst = src; + if (lstat(dst, &sb) != -1 && + (sb.st_nlink > 1 || S_ISLNK(sb.st_mode))) + in_place = 1; + } - if (copy_from_tempfile(tempfile, dst, ofd, &tfd) < 0) + if (copy_from_tempfile(tempfile, dst, ofd, &tfd, in_place) < 0) err(EXIT_FAILURE, "creation of %s failed", dst); free(tempfile); Modified: user/dchagin/lemul/contrib/gdb/gdb/corelow.c ============================================================================== --- user/dchagin/lemul/contrib/gdb/gdb/corelow.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/gdb/gdb/corelow.c Sat Jan 31 11:24:26 2015 (r277967) @@ -432,15 +432,16 @@ get_core_register_section (char *name, char *human_name, int required) { - char section_name[100]; + static char *section_name = NULL; struct bfd_section *section; bfd_size_type size; char *contents; + xfree (section_name); if (PIDGET (inferior_ptid)) - sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid)); + section_name = xstrprintf ("%s/%d", name, PIDGET (inferior_ptid)); else - strcpy (section_name, name); + section_name = xstrdup (name); section = bfd_get_section_by_name (core_bfd, section_name); if (! section) Modified: user/dchagin/lemul/contrib/gdb/gdb/dwarf2expr.c ============================================================================== --- user/dchagin/lemul/contrib/gdb/gdb/dwarf2expr.c Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/gdb/gdb/dwarf2expr.c Sat Jan 31 11:24:26 2015 (r277967) @@ -575,6 +575,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_div: binop = BINOP_DIV; + break; case DW_OP_minus: binop = BINOP_SUB; break; @@ -595,6 +596,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_shr: binop = BINOP_RSH; + break; case DW_OP_shra: binop = BINOP_RSH; val1 = value_from_longest (signed_address_type (), first); Modified: user/dchagin/lemul/contrib/libcxxrt/stdexcept.cc ============================================================================== --- user/dchagin/lemul/contrib/libcxxrt/stdexcept.cc Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/libcxxrt/stdexcept.cc Sat Jan 31 11:24:26 2015 (r277967) @@ -82,19 +82,14 @@ const char* bad_typeid::what() const thr return "std::bad_typeid"; } -__attribute__((weak)) bad_array_new_length::bad_array_new_length() throw() {} -__attribute__((weak)) bad_array_new_length::~bad_array_new_length() {} -__attribute__((weak)) bad_array_new_length::bad_array_new_length(const bad_array_new_length&) throw() {} -__attribute__((weak)) bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) throw() { return *this; } -__attribute__((weak)) const char* bad_array_new_length::what() const throw() { return "std::bad_array_new_length"; Modified: user/dchagin/lemul/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp ============================================================================== --- user/dchagin/lemul/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Sat Jan 31 11:04:41 2015 (r277966) +++ user/dchagin/lemul/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp Sat Jan 31 11:24:26 2015 (r277967) @@ -33,6 +33,10 @@ using namespace llvm; #define GET_REGINFO_TARGET_DESC #include "AArch64GenRegisterInfo.inc" +static cl::opt<bool> +ReserveX18("aarch64-reserve-x18", cl::Hidden, + cl::desc("Reserve X18, making it unavailable as GPR")); + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, const AArch64Subtarget *sti) : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} @@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(con Reserved.set(AArch64::W29); } - if (STI->isTargetDarwin()) { + if (STI->isTargetDarwin() || ReserveX18) { Reserved.set(AArch64::X18); // Platform register Reserved.set(AArch64::W18); } @@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg( return true; case AArch64::X18: case AArch64::W18: - return STI->isTargetDarwin(); + return STI->isTargetDarwin() || ReserveX18; case AArch64::FP: case AArch64::W29: return TFI->hasFP(MF) || STI->isTargetDarwin(); @@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPres case AArch64::GPR64commonRegClassID: return 32 - 1 // XZR/SP - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP - - STI->isTargetDarwin() // X18 reserved as platform register + - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register - hasBasePointer(MF); // X19 case AArch64::FPR8RegClassID: case AArch64::FPR16RegClassID: Copied: user/dchagin/lemul/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff (from r277966, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/dchagin/lemul/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff Sat Jan 31 11:24:26 2015 (r277967, copy of r277966, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) @@ -0,0 +1,83 @@ +Pull in r226664 from upstream llvm trunk (by Tim Northover): + + AArch64: add backend option to reserve x18 (platform register) + + AAPCS64 says that it's up to the platform to specify whether x18 is + reserved, and a first step on that way is to add a flag controlling + it. + + From: Andrew Turner <andrew@fubar.geek.nz> + +Introduced here: http://svnweb.freebsd.org/changeset/base/277774 + +Index: lib/Target/AArch64/AArch64RegisterInfo.cpp +=================================================================== +--- lib/Target/AArch64/AArch64RegisterInfo.cpp ++++ lib/Target/AArch64/AArch64RegisterInfo.cpp +@@ -33,6 +33,10 @@ using namespace llvm; + #define GET_REGINFO_TARGET_DESC + #include "AArch64GenRegisterInfo.inc" + ++static cl::opt<bool> ++ReserveX18("aarch64-reserve-x18", cl::Hidden, ++ cl::desc("Reserve X18, making it unavailable as GPR")); ++ + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, + const AArch64Subtarget *sti) + : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} +@@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(const Machine + Reserved.set(AArch64::W29); + } + +- if (STI->isTargetDarwin()) { ++ if (STI->isTargetDarwin() || ReserveX18) { + Reserved.set(AArch64::X18); // Platform register + Reserved.set(AArch64::W18); + } +@@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg(const Mach + return true; + case AArch64::X18: + case AArch64::W18: +- return STI->isTargetDarwin(); ++ return STI->isTargetDarwin() || ReserveX18; + case AArch64::FP: + case AArch64::W29: + return TFI->hasFP(MF) || STI->isTargetDarwin(); +@@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPressureLimit( + case AArch64::GPR64commonRegClassID: + return 32 - 1 // XZR/SP + - (TFI->hasFP(MF) || STI->isTargetDarwin()) // FP +- - STI->isTargetDarwin() // X18 reserved as platform register ++ - (STI->isTargetDarwin() || ReserveX18) // X18 reserved as platform register + - hasBasePointer(MF); // X19 + case AArch64::FPR8RegClassID: + case AArch64::FPR16RegClassID: +Index: test/CodeGen/AArch64/arm64-platform-reg.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-platform-reg.ll ++++ test/CodeGen/AArch64/arm64-platform-reg.ll +@@ -1,4 +1,5 @@ +-; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-DARWIN ++; RUN: llc -mtriple=arm64-apple-ios -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 ++; RUN: llc -mtriple=arm64-freebsd-gnu -aarch64-reserve-x18 -o - %s | FileCheck %s --check-prefix=CHECK-RESERVE-X18 + ; RUN: llc -mtriple=arm64-linux-gnu -o - %s | FileCheck %s + + ; x18 is reserved as a platform register on Darwin but not on other +@@ -16,11 +17,11 @@ define void @keep_live() { + ; CHECK: ldr x18 + ; CHECK: str x18 + +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: Spill +-; CHECK-DARWIN-NOT: ldr fp +-; CHECK-DARWIN-NOT: ldr x18 +-; CHECK-DARWIN: ret ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: Spill ++; CHECK-RESERVE-X18-NOT: ldr fp ++; CHECK-RESERVE-X18-NOT: ldr x18 ++; CHECK-RESERVE-X18: ret + ret void + } Copied: user/dchagin/lemul/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff (from r277966, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/dchagin/lemul/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Sat Jan 31 11:24:26 2015 (r277967, copy of r277966, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff) @@ -0,0 +1,54 @@ +Pull in r227062 from upstream clang trunk (by Renato Golin): + + Allows Clang to use LLVM's fixes-x18 option + + This patch allows clang to have llvm reserve the x18 + platform register on AArch64. FreeBSD will use this in the kernel for + per-cpu data but has no need to reserve this register in userland so + will need this flag to reserve it. + + This uses llvm r226664 to allow this register to be reserved. + + Patch by Andrew Turner. + +Introduced here: http://svnweb.freebsd.org/changeset/base/277775 + +Index: tools/clang/include/clang/Driver/Options.td +=================================================================== +--- tools/clang/include/clang/Driver/Options.td ++++ tools/clang/include/clang/Driver/Options.td +@@ -1141,6 +1141,9 @@ def mno_long_calls : Flag<["-"], "mno-long-calls"> + def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>, + HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; + ++def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>, ++ HelpText<"Reserve the x18 register (AArch64 only)">; ++ + def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>; + def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>; + def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>; +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -887,6 +887,11 @@ void Clang::AddAArch64TargetArgs(const ArgList &Ar + if (A->getOption().matches(options::OPT_mno_global_merge)) + CmdArgs.push_back("-mno-global-merge"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501311124.t0VBOSL5003769>