Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2012 03:01:39 +0000 (UTC)
From:      Davide Italiano <davide@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r239166 - in projects/calloutng: contrib/compiler-rt contrib/compiler-rt/lib contrib/compiler-rt/lib/arm etc/devd include/gssapi lib/libc/gen lib/libpam/modules/pam_krb5 lib/libpam/modu...
Message-ID:  <201208100301.q7A31dmL084191@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davide
Date: Fri Aug 10 03:01:39 2012
New Revision: 239166
URL: http://svn.freebsd.org/changeset/base/239166

Log:
  MFC as per r239165.

Added:
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_idivmod.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcmp.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcpy.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memmove.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memset.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memset.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
  projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
  projects/calloutng/contrib/compiler-rt/lib/atomic.c
     - copied unchanged from r239165, head/contrib/compiler-rt/lib/atomic.c
  projects/calloutng/sys/boot/common/part.c
     - copied unchanged from r239165, head/sys/boot/common/part.c
  projects/calloutng/sys/boot/common/part.h
     - copied unchanged from r239165, head/sys/boot/common/part.h
  projects/calloutng/sys/powerpc/powermac/nvbl.c
     - copied unchanged from r239165, head/sys/powerpc/powermac/nvbl.c
  projects/calloutng/tools/regression/lib/libc/gen/test-ftw.c
     - copied unchanged from r239165, head/tools/regression/lib/libc/gen/test-ftw.c
  projects/calloutng/tools/tools/bootparttest/
     - copied from r239165, head/tools/tools/bootparttest/
