Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Feb 2014 18:06:01 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262613 - in head: contrib/compiler-rt/lib contrib/gcc contrib/llvm/include/llvm/MC contrib/llvm/include/llvm/Object contrib/llvm/include/llvm/Support contrib/llvm/lib/CodeGen/AsmPrinte...
Message-ID:  <201402281806.s1SI610U010791@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Feb 28 18:06:00 2014
New Revision: 262613
URL: http://svnweb.freebsd.org/changeset/base/262613

Log:
  Merge the projects/clang-sparc64 branch back to head.  This brings in
  several updates from the llvm and clang trunks to make the sparc64
  backend fully functional.
  
  Apart from one patch to sys/sparc64/include/pcpu.h which is still under
  discussion, this makes it possible to let clang fully build world and
  kernel for sparc64.
  
  Any assistance with testing this on actual sparc64 hardware is greatly
  appreciated, as there will unavoidably be bugs left.
  
  Many thanks go to Roman Divacky for his upstream work on getting the
  sparc64 backend into shape.
  
  MFC after:	1 month

Added:
  head/contrib/llvm/lib/Target/Sparc/AsmParser/
     - copied from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/AsmParser/
  head/contrib/llvm/lib/Target/Sparc/Disassembler/
     - copied from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/Disassembler/
  head/contrib/llvm/lib/Target/Sparc/InstPrinter/
     - copied from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/InstPrinter/
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td
  head/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/SparcTargetObjectFile.h
  head/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h
     - copied unchanged from r262612, projects/clang-sparc64/contrib/llvm/lib/Target/Sparc/SparcTargetStreamer.h
  head/lib/clang/include/SparcGenAsmMatcher.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenAsmMatcher.inc
  head/lib/clang/include/SparcGenAsmWriter.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenAsmWriter.inc
  head/lib/clang/include/SparcGenCallingConv.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenCallingConv.inc
  head/lib/clang/include/SparcGenCodeEmitter.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenCodeEmitter.inc
  head/lib/clang/include/SparcGenDAGISel.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenDAGISel.inc
  head/lib/clang/include/SparcGenDisassemblerTables.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenDisassemblerTables.inc
  head/lib/clang/include/SparcGenInstrInfo.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenInstrInfo.inc
  head/lib/clang/include/SparcGenMCCodeEmitter.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenMCCodeEmitter.inc
  head/lib/clang/include/SparcGenRegisterInfo.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenRegisterInfo.inc
  head/lib/clang/include/SparcGenSubtargetInfo.inc
     - copied unchanged from r262612, projects/clang-sparc64/lib/clang/include/SparcGenSubtargetInfo.inc
  head/lib/clang/libllvmsparcasmparser/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparcasmparser/
  head/lib/clang/libllvmsparccodegen/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparccodegen/
  head/lib/clang/libllvmsparcdesc/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparcdesc/
  head/lib/clang/libllvmsparcdisassembler/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparcdisassembler/
  head/lib/clang/libllvmsparcinfo/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparcinfo/
  head/lib/clang/libllvmsparcinstprinter/
     - copied from r262612, projects/clang-sparc64/lib/clang/libllvmsparcinstprinter/
