From ce0b21596585c6ddd828c54e5077ba0aecfae8fc Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Tue, 18 Mar 2014 22:07:45 +0000
Subject: Add separate patch files for all the customizations we have currently
 applied to our copy of llvm/clang.  These can be applied in alphabetical
 order to a pristine llvm/clang 3.4 release source tree, to result in the same
 version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.

MFC after:	1 week
X-MFC-With:	r263313
---
 .../patches/patch-r262261-llvm-r199031-sparc.diff  | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff

(limited to 'contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff')

diff --git a/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff b/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff
new file mode 100644
index 0000000..5eb9549
--- /dev/null
+++ b/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff
@@ -0,0 +1,42 @@
+Pull in r199031 from upstream llvm trunk (by Venkatraman Govindaraju):
+
+  [Sparc] Replace (unsigned)-1 with ~OU as suggested by Reid Kleckner.
+
+Introduced here: http://svn.freebsd.org/changeset/base/262261
+
+Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
+===================================================================
+--- lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
++++ lib/Target/Sparc/Disassembler/SparcDisassembler.cpp
+@@ -104,14 +104,14 @@ static const unsigned DFPRegDecoderTable[] = {
+   SP::D14,  SP::D30,  SP::D15,  SP::D31 };
+ 
+ static const unsigned QFPRegDecoderTable[] = {
+-  SP::Q0,  SP::Q8,   (unsigned)-1,  (unsigned)-1,
+-  SP::Q1,  SP::Q9,   (unsigned)-1,  (unsigned)-1,
+-  SP::Q2,  SP::Q10,  (unsigned)-1,  (unsigned)-1,
+-  SP::Q3,  SP::Q11,  (unsigned)-1,  (unsigned)-1,
+-  SP::Q4,  SP::Q12,  (unsigned)-1,  (unsigned)-1,
+-  SP::Q5,  SP::Q13,  (unsigned)-1,  (unsigned)-1,
+-  SP::Q6,  SP::Q14,  (unsigned)-1,  (unsigned)-1,
+-  SP::Q7,  SP::Q15,  (unsigned)-1,  (unsigned)-1 } ;
++  SP::Q0,  SP::Q8,   ~0U,  ~0U,
++  SP::Q1,  SP::Q9,   ~0U,  ~0U,
++  SP::Q2,  SP::Q10,  ~0U,  ~0U,
++  SP::Q3,  SP::Q11,  ~0U,  ~0U,
++  SP::Q4,  SP::Q12,  ~0U,  ~0U,
++  SP::Q5,  SP::Q13,  ~0U,  ~0U,
++  SP::Q6,  SP::Q14,  ~0U,  ~0U,
++  SP::Q7,  SP::Q15,  ~0U,  ~0U } ;
+ 
+ static DecodeStatus DecodeIntRegsRegisterClass(MCInst &Inst,
+                                                unsigned RegNo,
+@@ -168,7 +168,7 @@ static DecodeStatus DecodeQFPRegsRegisterClass(MCI
+     return MCDisassembler::Fail;
+ 
+   unsigned Reg = QFPRegDecoderTable[RegNo];
+-  if (Reg == (unsigned)-1)
++  if (Reg == ~0U)
+     return MCDisassembler::Fail;
+   Inst.addOperand(MCOperand::CreateReg(Reg));
+   return MCDisassembler::Success;
-- 
cgit v1.1