Modified:
  projects/calloutng/contrib/compiler-rt/LICENSE.TXT
  projects/calloutng/contrib/compiler-rt/lib/absvti2.c
  projects/calloutng/contrib/compiler-rt/lib/adddf3.c
  projects/calloutng/contrib/compiler-rt/lib/addsf3.c
  projects/calloutng/contrib/compiler-rt/lib/addvti3.c
  projects/calloutng/contrib/compiler-rt/lib/ashldi3.c
  projects/calloutng/contrib/compiler-rt/lib/ashlti3.c
  projects/calloutng/contrib/compiler-rt/lib/ashrdi3.c
  projects/calloutng/contrib/compiler-rt/lib/ashrti3.c
  projects/calloutng/contrib/compiler-rt/lib/assembly.h
  projects/calloutng/contrib/compiler-rt/lib/clzti2.c
  projects/calloutng/contrib/compiler-rt/lib/cmpti2.c
  projects/calloutng/contrib/compiler-rt/lib/ctzti2.c
  projects/calloutng/contrib/compiler-rt/lib/divdf3.c
  projects/calloutng/contrib/compiler-rt/lib/divmoddi4.c
  projects/calloutng/contrib/compiler-rt/lib/divsf3.c
  projects/calloutng/contrib/compiler-rt/lib/divsi3.c
  projects/calloutng/contrib/compiler-rt/lib/divti3.c
  projects/calloutng/contrib/compiler-rt/lib/extendsfdf2.c
  projects/calloutng/contrib/compiler-rt/lib/ffsti2.c
  projects/calloutng/contrib/compiler-rt/lib/fixdfdi.c
  projects/calloutng/contrib/compiler-rt/lib/fixdfsi.c
  projects/calloutng/contrib/compiler-rt/lib/fixdfti.c
  projects/calloutng/contrib/compiler-rt/lib/fixsfdi.c
  projects/calloutng/contrib/compiler-rt/lib/fixsfsi.c
  projects/calloutng/contrib/compiler-rt/lib/fixsfti.c
  projects/calloutng/contrib/compiler-rt/lib/fixunsdfdi.c
  projects/calloutng/contrib/compiler-rt/lib/fixunsdfsi.c
  projects/calloutng/contrib/compiler-rt/lib/fixunsdfti.c
  projects/calloutng/contrib/compiler-rt/lib/fixunssfdi.c
  projects/calloutng/contrib/compiler-rt/lib/fixunssfsi.c
  projects/calloutng/contrib/compiler-rt/lib/fixunssfti.c
  projects/calloutng/contrib/compiler-rt/lib/fixunsxfti.c
  projects/calloutng/contrib/compiler-rt/lib/fixxfti.c
  projects/calloutng/contrib/compiler-rt/lib/floatdidf.c
  projects/calloutng/contrib/compiler-rt/lib/floatdisf.c
  projects/calloutng/contrib/compiler-rt/lib/floatsidf.c
  projects/calloutng/contrib/compiler-rt/lib/floatsisf.c
  projects/calloutng/contrib/compiler-rt/lib/floattidf.c
  projects/calloutng/contrib/compiler-rt/lib/floattisf.c
  projects/calloutng/contrib/compiler-rt/lib/floattixf.c
  projects/calloutng/contrib/compiler-rt/lib/floatundidf.c
  projects/calloutng/contrib/compiler-rt/lib/floatundisf.c
  projects/calloutng/contrib/compiler-rt/lib/floatunsidf.c
  projects/calloutng/contrib/compiler-rt/lib/floatunsisf.c
  projects/calloutng/contrib/compiler-rt/lib/floatuntidf.c
  projects/calloutng/contrib/compiler-rt/lib/floatuntisf.c
  projects/calloutng/contrib/compiler-rt/lib/floatuntixf.c
  projects/calloutng/contrib/compiler-rt/lib/fp_lib.h
  projects/calloutng/contrib/compiler-rt/lib/int_endianness.h
  projects/calloutng/contrib/compiler-rt/lib/int_util.c
  projects/calloutng/contrib/compiler-rt/lib/int_util.h
  projects/calloutng/contrib/compiler-rt/lib/lshrdi3.c
  projects/calloutng/contrib/compiler-rt/lib/lshrti3.c
  projects/calloutng/contrib/compiler-rt/lib/modti3.c
  projects/calloutng/contrib/compiler-rt/lib/muldf3.c
  projects/calloutng/contrib/compiler-rt/lib/muldi3.c
  projects/calloutng/contrib/compiler-rt/lib/muloti4.c
  projects/calloutng/contrib/compiler-rt/lib/mulsf3.c
  projects/calloutng/contrib/compiler-rt/lib/multi3.c
  projects/calloutng/contrib/compiler-rt/lib/mulvti3.c
  projects/calloutng/contrib/compiler-rt/lib/negdf2.c
  projects/calloutng/contrib/compiler-rt/lib/negsf2.c
  projects/calloutng/contrib/compiler-rt/lib/negti2.c
  projects/calloutng/contrib/compiler-rt/lib/negvti2.c
  projects/calloutng/contrib/compiler-rt/lib/parityti2.c
  projects/calloutng/contrib/compiler-rt/lib/popcountti2.c
  projects/calloutng/contrib/compiler-rt/lib/powitf2.c
  projects/calloutng/contrib/compiler-rt/lib/subdf3.c
  projects/calloutng/contrib/compiler-rt/lib/subsf3.c
  projects/calloutng/contrib/compiler-rt/lib/subvti3.c
  projects/calloutng/contrib/compiler-rt/lib/truncdfsf2.c
  projects/calloutng/contrib/compiler-rt/lib/ucmpti2.c
  projects/calloutng/contrib/compiler-rt/lib/udivmoddi4.c
  projects/calloutng/contrib/compiler-rt/lib/udivmodti4.c
  projects/calloutng/contrib/compiler-rt/lib/udivsi3.c
  projects/calloutng/contrib/compiler-rt/lib/udivti3.c
  projects/calloutng/contrib/compiler-rt/lib/umodti3.c
  projects/calloutng/etc/devd/usb.conf
  projects/calloutng/include/gssapi/gssapi.h
  projects/calloutng/lib/libc/gen/ftw.c
  projects/calloutng/lib/libc/gen/nftw.c
  projects/calloutng/lib/libpam/modules/pam_krb5/pam_krb5.c
  projects/calloutng/lib/libpam/modules/pam_unix/pam_unix.c
  projects/calloutng/libexec/rtld-elf/arm/rtld_start.S
  projects/calloutng/libexec/rtld-elf/map_object.c
  projects/calloutng/sbin/camcontrol/camcontrol.c
  projects/calloutng/sbin/geom/class/virstor/gvirstor.8
  projects/calloutng/sbin/ggate/shared/ggate.h
  projects/calloutng/share/examples/kld/dyn_sysctl/dyn_sysctl.c
  projects/calloutng/share/man/man4/hptiop.4
  projects/calloutng/share/man/man4/polling.4
  projects/calloutng/share/man/man4/umodem.4
  projects/calloutng/share/man/man4/uslcom.4
  projects/calloutng/share/man/man5/rc.conf.5
  projects/calloutng/sys/amd64/amd64/elf_machdep.c
  projects/calloutng/sys/amd64/amd64/initcpu.c
  projects/calloutng/sys/amd64/amd64/pmap.c
  projects/calloutng/sys/arm/arm/bcopyinout.S
  projects/calloutng/sys/arm/arm/bcopyinout_xscale.S
  projects/calloutng/sys/arm/arm/exception.S
  projects/calloutng/sys/arm/arm/pmap.c
  projects/calloutng/sys/boot/common/Makefile.inc
  projects/calloutng/sys/boot/common/disk.c
  projects/calloutng/sys/boot/common/disk.h
  projects/calloutng/sys/boot/i386/libi386/Makefile
  projects/calloutng/sys/boot/i386/libi386/biosdisk.c
  projects/calloutng/sys/boot/i386/libi386/devicename.c
  projects/calloutng/sys/boot/i386/libi386/libi386.h
  projects/calloutng/sys/boot/i386/loader/Makefile
  projects/calloutng/sys/boot/i386/loader/main.c
  projects/calloutng/sys/boot/i386/pmbr/pmbr.s
  projects/calloutng/sys/boot/pc98/boot2/boot2.c
  projects/calloutng/sys/boot/pc98/btx/btxldr/btxldr.S
  projects/calloutng/sys/boot/pc98/btx/lib/btxcsu.S
  projects/calloutng/sys/boot/pc98/cdboot/cdboot.S
  projects/calloutng/sys/boot/pc98/libpc98/Makefile
  projects/calloutng/sys/boot/userboot/test/test.c
  projects/calloutng/sys/boot/userboot/userboot.h
  projects/calloutng/sys/boot/userboot/userboot/Makefile
  projects/calloutng/sys/boot/userboot/userboot/bootinfo32.c
  projects/calloutng/sys/boot/userboot/userboot/copy.c
  projects/calloutng/sys/boot/userboot/userboot/devicename.c
  projects/calloutng/sys/boot/userboot/userboot/main.c
  projects/calloutng/sys/boot/userboot/userboot/userboot_disk.c
  projects/calloutng/sys/boot/zfs/zfs.c
  projects/calloutng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  projects/calloutng/sys/conf/files.powerpc
  projects/calloutng/sys/conf/kern.post.mk
  projects/calloutng/sys/dev/agp/agp.c
  projects/calloutng/sys/dev/agp/agp_i810.c
  projects/calloutng/sys/dev/aic7xxx/aic79xx_osm.c
  projects/calloutng/sys/dev/aic7xxx/aic_osm_lib.c
  projects/calloutng/sys/dev/ath/ah_osdep.h
  projects/calloutng/sys/dev/ath/ath_hal/ah.h
  projects/calloutng/sys/dev/ath/ath_hal/ah_devid.h
  projects/calloutng/sys/dev/ath/ath_hal/ar5210/ar5210.h
  projects/calloutng/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c
  projects/calloutng/sys/dev/ath/ath_hal/ar5211/ar5211.h
  projects/calloutng/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c
  projects/calloutng/sys/dev/ath/ath_hal/ar5212/ar5212.h
  projects/calloutng/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c
  projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416.h
  projects/calloutng/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
  projects/calloutng/sys/dev/ath/if_ath_beacon.c
  projects/calloutng/sys/dev/ath/if_ath_rx.c
  projects/calloutng/sys/dev/ath/if_ath_rx_edma.c
  projects/calloutng/sys/dev/ath/if_ath_tx.c
  projects/calloutng/sys/dev/ath/if_athvar.h
  projects/calloutng/sys/dev/bce/if_bce.c
  projects/calloutng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
  projects/calloutng/sys/dev/cxgbe/firmware/t4fw_interface.h
  projects/calloutng/sys/dev/e1000/if_igb.c
  projects/calloutng/sys/dev/esp/ncr53c9x.c
  projects/calloutng/sys/dev/hptiop/hptiop.c
  projects/calloutng/sys/dev/ipmi/ipmi.c
  projects/calloutng/sys/dev/ipmi/ipmivars.h
  projects/calloutng/sys/dev/isp/isp_freebsd.c
  projects/calloutng/sys/dev/isp/isp_freebsd.h
  projects/calloutng/sys/dev/isp/isp_sbus.c
  projects/calloutng/sys/dev/md/md.c
  projects/calloutng/sys/dev/netmap/netmap.c
  projects/calloutng/sys/dev/netmap/netmap_kern.h
  projects/calloutng/sys/dev/pci/pci_pci.c
  projects/calloutng/sys/dev/puc/pucdata.c
  projects/calloutng/sys/dev/usb/serial/uftdi.c
  projects/calloutng/sys/dev/usb/serial/uftdi_reg.h
  projects/calloutng/sys/dev/usb/serial/uslcom.c
  projects/calloutng/sys/dev/usb/usbdevs
  projects/calloutng/sys/fs/nfs/nfs_commonport.c
  projects/calloutng/sys/fs/nfsclient/nfs_clbio.c
  projects/calloutng/sys/fs/nwfs/nwfs_io.c
  projects/calloutng/sys/fs/smbfs/smbfs_io.c
  projects/calloutng/sys/fs/tmpfs/tmpfs_subr.c
  projects/calloutng/sys/fs/tmpfs/tmpfs_vnops.c
  projects/calloutng/sys/geom/gate/g_gate.c
  projects/calloutng/sys/geom/geom_io.c
  projects/calloutng/sys/geom/virstor/g_virstor.c
  projects/calloutng/sys/ia64/ia64/pmap.c
  projects/calloutng/sys/kern/kern_intr.c
  projects/calloutng/sys/kern/kern_proc.c
  projects/calloutng/sys/kern/sched_4bsd.c
  projects/calloutng/sys/kern/sched_ule.c
  projects/calloutng/sys/kern/subr_uio.c
  projects/calloutng/sys/kern/sys_process.c
  projects/calloutng/sys/kern/uipc_syscalls.c
  projects/calloutng/sys/mips/include/pmap.h
  projects/calloutng/sys/mips/mips/pmap.c
  projects/calloutng/sys/mips/mips/trap.c
  projects/calloutng/sys/net/bpf_zerocopy.c
  projects/calloutng/sys/net80211/ieee80211.h
  projects/calloutng/sys/netinet/ip_dummynet.h
  projects/calloutng/sys/netinet/ipfw/dummynet.txt
  projects/calloutng/sys/netinet/ipfw/ip_dn_io.c
  projects/calloutng/sys/netinet/ipfw/ip_fw_log.c
  projects/calloutng/sys/netinet/sctp_bsd_addr.c
  projects/calloutng/sys/netinet/sctp_input.c
  projects/calloutng/sys/netinet/sctp_pcb.c
  projects/calloutng/sys/netinet/tcp_timer.c
  projects/calloutng/sys/nfsclient/nfs_bio.c
  projects/calloutng/sys/ofed/include/linux/gfp.h
  projects/calloutng/sys/powerpc/conf/GENERIC
  projects/calloutng/sys/powerpc/conf/GENERIC64
  projects/calloutng/sys/sparc64/include/pmap.h
  projects/calloutng/sys/sparc64/sparc64/pmap.c
  projects/calloutng/sys/sys/bus.h
  projects/calloutng/sys/ufs/ffs/ffs_vnops.c
  projects/calloutng/sys/vm/device_pager.c
  projects/calloutng/sys/vm/sg_pager.c
  projects/calloutng/sys/vm/vm_page.c
  projects/calloutng/sys/vm/vm_page.h
  projects/calloutng/sys/vm/vm_pageout.c
  projects/calloutng/sys/vm/vnode_pager.c
  projects/calloutng/sys/x86/x86/busdma_machdep.c
  projects/calloutng/sys/x86/x86/tsc.c
  projects/calloutng/tools/regression/lib/libc/gen/Makefile
  projects/calloutng/tools/tools/ath/ath_prom_read/Makefile
  projects/calloutng/tools/tools/ath/athaggrstats/Makefile
  projects/calloutng/tools/tools/ath/athstats/Makefile
  projects/calloutng/tools/tools/ath/common/ah_osdep.h
  projects/calloutng/tools/tools/netmap/pkt-gen.c
  projects/calloutng/usr.bin/make/var.c
  projects/calloutng/usr.sbin/ctladm/ctladm.c
  projects/calloutng/usr.sbin/portsnap/portsnap/portsnap.8
  projects/calloutng/usr.sbin/portsnap/portsnap/portsnap.sh