Modified:
  head/contrib/compiler-rt/lib/absvti2.c
  head/contrib/compiler-rt/lib/addvti3.c
  head/contrib/compiler-rt/lib/ashlti3.c
  head/contrib/compiler-rt/lib/ashrti3.c
  head/contrib/compiler-rt/lib/clzti2.c
  head/contrib/compiler-rt/lib/cmpti2.c
  head/contrib/compiler-rt/lib/ctzti2.c
  head/contrib/compiler-rt/lib/divti3.c
  head/contrib/compiler-rt/lib/ffsti2.c
  head/contrib/compiler-rt/lib/fixdfti.c
  head/contrib/compiler-rt/lib/fixsfti.c
  head/contrib/compiler-rt/lib/fixunsdfti.c
  head/contrib/compiler-rt/lib/fixunssfti.c
  head/contrib/compiler-rt/lib/fixunsxfti.c
  head/contrib/compiler-rt/lib/fixxfti.c
  head/contrib/compiler-rt/lib/floattidf.c
  head/contrib/compiler-rt/lib/floattisf.c
  head/contrib/compiler-rt/lib/floattixf.c
  head/contrib/compiler-rt/lib/floatuntidf.c
  head/contrib/compiler-rt/lib/floatuntisf.c
  head/contrib/compiler-rt/lib/floatuntixf.c
  head/contrib/compiler-rt/lib/int_types.h
  head/contrib/compiler-rt/lib/lshrti3.c
  head/contrib/compiler-rt/lib/modti3.c
  head/contrib/compiler-rt/lib/muloti4.c
  head/contrib/compiler-rt/lib/multi3.c
  head/contrib/compiler-rt/lib/mulvti3.c
  head/contrib/compiler-rt/lib/negti2.c
  head/contrib/compiler-rt/lib/negvti2.c
  head/contrib/compiler-rt/lib/parityti2.c
  head/contrib/compiler-rt/lib/popcountti2.c
  head/contrib/compiler-rt/lib/subvti3.c
  head/contrib/compiler-rt/lib/ucmpti2.c
  head/contrib/compiler-rt/lib/udivmodti4.c
  head/contrib/compiler-rt/lib/udivti3.c
  head/contrib/compiler-rt/lib/umodti3.c
  head/contrib/gcc/longlong.h
  head/contrib/llvm/include/llvm/MC/MCAsmInfo.h
  head/contrib/llvm/include/llvm/Object/ELFObjectFile.h
  head/contrib/llvm/include/llvm/Support/ELF.h
  head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
  head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp
  head/contrib/llvm/lib/Object/ELF.cpp
  head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp
  head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp
  head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h
  head/contrib/llvm/lib/Target/Sparc/Sparc.h
  head/contrib/llvm/lib/Target/Sparc/Sparc.td
  head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcCallingConv.td
  head/contrib/llvm/lib/Target/Sparc/SparcCodeEmitter.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h
  head/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td
  head/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td
  head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td
  head/contrib/llvm/lib/Target/Sparc/SparcJITInfo.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcRelocations.h
  head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp
  head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h
  head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp
  head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
  head/lib/clang/Makefile
  head/lib/clang/clang.build.mk
  head/lib/clang/include/llvm/Config/AsmParsers.def
  head/lib/clang/include/llvm/Config/AsmPrinters.def
  head/lib/clang/include/llvm/Config/Disassemblers.def
  head/lib/clang/include/llvm/Config/Targets.def
  head/lib/libc/sparc64/sys/__sparc_utrap_setup.c
  head/lib/msun/Makefile
  head/lib/msun/ld128/s_expl.c
  head/share/mk/bsd.sys.mk
  head/sys/boot/sparc64/boot1/Makefile
  head/sys/conf/kern.mk
  head/sys/dev/esp/esp_sbus.c
  head/sys/dev/fb/creator.c
  head/sys/dev/fb/machfb.c
  head/sys/dev/mk48txx/mk48txx.c
  head/sys/kern/kern_malloc.c
  head/sys/sparc64/conf/GENERIC
  head/sys/sparc64/isa/isa.c
  head/sys/sparc64/pci/firereg.h
  head/usr.bin/clang/clang/Makefile
  head/usr.bin/clang/llc/Makefile
  head/usr.bin/clang/llvm-mc/Makefile
  head/usr.bin/clang/llvm-objdump/Makefile
  head/usr.bin/clang/llvm-rtdyld/Makefile
  head/usr.bin/clang/opt/Makefile
  head/usr.sbin/eeprom/ofw_options.c