Directory Properties:
  projects/calloutng/   (props changed)
  projects/calloutng/contrib/compiler-rt/   (props changed)
  projects/calloutng/lib/libc/   (props changed)
  projects/calloutng/sbin/   (props changed)
  projects/calloutng/share/man/man4/   (props changed)
  projects/calloutng/sys/   (props changed)
  projects/calloutng/sys/boot/   (props changed)
  projects/calloutng/sys/cddl/contrib/opensolaris/   (props changed)
  projects/calloutng/sys/conf/   (props changed)

Modified: projects/calloutng/contrib/compiler-rt/LICENSE.TXT
==============================================================================
--- projects/calloutng/contrib/compiler-rt/LICENSE.TXT	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/LICENSE.TXT	Fri Aug 10 03:01:39 2012	(r239166)
@@ -94,5 +94,4 @@ licenses, and/or restrictions:
 
 Program             Directory
 -------             ---------
-sysinfo             lib/asan/sysinfo
-mach_override       lib/asan/mach_override
+mach_override       lib/interception/mach_override

Modified: projects/calloutng/contrib/compiler-rt/lib/absvti2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/absvti2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/absvti2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: absolute value */
 
 /* Effects: aborts if abs(x) < 0 */

Modified: projects/calloutng/contrib/compiler-rt/lib/adddf3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/adddf3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/adddf3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -15,7 +15,7 @@
 #define DOUBLE_PRECISION
 #include "fp_lib.h"
 
-ARM_EABI_FNALIAS(dadd, adddf3);
+ARM_EABI_FNALIAS(dadd, adddf3)
 
 COMPILER_RT_ABI fp_t
 __adddf3(fp_t a, fp_t b) {
@@ -85,7 +85,7 @@ __adddf3(fp_t a, fp_t b) {
     
     // Shift the significand of b by the difference in exponents, with a sticky
     // bottom bit to get rounding correct.
-    const int align = aExponent - bExponent;
+    const unsigned int align = aExponent - bExponent;
     if (align) {
         if (align < typeWidth) {
             const bool sticky = bSignificand << (typeWidth - align);

Modified: projects/calloutng/contrib/compiler-rt/lib/addsf3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/addsf3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/addsf3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -15,7 +15,7 @@
 #define SINGLE_PRECISION
 #include "fp_lib.h"
 
-ARM_EABI_FNALIAS(fadd, addsf3);
+ARM_EABI_FNALIAS(fadd, addsf3)
 
 fp_t __addsf3(fp_t a, fp_t b) {
 
@@ -84,7 +84,7 @@ fp_t __addsf3(fp_t a, fp_t b) {
     
     // Shift the significand of b by the difference in exponents, with a sticky
     // bottom bit to get rounding correct.
-    const int align = aExponent - bExponent;
+    const unsigned int align = aExponent - bExponent;
     if (align) {
         if (align < typeWidth) {
             const bool sticky = bSignificand << (typeWidth - align);

Modified: projects/calloutng/contrib/compiler-rt/lib/addvti3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/addvti3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/addvti3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: a + b */
 
 /* Effects: aborts if a + b overflows */

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_idivmod.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_idivmod.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_idivmod.S)
@@ -0,0 +1,27 @@
+//===-- aeabi_idivmod.S - EABI idivmod implementation ---------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { int quot, int rem} __aeabi_idivmod(int numerator, int denominator) {
+//   int rem, quot;
+//   quot = __divmodsi4(numerator, denominator, &rem);
+//   return {quot, rem};
+// }
+
+        .syntax unified
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
+        push    { lr }
+        sub     sp, sp, #4
+        mov     r2, sp
+        bl      SYMBOL_NAME(__divmodsi4)
+        ldr     r1, [sp]
+        add     sp, sp, #4
+        pop     { pc }

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S)
@@ -0,0 +1,30 @@
+//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { int64_t quot, int64_t rem}
+//        __aeabi_ldivmod(int64_t numerator, int64_t denominator) {
+//   int64_t rem, quot;
+//   quot = __divmoddi4(numerator, denominator, &rem);
+//   return {quot, rem};
+// }
+
+        .syntax unified
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod)
+        push    {r11, lr}
+        sub     sp, sp, #16
+        add     r12, sp, #8
+        str     r12, [sp]
+        bl      SYMBOL_NAME(__divmoddi4)
+        ldr     r2, [sp, #8]
+        ldr     r3, [sp, #12]
+        add     sp, sp, #16
+        pop     {r11, pc}

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcmp.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcmp.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcmp.S)
@@ -0,0 +1,19 @@
+//===-- aeabi_memcmp.S - EABI memcmp implementation -----------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+//  void __aeabi_memcmp(void *dest, void *src, size_t n) { memcmp(dest, src, n); }
+
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memcmp)
+        b       memcmp
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp4, __aeabi_memcmp)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp8, __aeabi_memcmp)

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcpy.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memcpy.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_memcpy.S)
@@ -0,0 +1,19 @@
+//===-- aeabi_memcpy.S - EABI memcpy implementation -----------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+//  void __aeabi_memcpy(void *dest, void *src, size_t n) { memcpy(dest, src, n); }
+
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy)
+        b       memcpy
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy)

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memmove.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memmove.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_memmove.S)
@@ -0,0 +1,19 @@
+//===-- aeabi_memmove.S - EABI memmove implementation --------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===---------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+//  void __aeabi_memmove(void *dest, void *src, size_t n) { memmove(dest, src, n); }
+
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memmove)
+        b       memmove
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove4, __aeabi_memmove)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove8, __aeabi_memmove)

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memset.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_memset.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_memset.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_memset.S)
@@ -0,0 +1,32 @@
+//===-- aeabi_memset.S - EABI memset implementation -----------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+//  void __aeabi_memset(void *dest, size_t n, int c) { memset(dest, c, n); }
+//  void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }
+
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memset)
+        mov     r3, r1
+        mov     r1, r2
+        mov     r2, r3
+        b       memset
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset4, __aeabi_memset)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset8, __aeabi_memset)
+        
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memclr)
+        mov     r2, r1
+        mov     r1, #0
+        b       memset
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr)
+

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S)
@@ -0,0 +1,28 @@
+//===-- aeabi_uidivmod.S - EABI uidivmod implementation -------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { unsigned quot, unsigned rem}
+//        __aeabi_uidivmod(unsigned numerator, unsigned denominator) {
+//   unsigned rem, quot;
+//   quot = __udivmodsi4(numerator, denominator, &rem);
+//   return {quot, rem};
+// }
+
+        .syntax unified
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
+        push    { lr }
+        sub     sp, sp, #4
+        mov     r2, sp
+        bl      SYMBOL_NAME(__udivmodsi4)
+        ldr     r1, [sp]
+        add     sp, sp, #4
+        pop     { pc }