Directory Properties:
  head/   (props changed)
  head/cddl/   (props changed)
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)
  head/contrib/compiler-rt/   (props changed)
  head/contrib/gcc/   (props changed)
  head/contrib/llvm/   (props changed)
  head/contrib/llvm/tools/clang/   (props changed)
  head/contrib/llvm/tools/lldb/   (props changed)
  head/contrib/openpam/   (props changed)
  head/contrib/serf/   (props changed)
  head/etc/   (props changed)
  head/lib/libc/   (props changed)
  head/lib/libvmmapi/   (props changed)
  head/sbin/   (props changed)
  head/share/man/man4/   (props changed)
  head/sys/   (props changed)
  head/sys/amd64/include/vmm.h   (props changed)
  head/sys/amd64/include/vmm_dev.h   (props changed)
  head/sys/amd64/vmm/   (props changed)
  head/sys/boot/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)
  head/sys/conf/   (props changed)
  head/sys/gnu/dts/   (props changed)
  head/usr.sbin/bhyve/   (props changed)
  head/usr.sbin/bhyveload/   (props changed)

Modified: head/contrib/compiler-rt/lib/absvti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/absvti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/absvti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: absolute value */
 
@@ -30,4 +30,5 @@ __absvti2(ti_int a)
     return (a ^ s) - s;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */
+

Modified: head/contrib/compiler-rt/lib/addvti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/addvti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/addvti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a + b */
 
@@ -37,4 +37,4 @@ __addvti3(ti_int a, ti_int b)
     return s;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/ashlti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/ashlti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/ashlti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a << b */
 
@@ -42,4 +42,4 @@ __ashlti3(ti_int a, si_int b)
     return result.all;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/ashrti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/ashrti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/ashrti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: arithmetic a >> b */
 
@@ -43,4 +43,4 @@ __ashrti3(ti_int a, si_int b)
     return result.all;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/clzti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/clzti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/clzti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: the number of leading 0-bits */
 
@@ -30,4 +30,4 @@ __clzti2(ti_int a)
            ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/cmpti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/cmpti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/cmpti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns:  if (a <  b) returns 0
  *           if (a == b) returns 1
@@ -39,4 +39,4 @@ __cmpti2(ti_int a, ti_int b)
     return 1;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/ctzti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/ctzti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/ctzti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: the number of trailing 0-bits */
 