Copied: projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S (from r239165, head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S)
@@ -0,0 +1,30 @@
+//===-- aeabi_uldivmod.S - EABI uldivmod implementation -------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { uint64_t quot, uint64_t rem}
+//        __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) {
+//   uint64_t rem, quot;
+//   quot = __udivmoddi4(numerator, denominator, &rem);
+//   return {quot, rem};
+// }
+
+        .syntax unified
+        .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod)
+        push	{r11, lr}
+        sub	sp, sp, #16
+        add	r12, sp, #8
+        str	r12, [sp]
+        bl	SYMBOL_NAME(__udivmoddi4)
+        ldr	r2, [sp, #8]
+        ldr	r3, [sp, #12]
+        add	sp, sp, #16
+        pop	{r11, pc}
\ No newline at end of file

Modified: projects/calloutng/contrib/compiler-rt/lib/ashldi3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ashldi3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ashldi3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -18,7 +18,7 @@
 
 /* Precondition:  0 <= b < bits_in_dword */
 
-ARM_EABI_FNALIAS(llsl, ashldi3);
+ARM_EABI_FNALIAS(llsl, ashldi3)
 
 COMPILER_RT_ABI di_int
 __ashldi3(di_int a, si_int b)

Modified: projects/calloutng/contrib/compiler-rt/lib/ashlti3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ashlti3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ashlti3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: a << b */
 
 /* Precondition:  0 <= b < bits_in_tword */

Modified: projects/calloutng/contrib/compiler-rt/lib/ashrdi3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ashrdi3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ashrdi3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -18,7 +18,7 @@
 
 /* Precondition:  0 <= b < bits_in_dword */
 
-ARM_EABI_FNALIAS(lasr, ashrdi3);
+ARM_EABI_FNALIAS(lasr, ashrdi3)
 
 COMPILER_RT_ABI di_int
 __ashrdi3(di_int a, si_int b)

Modified: projects/calloutng/contrib/compiler-rt/lib/ashrti3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ashrti3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ashrti3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: arithmetic a >> b */
 
 /* Precondition:  0 <= b < bits_in_tword */

Modified: projects/calloutng/contrib/compiler-rt/lib/assembly.h
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/assembly.h	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/assembly.h	Fri Aug 10 03:01:39 2012	(r239166)
@@ -25,9 +25,11 @@
 #if defined(__APPLE__)
 #define HIDDEN_DIRECTIVE .private_extern
 #define LOCAL_LABEL(name) L_##name
+#define FILE_LEVEL_DIRECTIVE  .subsections_via_symbols
 #else
 #define HIDDEN_DIRECTIVE .hidden
 #define LOCAL_LABEL(name) .L_##name
+#define FILE_LEVEL_DIRECTIVE  
 #endif
 
 #define GLUE2(a, b) a ## b
@@ -42,6 +44,7 @@
 #endif
 
 #define DEFINE_COMPILERRT_FUNCTION(name)                   \
+  FILE_LEVEL_DIRECTIVE     SEPARATOR                       \
   .globl SYMBOL_NAME(name) SEPARATOR                       \
   DECLARE_SYMBOL_VISIBILITY(name)                          \
   SYMBOL_NAME(name):

Copied: projects/calloutng/contrib/compiler-rt/lib/atomic.c (from r239165, head/contrib/compiler-rt/lib/atomic.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/calloutng/contrib/compiler-rt/lib/atomic.c	Fri Aug 10 03:01:39 2012	(r239166, copy of r239165, head/contrib/compiler-rt/lib/atomic.c)
@@ -0,0 +1,315 @@
+/*===-- atomic.c - Implement support functions for atomic operations.------===
+ *
+ *                     The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===
+ *
+ *  atomic.c defines a set of functions for performing atomic accesses on
+ *  arbitrary-sized memory locations.  This design uses locks that should
+ *  be fast in the uncontended case, for two reasons:
+ * 
+ *  1) This code must work with C programs that do not link to anything
+ *     (including pthreads) and so it should not depend on any pthread
+ *     functions.
+ *  2) Atomic operations, rather than explicit mutexes, are most commonly used
+ *     on code where contended operations are rate.
+ * 
+ *  To avoid needing a per-object lock, this code allocates an array of
+ *  locks and hashes the object pointers to find the one that it should use.
+ *  For operations that must be atomic on two locations, the lower lock is
+ *  always acquired first, to avoid deadlock.
+ *
+ *===----------------------------------------------------------------------===
+ */
+
+#include <stdint.h>
+#include <string.h>
+
+// Clang objects if you redefine a builtin.  This little hack allows us to
+// define a function with the same name as an intrinsic.
+#pragma redefine_extname __atomic_load_c __atomic_load
+#pragma redefine_extname __atomic_store_c __atomic_store
+#pragma redefine_extname __atomic_exchange_c __atomic_exchange
+#pragma redefine_extname __atomic_compare_exchange_c __atomic_compare_exchange
+
+/// Number of locks.  This allocates one page on 32-bit platforms, two on
+/// 64-bit.  This can be specified externally if a different trade between
+/// memory usage and contention probability is required for a given platform.
+#ifndef SPINLOCK_COUNT
+#define SPINLOCK_COUNT (1<<10)
+#endif
+static const long SPINLOCK_MASK = SPINLOCK_COUNT - 1;
+
+////////////////////////////////////////////////////////////////////////////////
+// Platform-specific lock implementation.  Falls back to spinlocks if none is
+// defined.  Each platform should define the Lock type, and corresponding
+// lock() and unlock() functions.
+////////////////////////////////////////////////////////////////////////////////
+#ifdef __FreeBSD__
+#include <errno.h>
+#include <sys/types.h>
+#include <machine/atomic.h>
+#include <sys/umtx.h>
+typedef struct _usem Lock;
+inline static void unlock(Lock *l) {
+  __c11_atomic_store((_Atomic(uint32_t)*)&l->_count, 1, __ATOMIC_RELEASE);
+  __c11_atomic_thread_fence(__ATOMIC_SEQ_CST);
+  if (l->_has_waiters)
+      _umtx_op(l, UMTX_OP_SEM_WAKE, 1, 0, 0);
+}
+inline static void lock(Lock *l) {
+  uint32_t old = 1;
+  while (!__c11_atomic_compare_exchange_weak((_Atomic(uint32_t)*)&l->_count, &old,
+        0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) {
+    _umtx_op(l, UMTX_OP_SEM_WAIT, 0, 0, 0);
+    old = 1;
+  }
+}
+/// locks for atomic operations
+static Lock locks[SPINLOCK_COUNT] = { [0 ...  SPINLOCK_COUNT-1] = {0,1,0} };
+#else
+typedef _Atomic(uintptr_t) Lock;
+/// Unlock a lock.  This is a release operation.
+inline static void unlock(Lock *l) {
+  __c11_atomic_store(l, 0, __ATOMIC_RELEASE);
+}
+/// Locks a lock.  In the current implementation, this is potentially
+/// unbounded in the contended case.
+inline static void lock(Lock *l) {
+  uintptr_t old = 0;
+  while (!__c11_atomic_compare_exchange_weak(l, &old, 1, __ATOMIC_ACQUIRE,
+        __ATOMIC_RELAXED))
+    old = 0;
+}
+/// locks for atomic operations
+static Lock locks[SPINLOCK_COUNT];
+#endif
+
+
+/// Returns a lock to use for a given pointer.  
+static inline Lock *lock_for_pointer(void *ptr) {
+  intptr_t hash = (intptr_t)ptr;
+  // Disregard the lowest 4 bits.  We want all values that may be part of the
+  // same memory operation to hash to the same value and therefore use the same
+  // lock.  
+  hash >>= 4;
+  // Use the next bits as the basis for the hash
+  intptr_t low = hash & SPINLOCK_MASK;
+  // Now use the high(er) set of bits to perturb the hash, so that we don't
+  // get collisions from atomic fields in a single object
+  hash >>= 16;
+  hash ^= low;
+  // Return a pointer to the word to use
+  return locks + (hash & SPINLOCK_MASK);
+}
+
+/// Macros for determining whether a size is lock free.  Clang can not yet
+/// codegen __atomic_is_lock_free(16), so for now we assume 16-byte values are
+/// not lock free.
+#define IS_LOCK_FREE_1 __c11_atomic_is_lock_free(1)
+#define IS_LOCK_FREE_2 __c11_atomic_is_lock_free(2)
+#define IS_LOCK_FREE_4 __c11_atomic_is_lock_free(4)
+#define IS_LOCK_FREE_8 __c11_atomic_is_lock_free(8)
+#define IS_LOCK_FREE_16 0
+
+/// Macro that calls the compiler-generated lock-free versions of functions
+/// when they exist.
+#define LOCK_FREE_CASES() \
+  do {\
+  switch (size) {\
+    case 2:\
+      if (IS_LOCK_FREE_2) {\
+        LOCK_FREE_ACTION(uint16_t);\
+      }\
+    case 4:\
+      if (IS_LOCK_FREE_4) {\
+        LOCK_FREE_ACTION(uint32_t);\
+      }\
+    case 8:\
+      if (IS_LOCK_FREE_8) {\
+        LOCK_FREE_ACTION(uint64_t);\
+      }\
+    case 16:\
+      if (IS_LOCK_FREE_16) {\
+        /* FIXME: __uint128_t isn't available on 32 bit platforms.
+        LOCK_FREE_ACTION(__uint128_t);*/\
+      }\
+  }\
+  } while (0)
+
+
+/// An atomic load operation.  This is atomic with respect to the source
+/// pointer only.
+void __atomic_load_c(int size, void *src, void *dest, int model) {
+#define LOCK_FREE_ACTION(type) \
+    *((type*)dest) = __c11_atomic_load((_Atomic(type)*)src, model);\
+    return;
+  LOCK_FREE_CASES();
+#undef LOCK_FREE_ACTION
+  Lock *l = lock_for_pointer(src);
+  lock(l);
+  memcpy(dest, src, size);
+  unlock(l);
+}
+
+/// An atomic store operation.  This is atomic with respect to the destination
+/// pointer only.
+void __atomic_store_c(int size, void *dest, void *src, int model) {
+#define LOCK_FREE_ACTION(type) \
+    __c11_atomic_store((_Atomic(type)*)dest, *(type*)dest, model);\
+    return;
+  LOCK_FREE_CASES();
+#undef LOCK_FREE_ACTION
+  Lock *l = lock_for_pointer(dest);
+  lock(l);
+  memcpy(dest, src, size);
+  unlock(l);
+}
+
+/// Atomic compare and exchange operation.  If the value at *ptr is identical
+/// to the value at *expected, then this copies value at *desired to *ptr.  If
+/// they  are not, then this stores the current value from *ptr in *expected.
+///
+/// This function returns 1 if the exchange takes place or 0 if it fails. 
+int __atomic_compare_exchange_c(int size, void *ptr, void *expected,
+    void *desired, int success, int failure) {
+#define LOCK_FREE_ACTION(type) \
+  return __c11_atomic_compare_exchange_strong((_Atomic(type)*)ptr, (type*)expected,\
+      *(type*)desired, success, failure)
+  LOCK_FREE_CASES();
+#undef LOCK_FREE_ACTION
+  Lock *l = lock_for_pointer(ptr);
+  lock(l);
+  if (memcmp(ptr, expected, size) == 0) {
+    memcpy(ptr, desired, size);
+    unlock(l);
+    return 1;
+  }
+  memcpy(expected, ptr, size);
+  unlock(l);
+  return 0;
+}
+
+/// Performs an atomic exchange operation between two pointers.  This is atomic
+/// with respect to the target address.
+void __atomic_exchange_c(int size, void *ptr, void *val, void *old, int model) {
+#define LOCK_FREE_ACTION(type) \
+    *(type*)old = __c11_atomic_exchange((_Atomic(type)*)ptr, *(type*)val,\
+        model);\
+    return;
+  LOCK_FREE_CASES();
+#undef LOCK_FREE_ACTION
+  Lock *l = lock_for_pointer(ptr);
+  lock(l);
+  memcpy(old, ptr, size);
+  memcpy(ptr, val, size);
+  unlock(l);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Where the size is known at compile time, the compiler may emit calls to
+// specialised versions of the above functions.
+////////////////////////////////////////////////////////////////////////////////
+#define OPTIMISED_CASES\
+  OPTIMISED_CASE(1, IS_LOCK_FREE_1, uint8_t)\
+  OPTIMISED_CASE(2, IS_LOCK_FREE_2, uint16_t)\
+  OPTIMISED_CASE(4, IS_LOCK_FREE_4, uint32_t)\
+  OPTIMISED_CASE(8, IS_LOCK_FREE_8, uint64_t)\
+  /* FIXME: __uint128_t isn't available on 32 bit platforms.
+  OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)*/\
+
+#define OPTIMISED_CASE(n, lockfree, type)\
+type __atomic_load_##n(type *src, int model) {\
+  if (lockfree)\
+    return __c11_atomic_load((_Atomic(type)*)src, model);\
+  Lock *l = lock_for_pointer(src);\
+  lock(l);\
+  type val = *src;\
+  unlock(l);\
+  return val;\
+}
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+
+#define OPTIMISED_CASE(n, lockfree, type)\
+void  __atomic_store_##n(type *dest, type val, int model) {\
+  if (lockfree) {\
+    __c11_atomic_store((_Atomic(type)*)dest, val, model);\
+    return;\
+  }\
+  Lock *l = lock_for_pointer(dest);\
+  lock(l);\
+  *dest = val;\
+  unlock(l);\
+  return;\
+}
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+
+#define OPTIMISED_CASE(n, lockfree, type)\
+type __atomic_exchange_##n(type *dest, type val, int model) {\
+  if (lockfree)\
+    return __c11_atomic_exchange((_Atomic(type)*)dest, val, model);\
+  Lock *l = lock_for_pointer(dest);\
+  lock(l);\
+  type tmp = *dest;\
+  *dest = val;\
+  unlock(l);\
+  return tmp;\
+}
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+
+#define OPTIMISED_CASE(n, lockfree, type)\
+int __atomic_compare_exchange_##n(type *ptr, type *expected, type desired,\
+    int success, int failure) {\
+  if (lockfree)\
+    return __c11_atomic_compare_exchange_strong((_Atomic(type)*)ptr, expected, desired,\
+        success, failure);\
+  Lock *l = lock_for_pointer(ptr);\
+  lock(l);\
+  if (*ptr == *expected) {\
+    *ptr = desired;\
+    unlock(l);\
+    return 1;\
+  }\
+  *expected = *ptr;\
+  unlock(l);\
+  return 0;\
+}
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+
+////////////////////////////////////////////////////////////////////////////////
+// Atomic read-modify-write operations for integers of various sizes.
+////////////////////////////////////////////////////////////////////////////////
+#define ATOMIC_RMW(n, lockfree, type, opname, op) \
+type __atomic_fetch_##opname##_##n(type *ptr, type val, int model) {\
+  if (lockfree) \
+    return __c11_atomic_fetch_##opname((_Atomic(type)*)ptr, val, model);\
+  Lock *l = lock_for_pointer(ptr);\
+  lock(l);\
+  type tmp = *ptr;\
+  *ptr = tmp op val;\
+  unlock(l);\
+  return tmp;\
+}
+
+#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, add, +)
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, sub, -)
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, and, &)
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, or, |)
+OPTIMISED_CASES
+#undef OPTIMISED_CASE
+#define OPTIMISED_CASE(n, lockfree, type) ATOMIC_RMW(n, lockfree, type, xor, ^)
+OPTIMISED_CASES
+#undef OPTIMISED_CASE