@@ -30,4 +30,4 @@ __ctzti2(ti_int a)
               ((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/divti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/divti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/divti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
 
@@ -32,4 +32,4 @@ __divti3(ti_int a, ti_int b)
     return (__udivmodti4(a, b, (tu_int*)0) ^ s_a) - s_a;  /* negate if s_a == -1 */
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/ffsti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/ffsti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/ffsti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* 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.
@@ -34,4 +34,4 @@ __ffsti2(ti_int a)
     return __builtin_ctzll(x.s.low) + 1;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixdfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixdfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixdfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a signed long long, rounding toward zero. */
 
@@ -42,4 +42,4 @@ __fixdfti(double a)
     return (r ^ s) - s;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixsfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixsfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixsfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a signed long long, rounding toward zero. */
 
@@ -42,4 +42,4 @@ __fixsfti(float a)
     return (r ^ s) - s;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixunsdfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixunsdfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixunsdfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a unsigned long long, rounding toward zero.
  *          Negative values all become zero.
@@ -44,4 +44,4 @@ __fixunsdfti(double a)
     return r;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixunssfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixunssfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixunssfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a unsigned long long, rounding toward zero.
  *          Negative values all become zero.
@@ -44,4 +44,4 @@ __fixunssfti(float a)
     return r;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixunsxfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixunsxfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixunsxfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a unsigned long long, rounding toward zero.
  *          Negative values all become zero.
@@ -46,4 +46,4 @@ __fixunsxfti(long double a)
     return r;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/fixxfti.c
==============================================================================
--- head/contrib/compiler-rt/lib/fixxfti.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/fixxfti.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a signed long long, rounding toward zero. */
 
@@ -44,4 +44,4 @@ __fixxfti(long double a)
     return (r ^ s) - s;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floattidf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floattidf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floattidf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a double, rounding toward even.*/
 
@@ -82,4 +82,4 @@ __floattidf(ti_int a)
     return fb.f;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floattisf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floattisf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floattisf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a float, rounding toward even. */
 
@@ -81,4 +81,4 @@ __floattisf(ti_int a)
     return fb.f;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floattixf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floattixf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floattixf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a long double, rounding toward even. */
 
@@ -47,7 +47,7 @@ __floattixf(ti_int a)
          *  P = bit LDBL_MANT_DIG-1 bits to the right of 1
          *  Q = bit LDBL_MANT_DIG bits to the right of 1
          *  R = "or" of all bits to the right of Q
-	      */
+         */
         switch (sd)
         {
         case LDBL_MANT_DIG + 1:
@@ -83,4 +83,4 @@ __floattixf(ti_int a)
     return fb.f;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floatuntidf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floatuntidf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floatuntidf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a double, rounding toward even. */
 
@@ -43,7 +43,7 @@ __floatuntidf(tu_int a)
          *  P = bit DBL_MANT_DIG-1 bits to the right of 1
          *  Q = bit DBL_MANT_DIG bits to the right of 1
          *  R = "or" of all bits to the right of Q
-	 */
+         */
         switch (sd)
         {
         case DBL_MANT_DIG + 1:
@@ -79,4 +79,4 @@ __floatuntidf(tu_int a)
     return fb.f;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floatuntisf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floatuntisf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floatuntisf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a float, rounding toward even. */
 
@@ -78,4 +78,4 @@ __floatuntisf(tu_int a)
     return fb.f;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/floatuntixf.c
==============================================================================
--- head/contrib/compiler-rt/lib/floatuntixf.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/floatuntixf.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: convert a to a long double, rounding toward even. */
 

Modified: head/contrib/compiler-rt/lib/int_types.h
==============================================================================
--- head/contrib/compiler-rt/lib/int_types.h	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/int_types.h	Fri Feb 28 18:06:00 2014	(r262613)
@@ -56,8 +56,11 @@ typedef union
     }s;
 } udwords;
 
-#if __x86_64
+#if __LP64__
+#define CRT_HAS_128BIT
+#endif
 
+#ifdef CRT_HAS_128BIT
 typedef int      ti_int __attribute__ ((mode (TI)));
 typedef unsigned tu_int __attribute__ ((mode (TI)));
 
@@ -105,7 +108,7 @@ static inline tu_int make_tu(du_int h, d
     return r.all;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
 
 typedef union
 {

Modified: head/contrib/compiler-rt/lib/lshrti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/lshrti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/lshrti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: logical a >> b */
 
@@ -42,4 +42,4 @@ __lshrti3(ti_int a, si_int b)
     return result.all;
 }
 
-#endif /* __x86_64 */ 
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/modti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/modti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/modti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
 
@@ -33,4 +33,4 @@ __modti3(ti_int a, ti_int b)
     return (r ^ s) - s;                /* negate if s == -1 */
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/muloti4.c
==============================================================================
--- head/contrib/compiler-rt/lib/muloti4.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/muloti4.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a * b */
 
@@ -59,4 +59,4 @@ __muloti4(ti_int a, ti_int b, int* overf
     return result;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/multi3.c
==============================================================================
--- head/contrib/compiler-rt/lib/multi3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/multi3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a * b */
 
@@ -55,4 +55,4 @@ __multi3(ti_int a, ti_int b)
     return r.all;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/mulvti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/mulvti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/mulvti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a * b */
 
@@ -57,4 +57,4 @@ __mulvti3(ti_int a, ti_int b)
     return a * b;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/negti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/negti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/negti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: -a */
 
@@ -27,4 +27,4 @@ __negti2(ti_int a)
     return -a;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/negvti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/negvti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/negvti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: -a */
 
@@ -29,4 +29,4 @@ __negvti2(ti_int a)
     return -a;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/parityti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/parityti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/parityti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: 1 if number of bits is odd else returns 0 */
 
@@ -28,4 +28,4 @@ __parityti2(ti_int a)
     return __paritydi2(x.s.high ^ x.s.low);
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/popcountti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/popcountti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/popcountti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: count of 1 bits */
 
@@ -41,4 +41,4 @@ __popcountti2(ti_int a)
     return (x + (x >> 8)) & 0xFF;  /* (8 significant bits) */
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/subvti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/subvti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/subvti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns: a - b */
 
@@ -37,4 +37,4 @@ __subvti3(ti_int a, ti_int b)
     return s;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/ucmpti2.c
==============================================================================
--- head/contrib/compiler-rt/lib/ucmpti2.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/ucmpti2.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Returns:  if (a <  b) returns 0
  *           if (a == b) returns 1
@@ -39,4 +39,4 @@ __ucmpti2(tu_int a, tu_int b)
     return 1;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/udivmodti4.c
==============================================================================
--- head/contrib/compiler-rt/lib/udivmodti4.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/udivmodti4.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 /* Effects: if rem != 0, *rem = a % b 
  * Returns: a / b 
@@ -253,4 +253,4 @@ __udivmodti4(tu_int a, tu_int b, tu_int*
     return q.all;
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/udivti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/udivti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/udivti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
 
@@ -26,4 +26,4 @@ __udivti3(tu_int a, tu_int b)
     return __udivmodti4(a, b, 0);
 }
 
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/compiler-rt/lib/umodti3.c
==============================================================================
--- head/contrib/compiler-rt/lib/umodti3.c	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/compiler-rt/lib/umodti3.c	Fri Feb 28 18:06:00 2014	(r262613)
@@ -14,7 +14,7 @@
 
 #include "int_lib.h"
 
-#if __x86_64
+#ifdef CRT_HAS_128BIT
 
 tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
 
@@ -28,4 +28,4 @@ __umodti3(tu_int a, tu_int b)
     return r;
 }
 
-#endif
+#endif /* CRT_HAS_128BIT */

Modified: head/contrib/gcc/longlong.h
==============================================================================
--- head/contrib/gcc/longlong.h	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/gcc/longlong.h	Fri Feb 28 18:06:00 2014	(r262613)
@@ -1086,8 +1086,8 @@ UDItype __umulsidi3 (USItype, USItype);
    	   "bcs,a,pn %%xcc, 1f\n\t"					\
    	   "add %0, 1, %0\n"						\
 	   "1:"								\
-	   : "=r" ((UDItype)(sh)),				      	\
-	     "=&r" ((UDItype)(sl))				      	\
+	   : "=r" (sh),						      	\
+	     "=&r" (sl)						      	\
 	   : "%rJ" ((UDItype)(ah)),				     	\
 	     "rI" ((UDItype)(bh)),				      	\
 	     "%rJ" ((UDItype)(al)),				     	\
@@ -1100,8 +1100,8 @@ UDItype __umulsidi3 (USItype, USItype);
    	   "bcs,a,pn %%xcc, 1f\n\t"					\
    	   "sub %0, 1, %0\n\t"						\
 	   "1:"								\
-	   : "=r" ((UDItype)(sh)),				      	\
-	     "=&r" ((UDItype)(sl))				      	\
+	   : "=r" (sh),						      	\
+	     "=&r" (sl)						      	\
 	   : "rJ" ((UDItype)(ah)),				     	\
 	     "rI" ((UDItype)(bh)),				      	\
 	     "rJ" ((UDItype)(al)),				     	\
@@ -1133,8 +1133,8 @@ UDItype __umulsidi3 (USItype, USItype);
 		   "sllx %3,32,%3\n\t"					\
 		   "add %1,%3,%1\n\t"					\
 		   "add %5,%2,%0"					\
-	   : "=r" ((UDItype)(wh)),					\
-	     "=&r" ((UDItype)(wl)),					\
+	   : "=r" (wh),							\
+	     "=&r" (wl),						\
 	     "=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3), "=&r" (tmp4)	\
 	   : "r" ((UDItype)(u)),					\
 	     "r" ((UDItype)(v))						\

Modified: head/contrib/llvm/include/llvm/MC/MCAsmInfo.h
==============================================================================
--- head/contrib/llvm/include/llvm/MC/MCAsmInfo.h	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/include/llvm/MC/MCAsmInfo.h	Fri Feb 28 18:06:00 2014	(r262613)
@@ -371,7 +371,7 @@ namespace llvm {
                                 unsigned Encoding,
                                 MCStreamer &Streamer) const;
 
-    const MCExpr *
+    virtual const MCExpr *
     getExprForFDESymbol(const MCSymbol *Sym,
                         unsigned Encoding,
                         MCStreamer &Streamer) const;

Modified: head/contrib/llvm/include/llvm/Object/ELFObjectFile.h
==============================================================================
--- head/contrib/llvm/include/llvm/Object/ELFObjectFile.h	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/include/llvm/Object/ELFObjectFile.h	Fri Feb 28 18:06:00 2014	(r262613)
@@ -922,6 +922,9 @@ StringRef ELFObjectFile<ELFT>::getFileFo
       return "ELF32-mips";
     case ELF::EM_PPC:
       return "ELF32-ppc";
+    case ELF::EM_SPARC:
+    case ELF::EM_SPARC32PLUS:
+      return "ELF32-sparc";
     default:
       return "ELF32-unknown";
     }
@@ -937,6 +940,8 @@ StringRef ELFObjectFile<ELFT>::getFileFo
       return "ELF64-ppc64";
     case ELF::EM_S390:
       return "ELF64-s390";
+    case ELF::EM_SPARCV9:
+      return "ELF64-sparc";
     default:
       return "ELF64-unknown";
     }
@@ -967,6 +972,13 @@ unsigned ELFObjectFile<ELFT>::getArch() 
                                                        : Triple::ppc64;
   case ELF::EM_S390:
     return Triple::systemz;
+
+  case ELF::EM_SPARC:
+  case ELF::EM_SPARC32PLUS:
+    return Triple::sparc;
+  case ELF::EM_SPARCV9:
+    return Triple::sparcv9;
+
   default:
     return Triple::UnknownArch;
   }

Modified: head/contrib/llvm/include/llvm/Support/ELF.h
==============================================================================
--- head/contrib/llvm/include/llvm/Support/ELF.h	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/include/llvm/Support/ELF.h	Fri Feb 28 18:06:00 2014	(r262613)
@@ -1087,6 +1087,94 @@ enum {
   R_390_IRELATIVE   = 61
 };
 
+// ELF Relocation type for Sparc.
+enum {
+  R_SPARC_NONE        = 0,
+  R_SPARC_8           = 1,
+  R_SPARC_16          = 2,
+  R_SPARC_32          = 3,
+  R_SPARC_DISP8       = 4,
+  R_SPARC_DISP16      = 5,
+  R_SPARC_DISP32      = 6,
+  R_SPARC_WDISP30     = 7,
+  R_SPARC_WDISP22     = 8,
+  R_SPARC_HI22        = 9,
+  R_SPARC_22          = 10,
+  R_SPARC_13          = 11,
+  R_SPARC_LO10        = 12,
+  R_SPARC_GOT10       = 13,
+  R_SPARC_GOT13       = 14,
+  R_SPARC_GOT22       = 15,
+  R_SPARC_PC10        = 16,
+  R_SPARC_PC22        = 17,
+  R_SPARC_WPLT30      = 18,
+  R_SPARC_COPY        = 19,
+  R_SPARC_GLOB_DAT    = 20,
+  R_SPARC_JMP_SLOT    = 21,
+  R_SPARC_RELATIVE    = 22,
+  R_SPARC_UA32        = 23,
+  R_SPARC_PLT32       = 24,
+  R_SPARC_HIPLT22     = 25,
+  R_SPARC_LOPLT10     = 26,
+  R_SPARC_PCPLT32     = 27,
+  R_SPARC_PCPLT22     = 28,
+  R_SPARC_PCPLT10     = 29,
+  R_SPARC_10          = 30,
+  R_SPARC_11          = 31,
+  R_SPARC_64          = 32,
+  R_SPARC_OLO10       = 33,
+  R_SPARC_HH22        = 34,
+  R_SPARC_HM10        = 35,
+  R_SPARC_LM22        = 36,
+  R_SPARC_PC_HH22     = 37,
+  R_SPARC_PC_HM10     = 38,
+  R_SPARC_PC_LM22     = 39,
+  R_SPARC_WDISP16     = 40,
+  R_SPARC_WDISP19     = 41,
+  R_SPARC_7           = 43,
+  R_SPARC_5           = 44,
+  R_SPARC_6           = 45,
+  R_SPARC_DISP64      = 46,
+  R_SPARC_PLT64       = 47,
+  R_SPARC_HIX22       = 48,
+  R_SPARC_LOX10       = 49,
+  R_SPARC_H44         = 50,
+  R_SPARC_M44         = 51,
+  R_SPARC_L44         = 52,
+  R_SPARC_REGISTER    = 53,
+  R_SPARC_UA64        = 54,
+  R_SPARC_UA16        = 55,
+  R_SPARC_TLS_GD_HI22   = 56,
+  R_SPARC_TLS_GD_LO10   = 57,
+  R_SPARC_TLS_GD_ADD    = 58,
+  R_SPARC_TLS_GD_CALL   = 59,
+  R_SPARC_TLS_LDM_HI22  = 60,
+  R_SPARC_TLS_LDM_LO10  = 61,
+  R_SPARC_TLS_LDM_ADD   = 62,
+  R_SPARC_TLS_LDM_CALL  = 63,
+  R_SPARC_TLS_LDO_HIX22 = 64,
+  R_SPARC_TLS_LDO_LOX10 = 65,
+  R_SPARC_TLS_LDO_ADD   = 66,
+  R_SPARC_TLS_IE_HI22   = 67,
+  R_SPARC_TLS_IE_LO10   = 68,
+  R_SPARC_TLS_IE_LD     = 69,
+  R_SPARC_TLS_IE_LDX    = 70,
+  R_SPARC_TLS_IE_ADD    = 71,
+  R_SPARC_TLS_LE_HIX22  = 72,
+  R_SPARC_TLS_LE_LOX10  = 73,
+  R_SPARC_TLS_DTPMOD32  = 74,
+  R_SPARC_TLS_DTPMOD64  = 75,
+  R_SPARC_TLS_DTPOFF32  = 76,
+  R_SPARC_TLS_DTPOFF64  = 77,
+  R_SPARC_TLS_TPOFF32   = 78,
+  R_SPARC_TLS_TPOFF64   = 79,
+  R_SPARC_GOTDATA_HIX22 = 80,
+  R_SPARC_GOTDATA_LOX22 = 81,
+  R_SPARC_GOTDATA_OP_HIX22 = 82,
+  R_SPARC_GOTDATA_OP_LOX22 = 83,
+  R_SPARC_GOTDATA_OP    = 84
+};
+
 // Section header.
 struct Elf32_Shdr {
   Elf32_Word sh_name;      // Section name (index into string table)

Modified: head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
==============================================================================
--- head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp	Fri Feb 28 18:06:00 2014	(r262613)
@@ -23,6 +23,7 @@
 #include "llvm/CodeGen/MachineConstantPool.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/MachineInstrBundle.h"
 #include "llvm/CodeGen/MachineJumpTableInfo.h"
 #include "llvm/CodeGen/MachineLoopInfo.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
@@ -2221,14 +2222,13 @@ isBlockOnlyReachableByFallthrough(const 
     if (!MI.isBranch() || MI.isIndirectBranch())
       return false;
 
-    // If we are the operands of one of the branches, this is not
-    // a fall through.
-    for (MachineInstr::mop_iterator OI = MI.operands_begin(),
-           OE = MI.operands_end(); OI != OE; ++OI) {
-      const MachineOperand& OP = *OI;
-      if (OP.isJTI())
+    // If we are the operands of one of the branches, this is not a fall
+    // through. Note that targets with delay slots will usually bundle
+    // terminators with the delay slot instruction.
+    for (ConstMIBundleOperands OP(&MI); OP.isValid(); ++OP) {
+      if (OP->isJTI())
         return false;
-      if (OP.isMBB() && OP.getMBB() == MBB)
+      if (OP->isMBB() && OP->getMBB() == MBB)
         return false;
     }
   }

Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
==============================================================================
--- head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp	Fri Feb 28 18:06:00 2014	(r262613)
@@ -220,10 +220,19 @@ void InstrEmitter::CreateVirtualRegister
     unsigned VRBase = 0;
     const TargetRegisterClass *RC =
       TRI->getAllocatableClass(TII->getRegClass(II, i, TRI, *MF));
-    // If the register class is unknown for the given definition, then try to
-    // infer one from the value type.
-    if (!RC && i < NumResults)
-      RC = TLI->getRegClassFor(Node->getSimpleValueType(i));
+    // Always let the value type influence the used register class. The
+    // constraints on the instruction may be too lax to represent the value
+    // type correctly. For example, a 64-bit float (X86::FR64) can't live in
+    // the 32-bit float super-class (X86::FR32).
+    if (i < NumResults && TLI->isTypeLegal(Node->getSimpleValueType(i))) {
+      const TargetRegisterClass *VTRC =
+        TLI->getRegClassFor(Node->getSimpleValueType(i));
+      if (RC)
+        VTRC = TRI->getCommonSubClass(RC, VTRC);
+      if (VTRC)
+        RC = VTRC;
+    }
+
     if (II.OpInfo[i].isOptionalDef()) {
       // Optional def must be a physical register.
       unsigned NumResults = CountResults(Node);

Modified: head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp
==============================================================================
--- head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp	Fri Feb 28 18:06:00 2014	(r262613)
@@ -310,6 +310,33 @@ void MCObjectFileInfo::InitELFMCObjectFi
     FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_udata8;
     TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
       dwarf::DW_EH_PE_udata8;
+  } else if (T.getArch() == Triple::sparc) {
+    if (RelocM == Reloc::PIC_) {
+      LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+      PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+        dwarf::DW_EH_PE_sdata4;
+      FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+      TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+        dwarf::DW_EH_PE_sdata4;
+    } else {
+      LSDAEncoding = dwarf::DW_EH_PE_absptr;
+      PersonalityEncoding = dwarf::DW_EH_PE_absptr;
+      FDEEncoding = dwarf::DW_EH_PE_udata4;
+      TTypeEncoding = dwarf::DW_EH_PE_absptr;
+    }
+  } else if (T.getArch() == Triple::sparcv9) {
+    LSDAEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+    if (RelocM == Reloc::PIC_) {
+      PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+        dwarf::DW_EH_PE_sdata4;
+      FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
+      TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+        dwarf::DW_EH_PE_sdata4;
+    } else {
+      PersonalityEncoding = dwarf::DW_EH_PE_absptr;
+      FDEEncoding = dwarf::DW_EH_PE_udata4;
+      TTypeEncoding = dwarf::DW_EH_PE_absptr;
+    }
   } else if (T.getArch() == Triple::systemz) {
     // All currently-defined code models guarantee that 4-byte PC-relative
     // values will be in range.

Modified: head/contrib/llvm/lib/Object/ELF.cpp
==============================================================================
--- head/contrib/llvm/lib/Object/ELF.cpp	Fri Feb 28 17:46:56 2014	(r262612)
+++ head/contrib/llvm/lib/Object/ELF.cpp	Fri Feb 28 18:06:00 2014	(r262613)
@@ -702,6 +702,98 @@ StringRef getELFRelocationTypeName(uint3
       break;
     }
     break;
+  case ELF::EM_SPARC:
+  case ELF::EM_SPARC32PLUS:
+  case ELF::EM_SPARCV9:
+    switch (Type) {
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_NONE);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_8);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP8);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP30);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HI22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_13);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LO10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT13);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOT22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WPLT30);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_COPY);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GLOB_DAT);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_JMP_SLOT);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_RELATIVE);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIPLT22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOPLT10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PCPLT10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_11);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_OLO10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HH22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HM10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LM22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HH22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_HM10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PC_LM22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_WDISP19);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_7);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_5);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_6);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_DISP64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_PLT64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_HIX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_LOX10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_H44);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_M44);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_L44);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_REGISTER);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_UA16);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_HI22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_LO10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_ADD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_GD_CALL);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_HI22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_LO10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_ADD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDM_CALL);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_HIX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_LOX10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LDO_ADD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_HI22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LO10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_LDX);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_IE_ADD);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_HIX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_LE_LOX10);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPMOD64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_DTPOFF64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF32);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_TLS_TPOFF64);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_HIX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_LOX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_HIX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP_LOX22);
+      LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_SPARC_GOTDATA_OP);
+    default:
+      break;
+    }

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



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