Modified: projects/calloutng/contrib/compiler-rt/lib/clzti2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/clzti2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/clzti2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: the number of leading 0-bits */
 
 /* Precondition: a != 0 */

Modified: projects/calloutng/contrib/compiler-rt/lib/cmpti2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/cmpti2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/cmpti2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns:  if (a <  b) returns 0
  *           if (a == b) returns 1
  *           if (a >  b) returns 2

Modified: projects/calloutng/contrib/compiler-rt/lib/ctzti2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ctzti2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ctzti2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: the number of trailing 0-bits */
 
 /* Precondition: a != 0 */

Modified: projects/calloutng/contrib/compiler-rt/lib/divdf3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/divdf3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/divdf3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -19,7 +19,7 @@
 #define DOUBLE_PRECISION
 #include "fp_lib.h"
 
-ARM_EABI_FNALIAS(ddiv, divdf3);
+ARM_EABI_FNALIAS(ddiv, divdf3)
 
 fp_t __divdf3(fp_t a, fp_t b) {
     

Modified: projects/calloutng/contrib/compiler-rt/lib/divmoddi4.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/divmoddi4.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/divmoddi4.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -16,8 +16,6 @@
 
 extern COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b);
 
-ARM_EABI_FNALIAS(ldivmod, divmoddi4);
-
 /* Returns: a / b, *rem = a % b  */
 
 COMPILER_RT_ABI di_int

Modified: projects/calloutng/contrib/compiler-rt/lib/divsf3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/divsf3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/divsf3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -19,7 +19,7 @@
 #define SINGLE_PRECISION
 #include "fp_lib.h"
 
-ARM_EABI_FNALIAS(fdiv, divsf3);
+ARM_EABI_FNALIAS(fdiv, divsf3)
 
 fp_t __divsf3(fp_t a, fp_t b) {
     

Modified: projects/calloutng/contrib/compiler-rt/lib/divsi3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/divsi3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/divsi3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -18,7 +18,7 @@ su_int COMPILER_RT_ABI __udivsi3(su_int 
 
 /* Returns: a / b */
 
-ARM_EABI_FNALIAS(idiv, divsi3);
+ARM_EABI_FNALIAS(idiv, divsi3)
 
 COMPILER_RT_ABI si_int
 __divsi3(si_int a, si_int b)
@@ -29,5 +29,11 @@ __divsi3(si_int a, si_int b)
     a = (a ^ s_a) - s_a;                         /* negate if s_a == -1 */
     b = (b ^ s_b) - s_b;                         /* negate if s_b == -1 */
     s_a ^= s_b;                                  /* sign of quotient */
-    return (__udivsi3(a, b) ^ s_a) - s_a;        /* negate if s_a == -1 */
+    /*
+     * On CPUs without unsigned hardware division support,
+     *  this calls __udivsi3 (notice the cast to su_int).
+     * On CPUs with unsigned hardware division support,
+     *  this uses the unsigned division instruction.
+     */
+    return ((su_int)a/(su_int)b ^ s_a) - s_a;    /* negate if s_a == -1 */
 }

Modified: projects/calloutng/contrib/compiler-rt/lib/divti3.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/divti3.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/divti3.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
 
 /* Returns: a / b */

Modified: projects/calloutng/contrib/compiler-rt/lib/extendsfdf2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/extendsfdf2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/extendsfdf2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -66,7 +66,7 @@ static inline dst_t dstFromRep(dst_rep_t
 
 // End helper routines.  Conversion implementation follows.
 
-ARM_EABI_FNALIAS(f2d, extendsfdf2);
+ARM_EABI_FNALIAS(f2d, extendsfdf2)
 
 dst_t __extendsfdf2(src_t a) {
     

Modified: projects/calloutng/contrib/compiler-rt/lib/ffsti2.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/ffsti2.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/ffsti2.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: the index of the least significant 1-bit in a, or
  * the value zero if a is zero. The least significant bit is index one.
  */

Modified: projects/calloutng/contrib/compiler-rt/lib/fixdfdi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixdfdi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixdfdi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -23,7 +23,7 @@
 
 /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(d2lz, fixdfdi);
+ARM_EABI_FNALIAS(d2lz, fixdfdi)
 
 di_int
 __fixdfdi(double a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixdfsi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixdfsi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixdfsi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -18,7 +18,7 @@
 
 #include "int_lib.h"
 
-ARM_EABI_FNALIAS(d2iz, fixdfsi);
+ARM_EABI_FNALIAS(d2iz, fixdfsi)
 
 int __fixdfsi(fp_t a) {
     

Modified: projects/calloutng/contrib/compiler-rt/lib/fixdfti.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixdfti.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixdfti.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: convert a to a signed long long, rounding toward zero. */
 
 /* Assumption: double is a IEEE 64 bit floating point type 

Modified: projects/calloutng/contrib/compiler-rt/lib/fixsfdi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixsfdi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixsfdi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -23,7 +23,7 @@
 
 /* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(d2lz, fixsfdi);
+ARM_EABI_FNALIAS(d2lz, fixsfdi)
 
 COMPILER_RT_ABI di_int
 __fixsfdi(float a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixsfsi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixsfsi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixsfsi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -16,7 +16,7 @@
 #define SINGLE_PRECISION
 #include "fp_lib.h"
 
-ARM_EABI_FNALIAS(f2iz, fixsfsi);
+ARM_EABI_FNALIAS(f2iz, fixsfsi)
 
 COMPILER_RT_ABI int
 __fixsfsi(fp_t a) {

Modified: projects/calloutng/contrib/compiler-rt/lib/fixsfti.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixsfti.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixsfti.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: convert a to a signed long long, rounding toward zero. */
 
 /* Assumption: float is a IEEE 32 bit floating point type 

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunsdfdi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunsdfdi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunsdfdi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -26,7 +26,7 @@
 
 /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(d2ulz, fixunsdfdi);
+ARM_EABI_FNALIAS(d2ulz, fixunsdfdi)
 
 COMPILER_RT_ABI du_int
 __fixunsdfdi(double a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunsdfsi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunsdfsi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunsdfsi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -26,7 +26,7 @@
 
 /* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(d2uiz, fixunsdfsi);
+ARM_EABI_FNALIAS(d2uiz, fixunsdfsi)
 
 COMPILER_RT_ABI su_int
 __fixunsdfsi(double a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunsdfti.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunsdfti.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunsdfti.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: convert a to a unsigned long long, rounding toward zero.
  *          Negative values all become zero.
  */

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunssfdi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunssfdi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunssfdi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -25,7 +25,7 @@
 
 /* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(f2ulz, fixunssfdi);
+ARM_EABI_FNALIAS(f2ulz, fixunssfdi)
 
 COMPILER_RT_ABI du_int
 __fixunssfdi(float a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunssfsi.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunssfsi.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunssfsi.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -26,7 +26,7 @@
 
 /* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
 
-ARM_EABI_FNALIAS(f2uiz, fixunssfsi);
+ARM_EABI_FNALIAS(f2uiz, fixunssfsi)
 
 COMPILER_RT_ABI su_int
 __fixunssfsi(float a)

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunssfti.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunssfti.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunssfti.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"
 
+#if __x86_64
+
 /* Returns: convert a to a unsigned long long, rounding toward zero.
  *          Negative values all become zero.
  */

Modified: projects/calloutng/contrib/compiler-rt/lib/fixunsxfti.c
==============================================================================
--- projects/calloutng/contrib/compiler-rt/lib/fixunsxfti.c	Fri Aug 10 02:54:35 2012	(r239165)
+++ projects/calloutng/contrib/compiler-rt/lib/fixunsxfti.c	Fri Aug 10 03:01:39 2012	(r239166)
@@ -12,10 +12,10 @@
  * ===----------------------------------------------------------------------===
  */
 
-#if __x86_64
-
 #include "int_lib.h"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208100301.q7A31dmL084191>