svn commit: r289222 - head/contrib/llvm/patches
Author: dim Date: Tue Oct 13 16:25:02 2015 New Revision: 289222 URL: https://svnweb.freebsd.org/changeset/base/289222 Log: Add llvm patch corresponding to r289221. Added: head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff Added: head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-08-llvm-r250085-fix-avx-crash.diff Tue Oct 13 16:25:02 2015(r289222) @@ -0,0 +1,142 @@ +Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio): + + [x86] Fix wrong lowering of vsetcc nodes (PR25080). + + Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong + assumption that for non-AVX512 targets, the source type and destination type + of a type-legalized setcc node were always the same type. + + This assumption was unfortunately incorrect; the type legalizer is not always + able to promote the return type of a setcc to the same type as the first + operand of a setcc. + + In the case of a vsetcc node, the legalizer firstly checks if the first input + operand has a legal type. If so, then it promotes the return type of the vsetcc + to that same type. Otherwise, the return type is promoted to the 'next legal + type', which, for vectors of MVT::i1 is always a 128-bit integer vector type. + + Example (-mattr=+avx): + +%0 = trunc <8 x i32> %a to <8 x i23> +%1 = icmp eq <8 x i23> %0, zeroinitializer + + The initial selection dag for the code above is: + + v8i1 = setcc t5, t7, seteq:ch +t5: v8i23 = truncate t2 + t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1 + t7: v8i32 = build_vector of all zeroes. + + The type legalizer would firstly check if 't5' has a legal type. If so, then it + would reuse that same type to promote the return type of the setcc node. + Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to + promote the return type of the setcc node. Consequently, the setcc return type + is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the + following dag node: +v8i16 = setcc t32, t25, seteq:ch + +where t32 and t25 are now values of type v8i32. + + Before this patch, function LowerVSETCC would have wrongly expanded the setcc + to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an + instruction. In our case, ISel would have matched a VPCMPEQWrr: +t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25 + + However, t36 and t25 are both VR256, while the result type is instead of class + VR128. This inconsistency ended up causing the insertion of COPY instructions + like this: +%vreg7 = COPY %vreg3; VR128:%vreg7 VR256:%vreg3 + + Which is an invalid full copy (not a sub register copy). + Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy + instruction" in the attempt to expand the malformed pseudo COPY instructions. + + This patch fixes the problem adding the missing logic in LowerVSETCC to handle + the corner case of a setcc with 128-bit return type and 256-bit operand type. + + This problem was originally reported by Dimitry as PR25080. It has been latent + for a very long time. I have added the minimal reproducible from that bugzilla + as test setcc-lowering.ll. + + Differential Revision: http://reviews.llvm.org/D13660 + +This should fix the "Cannot emit physreg copy instruction" errors when +compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set +to a CPU supporting AVX (e.g. sandybridge, ivybridge). + +Introduced here: http://svnweb.freebsd.org/changeset/base/289221 + +Index: lib/Target/X86/X86ISelLowering.cpp +=== +--- lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp +@@ -13573,6 +13573,35 @@ static SDValue LowerVSETCC(SDValue Op, const X86Su +DAG.getConstant(SSECC, dl, MVT::i8)); + } + ++ MVT VTOp0 = Op0.getSimpleValueType(); ++ assert(VTOp0 == Op1.getSimpleValueType() && ++ "Expected operands with same type!"); ++ assert(VT.getVectorNumElements() == VTOp0.getVectorNumElements() && ++ "Invalid number of packed elements for source and destination!"); ++ ++ if (VT.is128BitVector() && VTOp0.is256BitVector()) { ++// On non-AVX512 targets, a vector of MVT::i1 is promoted by the type ++// legalizer to a wider vector type. In the case of 'vsetcc' nodes, the ++// legalizer firstly checks if the first operand in input to the setcc has ++// a legal type. If so, then it promotes the return type to that same type. ++// Otherwise, the return type is promoted to the 'next legal type' which, ++// for a vector of MVT::i1 is always a 128-bit integer vector type. ++// ++// We reach this code only if the following two conditions are met: ++
Re: svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeD
On 10 Oct 2015, at 23:32, Ivan Klymenko <fi...@ukr.net> wrote: > On Mon, 25 May 2015 13:43:03 + (UTC) > Dimitry Andric <d...@freebsd.org> wrote: > >> Author: dim >> Date: Mon May 25 13:43:03 2015 >> New Revision: 283526 >> URL: https://svnweb.freebsd.org/changeset/base/283526 >> >> Log: >> Upgrade our copy of clang and llvm to 3.6.1 release. This is some time ago already, you probably meant the upgrade to 3.7.0? :-) > Cannot emit physreg copy instruction > UNREACHABLE executed at > /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3935! > cc: error: unable to execute command: Abort trap > cc: error: clang frontend command failed due to signal (use -v to see > invocation) > FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) 20150906 > Target: x86_64-unknown-freebsd11.0 > Thread model: posix > cc: note: diagnostic msg: PLEASE submit a bug report to > https://bugs.freebsd.org/submit/ and include the crash backtrace, > preprocessed source, and associated run script. > cc: note: diagnostic msg: > > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: > Preprocessed source(s) and associated run script(s) are located at: > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.c > cc: note: diagnostic msg: /tmp/ieee802_11_common-974cbf.sh Yes, this error has already been reported; please see the thread starting here: https://lists.freebsd.org/pipermail/freebsd-current/2015-October/057701.html It has been submitted as an upstream bug, and a fix is being worked on. For now, you can work around it by unsetting CPUTYPE. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r289082 - head/contrib/libc++/include
Author: dim Date: Fri Oct 9 21:04:28 2015 New Revision: 289082 URL: https://svnweb.freebsd.org/changeset/base/289082 Log: Pull in r242623 from upstream libc++ trunk (by Eric Fiselier): Enable and fix warnings during the build. Although CMake adds warning flags, they are ignored in the libc++ headers because the headers '#pragma system header' themselves. This patch disables the system header pragma when building libc++ and fixes the warnings that arose. The warnings fixed were: 1. - anonymous structs are a GNU extension 2. - anonymous structs are a GNU extension. 3. <__hash_table> - Embedded preprocessor directives have undefined behavior. 4. - Definition is missing noexcept from declaration. 5. <__std_stream> - Unused variable. This should fix building world (in particular libatf-c++) with -std=c++11. Reported by: Oliver HartmannModified: head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__std_stream head/contrib/libc++/include/functional head/contrib/libc++/include/memory head/contrib/libc++/include/string Modified: head/contrib/libc++/include/__hash_table == --- head/contrib/libc++/include/__hash_tableFri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__hash_tableFri Oct 9 21:04:28 2015 (r289082) @@ -984,15 +984,17 @@ public: __equal_range_multi(const _Key& __k) const; void swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ); +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value); +#endif _LIBCPP_INLINE_VISIBILITY size_type max_bucket_count() const _NOEXCEPT @@ -2351,15 +2353,17 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> template void __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ) +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) +#endif { { __node_pointer_pointer __npp = __bucket_list_.release(); Modified: head/contrib/libc++/include/__std_stream == --- head/contrib/libc++/include/__std_streamFri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__std_streamFri Oct 9 21:04:28 2015 (r289082) @@ -276,7 +276,6 @@ __stdoutbuf<_CharT>::overflow(int_type _ codecvt_base::result __r; char_type* pbase = &__1buf; char_type* pptr = pbase + 1; -char_type* epptr = pptr; do { const char_type* __e; Modified: head/contrib/libc++/include/functional == --- head/contrib/libc++/include/functional Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/functional Fri Oct 9 21:04:28 2015 (r289082) @@ -2402,14 +2402,14 @@ struct _LIBCPP_TYPE_VIS_ONLY hash::operator()(__v); #endif Modified: head/contrib/libc++/include/memory == --- head/contrib/libc++/include/memory Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/memory Fri Oct 9 21:04:28 2015 (r289082) @@ -3420,7 +3420,7 @@ struct __scalar_hash<_Tp, 2> { size_t __a; size_t __b; -}; +} __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3442,7 +3442,7 @@ struct __scalar_hash<_Tp, 3> size_t __a; size_t __b; size_t __c; -}; +} __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3465,7 +3465,7 @@ struct __scalar_hash<_Tp, 4> size_t __b; size_t __c; size_t __d; -
svn commit: r289081 - head/contrib/llvm/patches
Author: dim Date: Fri Oct 9 21:00:04 2015 New Revision: 289081 URL: https://svnweb.freebsd.org/changeset/base/289081 Log: Add llvm patch corresponding to r289072. Added: head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff Added: head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff Fri Oct 9 21:00:04 2015(r289081) @@ -0,0 +1,50 @@ +Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): + + [SLP] Vectorize for all-constant entries. + +This should fix libc++'s iostream initialization SIGBUSing whenever the +global cout symbol is not aligned to 16 bytes. + +Introduced here: http://svnweb.freebsd.org/changeset/base/289072 + +Index: lib/Transforms/Vectorize/SLPVectorizer.cpp +=== +--- lib/Transforms/Vectorize/SLPVectorizer.cpp lib/Transforms/Vectorize/SLPVectorizer.cpp +@@ -1642,10 +1642,8 @@ bool BoUpSLP::isFullyVectorizableTinyTree() { + if (VectorizableTree.size() != 2) + return false; + +- // Handle splat and all-constants stores. +- if (!VectorizableTree[0].NeedToGather && +- (allConstant(VectorizableTree[1].Scalars) || +- isSplat(VectorizableTree[1].Scalars))) ++ // Handle splat stores. ++ if (!VectorizableTree[0].NeedToGather && isSplat(VectorizableTree[1].Scalars)) + return true; + + // Gathering cost would be too much for tiny trees. +Index: test/Transforms/SLPVectorizer/X86/tiny-tree.ll +=== +--- test/Transforms/SLPVectorizer/X86/tiny-tree.ll test/Transforms/SLPVectorizer/X86/tiny-tree.ll +@@ -153,19 +153,3 @@ define void @store_splat(float*, float) { + store float %1, float* %6, align 4 + ret void + } +- +- +-; CHECK-LABEL: store_const +-; CHECK: store <4 x i32> +-define void @store_const(i32* %a) { +-entry: +- %ptr0 = getelementptr inbounds i32, i32* %a, i64 0 +- store i32 10, i32* %ptr0, align 4 +- %ptr1 = getelementptr inbounds i32, i32* %a, i64 1 +- store i32 30, i32* %ptr1, align 4 +- %ptr2 = getelementptr inbounds i32, i32* %a, i64 2 +- store i32 20, i32* %ptr2, align 4 +- %ptr3 = getelementptr inbounds i32, i32* %a, i64 3 +- store i32 40, i32* %ptr3, align 4 +- ret void +-} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289072 - in head/contrib: libc++/src llvm/lib/Transforms/Vectorize
Author: dim Date: Fri Oct 9 18:21:45 2015 New Revision: 289072 URL: https://svnweb.freebsd.org/changeset/base/289072 Log: Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): [SLP] Vectorize for all-constant entries. This should fix libc++'s iostream initialization SIGBUSing on amd64, whenever the global cout symbol is not aligned to 16 bytes. Some further explanation: libc++'s iostream.cpp contains the definitions of std::cout, std::cerr and so on. These global objects are effectively declared with an alignment of 8 bytes. When an executable is linked against libc++.so, it can sometimes get a copy of the global object, which is then at the same alignment. However, with clang 3.7.0, the initialization of these global objects will incorrectly use SSE instructions (e.g. movdqa), whenever the optimization level is high enough, and SSE is enabled, such as on amd64. When any of these objects is not aligned to 16 bytes, this will result in a SIGBUS during iostream initialization. In contrast, clang 3.6.x and earlier took the 8 byte alignment into consideration, and avoided SSE for those particular operations. After bisecting of upstream changes, I found that the above revision caused the change of this behavior, so I am reverting it now as a workaround, while a discussion and test case is being prepared for upstream. Modified: head/contrib/libc++/src/iostream.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Modified: head/contrib/libc++/src/iostream.cpp == --- head/contrib/libc++/src/iostream.cppFri Oct 9 17:46:05 2015 (r289071) +++ head/contrib/libc++/src/iostream.cppFri Oct 9 18:21:45 2015 (r289072) @@ -86,3 +86,4 @@ ios_base::Init::~Init() } _LIBCPP_END_NAMESPACE_STD + Modified: head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp == --- head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cppFri Oct 9 17:46:05 2015(r289071) +++ head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cppFri Oct 9 18:21:45 2015(r289072) @@ -1642,10 +1642,8 @@ bool BoUpSLP::isFullyVectorizableTinyTre if (VectorizableTree.size() != 2) return false; - // Handle splat and all-constants stores. - if (!VectorizableTree[0].NeedToGather && - (allConstant(VectorizableTree[1].Scalars) || - isSplat(VectorizableTree[1].Scalars))) + // Handle splat stores. + if (!VectorizableTree[0].NeedToGather && isSplat(VectorizableTree[1].Scalars)) return true; // Gathering cost would be too much for tiny trees. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289073 - head/contrib/libc++/src
Author: dim Date: Fri Oct 9 18:23:10 2015 New Revision: 289073 URL: https://svnweb.freebsd.org/changeset/base/289073 Log: Remove empty line again from libc++'s iostream.cpp. This was used to force updates to this file, so it will be rebuilt by the fixed clang from r289072. Modified: head/contrib/libc++/src/iostream.cpp Modified: head/contrib/libc++/src/iostream.cpp == --- head/contrib/libc++/src/iostream.cppFri Oct 9 18:21:45 2015 (r289072) +++ head/contrib/libc++/src/iostream.cppFri Oct 9 18:23:10 2015 (r289073) @@ -86,4 +86,3 @@ ios_base::Init::~Init() } _LIBCPP_END_NAMESPACE_STD - ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r288951 - head/lib/clang
Author: dim Date: Tue Oct 6 19:49:53 2015 New Revision: 288951 URL: https://svnweb.freebsd.org/changeset/base/288951 Log: For llvm/clang libraries, skip including tablegen-produced .d files when the target is "make depend". This works around errors during incremental make depend of some clang libraries, for example "don't know how to make contrib/llvm/include/llvm/IR/IntrinsicsR600.td". Reported by: emaste Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk == --- head/lib/clang/clang.build.mk Tue Oct 6 19:31:07 2015 (r288950) +++ head/lib/clang/clang.build.mk Tue Oct 6 19:49:53 2015 (r288951) @@ -247,9 +247,11 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td -.for dep in ${TGHDRS:C/$/.inc.d/} -. sinclude "${dep}" -.endfor +.if !make(depend) +. for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +. endfor +.endif SRCS+= ${TGHDRS:C/$/.inc.h/} DPSRCS+= ${TGHDRS:C/$/.inc.h/} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r288099 - head/contrib/binutils/opcodes
On 22 Sep 2015, at 16:23, Ian Lepore <i...@freebsd.org> wrote: > > On Tue, 2015-09-22 at 11:53 +0200, Dimitry Andric wrote: >> On 22 Sep 2015, at 11:43, Slawa Olhovchenkov <s...@zxy.spb.ru> wrote: >>> >>> On Tue, Sep 22, 2015 at 09:35:35AM +, Dimitry Andric wrote: >> ... >>>> -imm |= (-1 << 7); >>>> +imm |= -(1 << 7); >>> >>> May be (~0 << 7) is more simple to understund? >> >> This will give the same warning. ~0 will implicitly convert to -1. >> >> (It would be better to convert all these masks to unsigned, where such >> shifting is always defined, but that gives a lot more churn.) >> >> -Dimitry >> > > How is (-1U << 7) more churn? For this one line, it isn't, of course. Writing -(1 << 7) is simply my personal preference, and it matches the type of 'imm'. But what I meant was changing all mask-containing int variables to unsigned, and suffixing all mask literals U, and so on. This is what should have been done by GNU in the first place. :) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r288099 - head/contrib/binutils/opcodes
Author: dim Date: Tue Sep 22 09:35:35 2015 New Revision: 288099 URL: https://svnweb.freebsd.org/changeset/base/288099 Log: In binutils' arm-dis.c, avoid left-shifting a negative number. Submitted by: dan.mcgregor_usask.ca (Dan McGregor) MFC after:3 days Differential Revision: https://reviews.freebsd.org/D3376 Modified: head/contrib/binutils/opcodes/arm-dis.c Modified: head/contrib/binutils/opcodes/arm-dis.c == --- head/contrib/binutils/opcodes/arm-dis.c Tue Sep 22 07:40:55 2015 (r288098) +++ head/contrib/binutils/opcodes/arm-dis.c Tue Sep 22 09:35:35 2015 (r288099) @@ -1767,7 +1767,7 @@ print_insn_coprocessor (bfd_vma pc, stru /* Is ``imm'' a negative number? */ if (imm & 0x40) - imm |= (-1 << 7); + imm |= -(1 << 7); func (stream, "%d", imm); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r288099 - head/contrib/binutils/opcodes
On 22 Sep 2015, at 11:43, Slawa Olhovchenkov <s...@zxy.spb.ru> wrote: > > On Tue, Sep 22, 2015 at 09:35:35AM +0000, Dimitry Andric wrote: ... >> - imm |= (-1 << 7); >> + imm |= -(1 << 7); > > May be (~0 << 7) is more simple to understund? This will give the same warning. ~0 will implicitly convert to -1. (It would be better to convert all these masks to unsigned, where such shifting is always defined, but that gives a lot more churn.) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r287679 - in head/contrib/libc++: . include
Author: dim Date: Fri Sep 11 17:14:58 2015 New Revision: 287679 URL: https://svnweb.freebsd.org/changeset/base/287679 Log: Since contrib/libc++'s ancestry was never correct, subversion 1.8 and higher cannot merge to it from the vendor area. Re-bootstrap the ancestry by doing (apologies to your retinas): * svn rm contrib/libc++ * svn cp ^/vendor/libc++/dist@276792 contrib/libc++ * svn cp ^/head/contrib/libc++/FREEBSD-upgrade@287629 contrib/libc++ * svn cp ^/head/contrib/libc++/include/__bit_reference@287629 contrib/libc++/include * svn cp ^/head/contrib/libc++/include/__config@287629 contrib/libc++/include * svn cp ^/head/contrib/libc++/include/__tree@287629 contrib/libc++/include * svn cp ^/head/contrib/libc++/include/algorithm@287629 contrib/libc++/include * svn cp ^/head/contrib/libc++/include/stdexcept@287629 contrib/libc++/include * svn cp ^/head/contrib/libc++/include/type_traits@287629 contrib/libc++/include * svn pd -R svn:mergeinfo contrib/libc++ * svn ps -F mergeinfo.txt contrib/libc++ Added: head/contrib/libc++/FREEBSD-upgrade - copied unchanged from r287629, head/contrib/libc++/FREEBSD-upgrade Replaced: - copied from r276792, vendor/libc++/dist/ head/contrib/libc++/include/__bit_reference - copied unchanged from r287629, head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config - copied unchanged from r287629, head/contrib/libc++/include/__config head/contrib/libc++/include/__tree - copied unchanged from r287629, head/contrib/libc++/include/__tree head/contrib/libc++/include/algorithm - copied unchanged from r287629, head/contrib/libc++/include/algorithm head/contrib/libc++/include/stdexcept - copied unchanged from r287629, head/contrib/libc++/include/stdexcept head/contrib/libc++/include/type_traits - copied unchanged from r287629, head/contrib/libc++/include/type_traits Directory Properties: head/contrib/libc++/ (props changed) Copied: head/contrib/libc++/FREEBSD-upgrade (from r287629, head/contrib/libc++/FREEBSD-upgrade) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/FREEBSD-upgrade Fri Sep 11 17:14:58 2015 (r287679, copy of r287629, head/contrib/libc++/FREEBSD-upgrade) @@ -0,0 +1,8 @@ +$FreeBSD$ + +The FreeBSD copy of libc++. This contains everything from the include and +source directories upstream, with the exception of the support/win32 directory, +which is only required for building on Windows (FreeBSD is not Windows). + +To update, bring in anything new in source or include that is not +platform-dependent (unless the platform in question is FreeBSD, obviously). Copied: head/contrib/libc++/include/__bit_reference (from r287629, head/contrib/libc++/include/__bit_reference) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/include/__bit_reference Fri Sep 11 17:14:58 2015 (r287679, copy of r287629, head/contrib/libc++/include/__bit_reference) @@ -0,0 +1,1286 @@ +// -*- C++ -*- +//===--===// +// +// 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. +// +//===--===// + +#ifndef _LIBCPP___BIT_REFERENCE +#define _LIBCPP___BIT_REFERENCE + +#include <__config> +#include + +#include <__undef_min_max> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +template class __bit_iterator; +template class __bit_const_reference; + +template +struct __has_storage_type +{ +static const bool value = false; +}; + +template ::value> +class __bit_reference +{ +typedef typename _Cp::__storage_type__storage_type; +typedef typename _Cp::__storage_pointer __storage_pointer; + +__storage_pointer __seg_; +__storage_type__mask_; + +#if defined(__clang__) || defined(__IBMCPP__) || defined(_LIBCPP_MSVC) +friend typename _Cp::__self; +#else +friend class _Cp::__self; +#endif +friend class __bit_const_reference<_Cp>; +friend class __bit_iterator<_Cp, false>; +public: +_LIBCPP_INLINE_VISIBILITY operator bool() const _NOEXCEPT +{return static_cast(*__seg_ & __mask_);} +_LIBCPP_INLINE_VISIBILITY bool operator ~() const _NOEXCEPT +{return !static_cast(*this);} + +_LIBCPP_INLINE_VISIBILITY +__bit_reference& operator=(bool __x) _NOEXCEPT +{ +if (__x) +*__seg_ |= __mask_; +else +*__seg_ &= ~__mask_; +return *this; +} + +_LIBCPP_INLINE_VISIBILITY +__bit_reference&
svn commit: r287541 - head/lib/libz
Author: dim Date: Mon Sep 7 20:55:14 2015 New Revision: 287541 URL: https://svnweb.freebsd.org/changeset/base/287541 Log: In libz's inflateMark(), avoid left-shifting a negative integer, which is undefined. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D3344 MFC after:3 days Modified: head/lib/libz/inflate.c Modified: head/lib/libz/inflate.c == --- head/lib/libz/inflate.c Mon Sep 7 20:05:56 2015(r287540) +++ head/lib/libz/inflate.c Mon Sep 7 20:55:14 2015(r287541) @@ -1504,7 +1504,7 @@ z_streamp strm; { struct inflate_state FAR *state; -if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; +if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16); state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length : ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r287501 - head/contrib/llvm/tools/lldb
Author: dim Date: Sun Sep 6 11:48:50 2015 New Revision: 287501 URL: https://svnweb.freebsd.org/changeset/base/287501 Log: Update lldb's FREEBSD-Xlist to match reality. Modified: head/contrib/llvm/tools/lldb/FREEBSD-Xlist Modified: head/contrib/llvm/tools/lldb/FREEBSD-Xlist == --- head/contrib/llvm/tools/lldb/FREEBSD-Xlist Sun Sep 6 11:23:01 2015 (r287500) +++ head/contrib/llvm/tools/lldb/FREEBSD-Xlist Sun Sep 6 11:48:50 2015 (r287501) @@ -3,6 +3,7 @@ .clang-format .gitignore CMakeLists.txt +CODE_OWNERS.txt INSTALL.txt Makefile cmake/ @@ -27,6 +28,7 @@ include/lldb/Host/msvc/ include/lldb/Host/windows/ include/lldb/Makefile lib/ +lit/ lldb.xcodeproj/ lldb.xcworkspace/ resources/ @@ -46,12 +48,15 @@ source/Expression/CMakeLists.txt source/Expression/Makefile source/Host/CMakeLists.txt source/Host/Makefile +source/Host/android/ source/Host/common/Makefile source/Host/freebsd/Makefile source/Host/linux/ source/Host/macosx/ source/Host/posix/Makefile source/Host/windows/ +source/Initialization/CMakeLists.txt +source/Initialization/Makefile source/Interpreter/CMakeLists.txt source/Interpreter/Makefile source/Makefile @@ -62,8 +67,18 @@ source/Plugins/ABI/MacOSX-arm64/CMakeLis source/Plugins/ABI/MacOSX-arm64/Makefile source/Plugins/ABI/MacOSX-i386/CMakeLists.txt source/Plugins/ABI/MacOSX-i386/Makefile +source/Plugins/ABI/SysV-arm/CMakeLists.txt +source/Plugins/ABI/SysV-arm/Makefile +source/Plugins/ABI/SysV-arm64/CMakeLists.txt +source/Plugins/ABI/SysV-arm64/Makefile source/Plugins/ABI/SysV-hexagon/CMakeLists.txt source/Plugins/ABI/SysV-hexagon/Makefile +source/Plugins/ABI/SysV-i386/CMakeLists.txt +source/Plugins/ABI/SysV-i386/Makefile +source/Plugins/ABI/SysV-mips/CMakeLists.txt +source/Plugins/ABI/SysV-mips/Makefile +source/Plugins/ABI/SysV-mips64/CMakeLists.txt +source/Plugins/ABI/SysV-mips64/Makefile source/Plugins/ABI/SysV-ppc/CMakeLists.txt source/Plugins/ABI/SysV-ppc/Makefile source/Plugins/ABI/SysV-ppc64/CMakeLists.txt @@ -88,6 +103,10 @@ source/Plugins/Instruction/ARM/Makefile source/Plugins/Instruction/ARM64/CMakeLists.txt source/Plugins/Instruction/ARM64/Makefile source/Plugins/Instruction/CMakeLists.txt +source/Plugins/Instruction/MIPS/CMakeLists.txt +source/Plugins/Instruction/MIPS/Makefile +source/Plugins/Instruction/MIPS64/CMakeLists.txt +source/Plugins/Instruction/MIPS64/Makefile source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt source/Plugins/InstrumentationRuntime/AddressSanitizer/Makefile source/Plugins/InstrumentationRuntime/CMakeLists.txt @@ -99,6 +118,9 @@ source/Plugins/LanguageRuntime/CPlusPlus source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Makefile source/Plugins/LanguageRuntime/ObjC/ +source/Plugins/LanguageRuntime/RenderScript/CMakeLists.txt +source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt +source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/Makefile source/Plugins/Makefile source/Plugins/MemoryHistory/CMakeLists.txt source/Plugins/MemoryHistory/asan/CMakeLists.txt @@ -117,6 +139,7 @@ source/Plugins/ObjectFile/PECOFF/ source/Plugins/OperatingSystem/CMakeLists.txt source/Plugins/OperatingSystem/Python/CMakeLists.txt source/Plugins/OperatingSystem/Python/Makefile +source/Plugins/Platform/Android/ source/Plugins/Platform/CMakeLists.txt source/Plugins/Platform/FreeBSD/CMakeLists.txt source/Plugins/Platform/FreeBSD/Makefile @@ -168,6 +191,7 @@ source/Utility/Makefile test/ tools/CMakeLists.txt tools/Makefile +tools/argdumper/CMakeLists.txt tools/darwin-debug/ tools/darwin-threads/ tools/debugserver/ @@ -180,7 +204,9 @@ tools/lldb-mi/CMakeLists.txt tools/lldb-mi/Makefile tools/lldb-mi/lldb-Info.plist tools/lldb-perf/ -tools/lldb-platform/CMakeLists.txt -tools/lldb-platform/Makefile +tools/lldb-platform/ +tools/lldb-server/CMakeLists.txt +tools/lldb-server/Makefile +unittests/ utils/ www/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r287007 - head/share/mk
On 21 Aug 2015, at 21:51, Warner Losh i...@freebsd.org wrote: Author: imp Date: Fri Aug 21 19:51:27 2015 New Revision: 287007 URL: https://svnweb.freebsd.org/changeset/base/287007 Log: Document bsd.compiler.mk and the variables it defines. Thanks!! signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r286733 - head/sys/dev/bxe
Author: dim Date: Thu Aug 13 18:24:41 2015 New Revision: 286733 URL: https://svnweb.freebsd.org/changeset/base/286733 Log: Avoid left-shifting negative signed values in bxe(4). Reviewed by: davidcs MFC after:3 days Modified: head/sys/dev/bxe/ecore_hsi.h Modified: head/sys/dev/bxe/ecore_hsi.h == --- head/sys/dev/bxe/ecore_hsi.hThu Aug 13 18:01:50 2015 (r286732) +++ head/sys/dev/bxe/ecore_hsi.hThu Aug 13 18:24:41 2015 (r286733) @@ -2536,9 +2536,9 @@ struct shmem2_region { #define SHMEM_EEE_SUPPORTED_MASK 0x000f #define SHMEM_EEE_SUPPORTED_SHIFT 16 #define SHMEM_EEE_ADV_STATUS_MASK 0x00f0 - #define SHMEM_EEE_100M_ADV (10) - #define SHMEM_EEE_1G_ADV (11) - #define SHMEM_EEE_10G_ADV (12) + #define SHMEM_EEE_100M_ADV (1U0) + #define SHMEM_EEE_1G_ADV (1U1) + #define SHMEM_EEE_10G_ADV (1U2) #define SHMEM_EEE_ADV_STATUS_SHIFT 20 #define SHMEM_EEE_LP_ADV_STATUS_MASK 0x0f00 #define SHMEM_EEE_LP_ADV_STATUS_SHIFT 24 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r286699 - head/contrib/gcclibs/libcpp
Author: dim Date: Wed Aug 12 20:16:13 2015 New Revision: 286699 URL: https://svnweb.freebsd.org/changeset/base/286699 Log: In gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on undefined behavior. The code used this macro to avoid problems on some broken systems which define SSIZE_MAX incorrectly, but this is not needed on FreeBSD, obviously. MFC after: 3 days Modified: head/contrib/gcclibs/libcpp/files.c Modified: head/contrib/gcclibs/libcpp/files.c == --- head/contrib/gcclibs/libcpp/files.c Wed Aug 12 20:08:54 2015 (r286698) +++ head/contrib/gcclibs/libcpp/files.c Wed Aug 12 20:16:13 2015 (r286699) @@ -567,7 +567,7 @@ read_file_guts (cpp_reader *pfile, _cpp_ SSIZE_MAX to be much smaller than the actual range of the type. Use INTTYPE_MAXIMUM unconditionally to ensure this does not bite us. */ - if (file-st.st_size INTTYPE_MAXIMUM (ssize_t)) + if (file-st.st_size SSIZE_MAX) { cpp_error (pfile, CPP_DL_ERROR, %s is too large, file-path); return false; @@ -581,7 +581,7 @@ read_file_guts (cpp_reader *pfile, _cpp_ file-path); return false; } - else if (offset INTTYPE_MAXIMUM (ssize_t) || (ssize_t)offset size) + else if (offset SSIZE_MAX || (ssize_t)offset size) { cpp_error (pfile, CPP_DL_ERROR, current position of %s is too large, file-path); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r286702 - head/sbin/ipfw
Author: dim Date: Wed Aug 12 21:07:57 2015 New Revision: 286702 URL: https://svnweb.freebsd.org/changeset/base/286702 Log: In ipfw2, avoid left-shifting negative integers, which is undefined. While here, make some other arguments to htonl(3) unsigned too. MFC after:3 days Modified: head/sbin/ipfw/ipfw2.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Wed Aug 12 20:50:20 2015(r286701) +++ head/sbin/ipfw/ipfw2.c Wed Aug 12 21:07:57 2015(r286702) @@ -2869,14 +2869,14 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int case '/': masklen = atoi(p); if (masklen == 0) - d[1] = htonl(0);/* mask */ + d[1] = htonl(0U); /* mask */ else if (masklen 32) errx(EX_DATAERR, bad width ``%s'', p); else - d[1] = htonl(~0 (32 - masklen)); + d[1] = htonl(~0U (32 - masklen)); break; case '{': /* no mask, assume /24 and put back the '{' */ - d[1] = htonl(~0 (32 - 24)); + d[1] = htonl(~0U (32 - 24)); *(--p) = md; break; @@ -2885,7 +2885,7 @@ fill_ip(ipfw_insn_ip *cmd, char *av, int /* FALLTHROUGH */ case 0: /* initialization value */ default: - d[1] = htonl(~0); /* force /32 */ + d[1] = htonl(~0U); /* force /32 */ break; } d[0] = d[1]; /* mask base address with mask */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r286515 - head/lib/msun/src
Author: dim Date: Sun Aug 9 10:00:13 2015 New Revision: 286515 URL: https://svnweb.freebsd.org/changeset/base/286515 Log: In libm's exp2(3), avoid left-shifting a negative integer, which is undefined. Replace it with the intended value, in a defined way. Reviewed by: bde MFC after:3 days Modified: head/lib/msun/src/s_exp2.c Modified: head/lib/msun/src/s_exp2.c == --- head/lib/msun/src/s_exp2.c Sun Aug 9 09:54:29 2015(r286514) +++ head/lib/msun/src/s_exp2.c Sun Aug 9 10:00:13 2015(r286515) @@ -376,14 +376,14 @@ exp2(double x) /* Compute r = exp2(y) = exp2t[i0] * p(z - eps[i]). */ t = tbl[i0];/* exp2t[i0] */ z -= tbl[i0 + 1]; /* eps[i0] */ - if (k = -1021 20) + if (k = -(1021 20)) INSERT_WORDS(twopk, 0x3ff0 + k, 0); else INSERT_WORDS(twopkp1000, 0x3ff0 + k + (1000 20), 0); r = t + t * z * (P1 + z * (P2 + z * (P3 + z * (P4 + z * P5; /* Scale by 2**(k20). */ - if(k = -1021 20) { + if(k = -(1021 20)) { if (k == 1024 20) return (r * 2.0 * 0x1p1023); return (r * twopk); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r286519 - head/contrib/binutils/gas/config
Author: dim Date: Sun Aug 9 11:06:40 2015 New Revision: 286519 URL: https://svnweb.freebsd.org/changeset/base/286519 Log: In GNU as, avoid left-shifting negative integers, which is undefined. MFC after:3 days Modified: head/contrib/binutils/gas/config/tc-i386.c Modified: head/contrib/binutils/gas/config/tc-i386.c == --- head/contrib/binutils/gas/config/tc-i386.c Sun Aug 9 10:36:25 2015 (r286518) +++ head/contrib/binutils/gas/config/tc-i386.c Sun Aug 9 11:06:40 2015 (r286519) @@ -914,8 +914,8 @@ fits_in_signed_long (offsetT num ATTRIBU #ifndef BFD64 return 1; #else - return (!(((offsetT) -1 31) num) - || (((offsetT) -1 31) num) == ((offsetT) -1 31)); + return (!(-((offsetT) 1 31) num) + || (-((offsetT) 1 31) num) == -((offsetT) 1 31)); #endif } /* fits_in_signed_long() */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r285644 - head/contrib/sqlite3
On 18 Jul 2015, at 00:53, Pedro Giffuni p...@freebsd.org wrote: On 07/17/15 17:26, Peter Jeremy wrote: On 2015-Jul-16 22:07:14 +, Pedro F. Giffuni p...@freebsd.org wrote: Log: ... sqlite: clean a couple of invocations of memcpy(3) Found almost accidentally by our native gcc when enhanced with FORTIFY_SOURCE. ... - memcpy((void *)aHdr[1], (void *)pWal-hdr, sizeof(WalIndexHdr)); + memcpy((void *)aHdr[1], (const void *)pWal-hdr, sizeof(WalIndexHdr)); walShmBarrier(pWal); - memcpy((void *)aHdr[0], (void *)pWal-hdr, sizeof(WalIndexHdr)); + memcpy((void *)aHdr[0], (const void *)pWal-hdr, sizeof(WalIndexHdr)); If the compiler complained about that, the compiler is broken. The change was rather collateral (read cosmetical) to the real warning which remains unfixed. The compiler warning is this: ... === lib/libsqlite3 (obj,depend,all,install) cc1: warnings being treated as errors /scratch/tmp/pfg/head/lib/libsqlite3/../../contrib/sqlite3/sqlite3.c: In function 'walIndexWriteHdr': /scratch/tmp/pfg/head/lib/libsqlite3/../../contrib/sqlite3/sqlite3.c:49490: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type /scratch/tmp/pfg/head/lib/libsqlite3/../../contrib/sqlite3/sqlite3.c:49492: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type --- sqlite3.So --- *** [sqlite3.So] Error code 1 ... make[6]: stopped in /scratch/tmp/pfg/head/lib/libsqlite3 It only happens when using the experimental FORTIFY_SOURCE support [1], and it only happens with gcc (the base one is the only tested). Yes, I am suspecting a compiler bug but gcc has been really useful to find bugs in fortify_source. Actually, it is right to warn about this, as the casts drop a volatile specifier: 49482 static void walIndexWriteHdr(Wal *pWal){ 49483volatile WalIndexHdr *aHdr = walIndexHdr(pWal); ... 49490memcpy((void *)aHdr[1], (void *)pWal-hdr, sizeof(WalIndexHdr)); 49491walShmBarrier(pWal); 49492memcpy((void *)aHdr[0], (void *)pWal-hdr, sizeof(WalIndexHdr)); If you compile this with clang, and a high enough WARNS level, it tells you where the problem is: contrib/sqlite3/sqlite3.c:49490:18: error: cast from 'volatile struct WalIndexHdr *' to 'void *' drops volatile qualifier [-Werror,-Wcast-qual] memcpy((void *)aHdr[1], (void *)pWal-hdr, sizeof(WalIndexHdr)); ^ contrib/sqlite3/sqlite3.c:49492:18: error: cast from 'volatile struct WalIndexHdr *' to 'void *' drops volatile qualifier [-Werror,-Wcast-qual] memcpy((void *)aHdr[0], (void *)pWal-hdr, sizeof(WalIndexHdr)); ^ Similar with newer versions of gcc: contrib/sqlite3/sqlite3.c:49490:10: error: cast discards 'volatile' qualifier from pointer target type [-Werror=cast-qual] memcpy((void *)aHdr[1], (void *)pWal-hdr, sizeof(WalIndexHdr)); ^ contrib/sqlite3/sqlite3.c:49492:10: error: cast discards 'volatile' qualifier from pointer target type [-Werror=cast-qual] memcpy((void *)aHdr[0], (void *)pWal-hdr, sizeof(WalIndexHdr)); ^ Removing all the casts does not help, with base gcc it still gives: contrib/sqlite3/sqlite3.c:49490: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type contrib/sqlite3/sqlite3.c:49492: warning: passing argument 1 of 'memcpy' discards qualifiers from pointer target type and with clang: contrib/sqlite3/sqlite3.c:49490:10: error: passing 'volatile WalIndexHdr *' (aka 'volatile struct WalIndexHdr *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] memcpy(aHdr[1], pWal-hdr, sizeof(WalIndexHdr)); ^~~~ /usr/include/string.h:62:31: note: passing argument to parameter here void*memcpy(void * __restrict, const void * __restrict, size_t); ^ contrib/sqlite3/sqlite3.c:49492:10: error: passing 'volatile WalIndexHdr *' (aka 'volatile struct WalIndexHdr *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] memcpy(aHdr[0], pWal-hdr, sizeof(WalIndexHdr)); ^~~~ /usr/include/string.h:62:31: note: passing argument to parameter here void*memcpy(void * __restrict, const void * __restrict, size_t); ^ 'const' is a promise to the caller that the given parameter will not be modified by the callee. There's no requirement that the passed argument be const. As bde commented, the casts are all spurious. And since this is contrib'ed code I am not going through the code churn but upstream has been notified. I don't think it is likely that upstream will go through the trouble of removing -Wcast-qual warnings. There are 152 of them in sqlite3.c. :-) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r285340 - head/sys/dev/cxgb/ulp/iw_cxgb
Author: dim Date: Thu Jul 9 22:13:23 2015 New Revision: 285340 URL: https://svnweb.freebsd.org/changeset/base/285340 Log: Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function. Detected by clang 3.7.0 with the warning: sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable 'rptr' is uninitialized when used here [-Werror,-Wuninitialized] chp-cq.rptr = rptr; ^~~~ MFC after:1 week Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c == --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.cThu Jul 9 21:53:40 2015(r285339) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.cThu Jul 9 22:13:23 2015(r285340) @@ -303,7 +303,7 @@ iwch_arm_cq(struct ib_cq *ibcq, enum ib_ else cq_op = CQ_ARM_AN; if (chp-user_rptr_addr) { - if (copyin(rptr, chp-user_rptr_addr, 4)) + if (copyin(chp-user_rptr_addr, rptr, sizeof(rptr))) return (-EFAULT); mtx_lock(chp-lock); chp-cq.rptr = rptr; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r285284 - head/lib/liblzma
Check whether the path starts with /usr/bin, maybe? Normally, you would check for the existence of a random header in a configure script. But from within a C source file, it's not that easy. That said, immintrin.h is available for all usable versions of clang, and should be available in all versions of gcc = 4.4 (at least, if I read gcc's commit history correctly). And gcc in base is definitely not 4.4. :-) -Dimitry On 09 Jul 2015, at 00:04, Adrian Chadd adrian.ch...@gmail.com wrote: Is there a blessed way to see whether the compiler we're using is an external compiler, or an internal one? eg, the version check isn't enough - it's just a number. how do I know if it's freebsd clang versus upstream clang? (Or in my instance, freebsd-gcc versus upstream-gcc.) -a On 8 July 2015 at 14:09, Pedro Giffuni p...@freebsd.org wrote: On 07/08/15 13:36, Luigi Rizzo wrote: Author: luigi Date: Wed Jul 8 18:36:37 2015 New Revision: 285284 URL: https://svnweb.freebsd.org/changeset/base/285284 Log: only enable immintrin when clang is used. The base gcc does not support it. Reviewed by: delphij Modified: head/lib/liblzma/config.h Modified: head/lib/liblzma/config.h == --- head/lib/liblzma/config.h Wed Jul 8 18:12:24 2015(r285283) +++ head/lib/liblzma/config.h Wed Jul 8 18:36:37 2015(r285284) @@ -150,7 +150,8 @@ #define HAVE_ICONV 1 /* Define to 1 if you have the immintrin.h header file. */ -#if defined(__FreeBSD__) defined(__amd64__) +/* FreeBSD - only with clang because the base gcc does not support it */ +#if defined(__clang__) defined(__FreeBSD__) defined(__amd64__) #define HAVE_IMMINTRIN_H 1 #endif FWIW, gcc 4.3+ does have it so this may some undesired (but hidden) effect when building with an external gcc. Pedro. signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r285149 - in head/contrib/llvm/lib/Transforms: Scalar Utils
Author: dim Date: Sat Jul 4 20:07:37 2015 New Revision: 285149 URL: https://svnweb.freebsd.org/changeset/base/285149 Log: Pull in r241142 from upstream llvm trunk (by David Majnemer): [SCCP] Turn loads of null into undef instead of zero initialized values Surprisingly, this is a correctness issue: the mmx type exists for calling convention purposes, LLVM doesn't have a zero representation for them. This partially fixes PR23999. Pull in r241143 from upstream llvm trunk (by David Majnemer): [LoopUnroll] Use undef for phis with no value live We would create a phi node with a zero initialized operand instead of undef in the case where no value was originally available. This was problematic for x86_mmx which has no null value. These fix a Cannot create a null constant of that type! error when compiling the graphics/sdl2_gfx port with MMX enabled. Reported by: amdmi3 Modified: head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp Modified: head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp == --- head/contrib/llvm/lib/Transforms/Scalar/SCCP.cppSat Jul 4 19:00:38 2015(r285148) +++ head/contrib/llvm/lib/Transforms/Scalar/SCCP.cppSat Jul 4 20:07:37 2015(r285149) @@ -1054,7 +1054,7 @@ void SCCPSolver::visitLoadInst(LoadInst // load null - null if (isaConstantPointerNull(Ptr) I.getPointerAddressSpace() == 0) -return markConstant(IV, I, Constant::getNullValue(I.getType())); +return markConstant(IV, I, UndefValue::get(I.getType())); // Transform load (constant global) into the value loaded. if (GlobalVariable *GV = dyn_castGlobalVariable(Ptr)) { Modified: head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp == --- head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cppSat Jul 4 19:00:38 2015(r285148) +++ head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cppSat Jul 4 20:07:37 2015(r285149) @@ -81,7 +81,7 @@ static void ConnectProlog(Loop *L, Value if (L-contains(PN)) { NewPN-addIncoming(PN-getIncomingValueForBlock(NewPH), OrigPH); } else { -NewPN-addIncoming(Constant::getNullValue(PN-getType()), OrigPH); +NewPN-addIncoming(UndefValue::get(PN-getType()), OrigPH); } Value *V = PN-getIncomingValueForBlock(Latch); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r285150 - head/contrib/llvm/patches
Author: dim Date: Sat Jul 4 20:09:24 2015 New Revision: 285150 URL: https://svnweb.freebsd.org/changeset/base/285150 Log: Add llvm patch corresponding to r285149. Added: head/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff Added: head/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-10-llvm-r241142-r241143-mmx-undef.diff Sat Jul 4 20:09:24 2015(r285150) @@ -0,0 +1,88 @@ +Pull in r241142 from upstream llvm trunk (by David Majnemer): + + [SCCP] Turn loads of null into undef instead of zero initialized values + + Surprisingly, this is a correctness issue: the mmx type exists for + calling convention purposes, LLVM doesn't have a zero representation for + them. + + This partially fixes PR23999. + +Pull in r241143 from upstream llvm trunk (by David Majnemer): + + [LoopUnroll] Use undef for phis with no value live + + We would create a phi node with a zero initialized operand instead of + undef in the case where no value was originally available. This was + problematic for x86_mmx which has no null value. + +These fix a Cannot create a null constant of that type! error when +compiling the graphics/sdl2_gfx port with MMX enabled. + +Introduced here: http://svnweb.freebsd.org/changeset/base/285149 + +Index: lib/Transforms/Scalar/SCCP.cpp +=== +--- lib/Transforms/Scalar/SCCP.cpp lib/Transforms/Scalar/SCCP.cpp +@@ -1054,7 +1054,7 @@ + + // load null - null + if (isaConstantPointerNull(Ptr) I.getPointerAddressSpace() == 0) +-return markConstant(IV, I, Constant::getNullValue(I.getType())); ++return markConstant(IV, I, UndefValue::get(I.getType())); + + // Transform load (constant global) into the value loaded. + if (GlobalVariable *GV = dyn_castGlobalVariable(Ptr)) { +Index: lib/Transforms/Utils/LoopUnrollRuntime.cpp +=== +--- lib/Transforms/Utils/LoopUnrollRuntime.cpp lib/Transforms/Utils/LoopUnrollRuntime.cpp +@@ -81,7 +81,7 @@ + if (L-contains(PN)) { + NewPN-addIncoming(PN-getIncomingValueForBlock(NewPH), OrigPH); + } else { +-NewPN-addIncoming(Constant::getNullValue(PN-getType()), OrigPH); ++NewPN-addIncoming(UndefValue::get(PN-getType()), OrigPH); + } + + Value *V = PN-getIncomingValueForBlock(Latch); +Index: test/Transforms/LoopUnroll/X86/mmx.ll +=== +--- test/Transforms/LoopUnroll/X86/mmx.ll test/Transforms/LoopUnroll/X86/mmx.ll +@@ -0,0 +1,21 @@ ++; RUN: opt %s -S -loop-unroll | FileCheck %s ++target datalayout = e-m:e-i64:64-f80:128-n8:16:32:64-S128 ++target triple = x86_64-unknown-linux-gnu ++ ++define x86_mmx @f() #0 { ++entry: ++ br label %for.body ++ ++for.body: ; preds = %for.body, %entry ++ %phi = phi i32 [ 1, %entry ], [ %add, %for.body ] ++ %add = add i32 %phi, 1 ++ %cmp = icmp eq i32 %phi, 0 ++ br i1 %cmp, label %exit, label %for.body ++ ++exit: ; preds = %for.body ++ %ret = phi x86_mmx [ undef, %for.body ] ++ ; CHECK: ret x86_mmx %ret ++ ret x86_mmx %ret ++} ++ ++attributes #0 = { target-cpu=x86-64 } +Index: test/Transforms/SCCP/crash.ll +=== +--- test/Transforms/SCCP/crash.ll test/Transforms/SCCP/crash.ll +@@ -27,3 +27,8 @@ + %B = extractvalue [4 x i32] %A, 1 + ret i32 %B + } ++ ++define x86_mmx @test3() { ++ %load = load x86_mmx* null ++ ret x86_mmx %load ++} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r284898 - in head: . share/mk
On 28 Jun 2015, at 11:55, Baptiste Daroussin b...@freebsd.org wrote: On Sun, Jun 28, 2015 at 11:48:48AM +0200, Dimitry Andric wrote: On 28 Jun 2015, at 10:57, Baptiste Daroussin b...@freebsd.org wrote: On Sun, Jun 28, 2015 at 01:44:21AM -0700, NGie Cooper wrote: On Sun, Jun 28, 2015 at 12:49 AM, Baptiste Daroussin b...@freebsd.org wrote: ... Not at all I have this on a both where I haven't yet r284898 iirc it is like this since the beginning I do not remember seeing those ld scripts with absolute path. $ cat /usr/lib/libc.so /* $FreeBSD$ */ GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a ) $ what -q /boot/GENERIC.r283337+9c333ed/kernel FreeBSD 11.0-CURRENT #4 r283337+9c333ed(isilon-atf): Tue May 26 21:49:09 PDT 2015 Yes you are right, I was looking at the wrong place. What is actually the perceived problem with having paths in those linker scripts? If you use --sysroot, the libraries are searched relative to that sysroot, right? (And yes, I know our gcc's sysroot implementation is broken. So please fix that instead. :-) WHat is the point in having absolute path in the linker script? Of course, the point is to know exactly *which* libraries you are going to link in. E.g., those with the specified paths, and not any other. having an absolute patch (or even no path at all) will make the compiler looking in its search path (and respecting sysroot). I think you meant relative path here? I'm not sure if relative names like ../../foo/libbar.so will work with path searches, though. The only case where a path is needed seems to be when the lib you want to link to is not in the search path. Am I missing something? You're not missing anything. Some people just seem to prefer exact paths, while others trust in search mechanisms (and the risk that the wrong library is accidentally picked up). FWIW, I don't mind removing the absolute paths in these scripts, but I was simply interested in what problems people encountered due to them. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284898 - in head: . share/mk
On 28 Jun 2015, at 10:57, Baptiste Daroussin b...@freebsd.org wrote: On Sun, Jun 28, 2015 at 01:44:21AM -0700, NGie Cooper wrote: On Sun, Jun 28, 2015 at 12:49 AM, Baptiste Daroussin b...@freebsd.org wrote: ... Not at all I have this on a both where I haven't yet r284898 iirc it is like this since the beginning I do not remember seeing those ld scripts with absolute path. $ cat /usr/lib/libc.so /* $FreeBSD$ */ GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a ) $ what -q /boot/GENERIC.r283337+9c333ed/kernel FreeBSD 11.0-CURRENT #4 r283337+9c333ed(isilon-atf): Tue May 26 21:49:09 PDT 2015 Yes you are right, I was looking at the wrong place. What is actually the perceived problem with having paths in those linker scripts? If you use --sysroot, the libraries are searched relative to that sysroot, right? (And yes, I know our gcc's sysroot implementation is broken. So please fix that instead. :-) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284732 - head/lib/libcxxrt
Author: dim Date: Tue Jun 23 17:54:24 2015 New Revision: 284732 URL: https://svnweb.freebsd.org/changeset/base/284732 Log: Add __cxa_deleted_virtual to libcxxrt's version map. This symbol can sometimes be emitted by clang++, and was not yet exported from libcxxrt. Attempt to be compatible with libsupc++ by using the same CXXABI_1.3.6 symbol version. Reported by: y...@rawbw.com PR: 200863 Reviewed by: emaste MFC after:3 days Differential Revision: https://reviews.freebsd.org/D2850 Modified: head/lib/libcxxrt/Version.map Modified: head/lib/libcxxrt/Version.map == --- head/lib/libcxxrt/Version.map Tue Jun 23 17:26:46 2015 (r284731) +++ head/lib/libcxxrt/Version.map Tue Jun 23 17:54:24 2015 (r284732) @@ -254,6 +254,10 @@ CXXABI_1.3.1 { __cxa_get_exception_ptr; } CXXABI_1.3; +CXXABI_1.3.6 { +__cxa_deleted_virtual; +} CXXABI_1.3.1; + CXXRT_1.0 { @@ -286,7 +290,7 @@ CXXRT_1.0 { __cxa_increment_exception_refcount; __cxa_rethrow_primary_exception; -} CXXABI_1.3.1; +} CXXABI_1.3.6; GLIBCXX_3.4 { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r284736 - head/sys/net
Author: dim Date: Tue Jun 23 18:48:41 2015 New Revision: 284736 URL: https://svnweb.freebsd.org/changeset/base/284736 Log: Fix endless recursion in sys/net/if.c's drbr_inuse_drv(), found by clang 3.7.0. Reviewed by: marcel Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Tue Jun 23 18:46:29 2015(r284735) +++ head/sys/net/if.c Tue Jun 23 18:48:41 2015(r284736) @@ -4005,7 +4005,7 @@ if_setgetcounterfn(if_t ifp, if_get_coun int drbr_inuse_drv(if_t ifh, struct buf_ring *br) { - return drbr_inuse_drv(ifh, br); + return drbr_inuse(ifh, br); } struct mbuf* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r284721 - head/contrib/elftoolchain/libdwarf
Author: dim Date: Tue Jun 23 06:42:30 2015 New Revision: 284721 URL: https://svnweb.freebsd.org/changeset/base/284721 Log: Fix endless recursion in dwarf_get_section_max_offsets(), found by clang 3.7.0. Reviewed by: emaste Modified: head/contrib/elftoolchain/libdwarf/dwarf_sections.c Modified: head/contrib/elftoolchain/libdwarf/dwarf_sections.c == --- head/contrib/elftoolchain/libdwarf/dwarf_sections.c Tue Jun 23 06:30:36 2015(r284720) +++ head/contrib/elftoolchain/libdwarf/dwarf_sections.c Tue Jun 23 06:42:30 2015(r284721) @@ -104,8 +104,8 @@ dwarf_get_section_max_offsets(Dwarf_Debu Dwarf_Unsigned *debug_ranges, Dwarf_Unsigned *debug_pubtypes) { - return (dwarf_get_section_max_offsets(dbg, debug_info, debug_abbrev, + return (dwarf_get_section_max_offsets_b(dbg, debug_info, debug_abbrev, debug_line, debug_loc, debug_aranges, debug_macinfo, debug_pubnames, debug_str, debug_frame, debug_ranges, - debug_pubtypes)); + debug_pubtypes, NULL)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r284724 - head/sys/dev/ti
Author: dim Date: Tue Jun 23 06:59:46 2015 New Revision: 284724 URL: https://svnweb.freebsd.org/changeset/base/284724 Log: Fix r284722, by making it actually compile. Pointy hat to:dim Modified: head/sys/dev/ti/if_ti.c Modified: head/sys/dev/ti/if_ti.c == --- head/sys/dev/ti/if_ti.c Tue Jun 23 06:50:03 2015(r284723) +++ head/sys/dev/ti/if_ti.c Tue Jun 23 06:59:46 2015(r284724) @@ -3350,7 +3350,7 @@ ti_ifmedia_upd(struct ifnet *ifp) sc = ifp-if_softc; TI_LOCK(sc); - error = ti_ifmedia_upd_locked(ifp); + error = ti_ifmedia_upd_locked(sc); TI_UNLOCK(sc); return (error); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r284722 - head/sys/dev/ti
Author: dim Date: Tue Jun 23 06:48:02 2015 New Revision: 284722 URL: https://svnweb.freebsd.org/changeset/base/284722 Log: Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0. Modified: head/sys/dev/ti/if_ti.c Modified: head/sys/dev/ti/if_ti.c == --- head/sys/dev/ti/if_ti.c Tue Jun 23 06:42:30 2015(r284721) +++ head/sys/dev/ti/if_ti.c Tue Jun 23 06:48:02 2015(r284722) @@ -3350,7 +3350,7 @@ ti_ifmedia_upd(struct ifnet *ifp) sc = ifp-if_softc; TI_LOCK(sc); - error = ti_ifmedia_upd(ifp); + error = ti_ifmedia_upd_locked(ifp); TI_UNLOCK(sc); return (error); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r284644 - head/usr.sbin/fstyp
On 20 Jun 2015, at 17:09, Allan Jude allanj...@freebsd.org wrote: On 2015-06-20 11:05, Benjamin Kaduk wrote: ... Are the warnings emitted by gcc posted somewhere so that I can convince myself dropping WARNS is better than changing the code to work around them? -Ben The warnings come from the ZFS contrib code, so I was under the impression we didn't want to fix those and diverge form upstream. via kib on irc: === usr.sbin/fstyp (all) cc1: warnings being treated as errors In file included from /scratch/tmp/kib/src/usr.sbin/fstyp/../../sys/cddl/contrib from /scratch/tmp/kib/src/usr.sbin/fstyp/zfs.c:41: n/fs/zfs/sys/dmu.h:638: warning: function declaration isn't a prototype n/fs/zfs/sys/dmu.h:639: warning: function declaration isn't a prototype Those functions are declared like this, without any parameters, as if they were KR functions: void xuio_stat_wbuf_copied(); void xuio_stat_wbuf_nocopy(); and also their definitions lack any parameters: void xuio_stat_wbuf_copied() { XUIOSTAT_BUMP(xuiostat_wbuf_copied); } void xuio_stat_wbuf_nocopy() { XUIOSTAT_BUMP(xuiostat_wbuf_nocopy); } Obviously, these should just have (void) as their parameter list. For such a trivial change, it should be no problem to modify it locally, and then notify upstream. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284546 - head/contrib/gcc
On 18 Jun 2015, at 15:40, Adrian Chadd adr...@freebsd.org wrote: Author: adrian Date: Thu Jun 18 13:40:08 2015 New Revision: 284546 URL: https://svnweb.freebsd.org/changeset/base/284546 Log: Fix compilation of this macro under gcc-4.9 for MIPS32. Some point after gcc-4.2 the MIPS inline assembly restrictions changed - =h (hi register) disappeared from the list of restrictions and can no longer be used. Just for reference, this happened here (though the commit message is completely unreadable, as usual): https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=208414e So, until someone requires an assembly version of this function, just use a non-assembly version and let the compiler sort it out. This is also precisely what upstream gcc has done. :) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r268137 - head/sys/sys
On 19 Jun 2015, at 17:02, Pedro Giffuni p...@freebsd.org wrote: On 19/06/2015 05:16 a.m., David Chisnall wrote: I only just caught this (having seen the fallout from NetBSD doing the same thing in a shipping release and the pain that it’s caused): __weak is a reserved keyword in Objective-C, please pick another name for this. This in cdefs.h makes it impossible to include any FreeBSD standard headers in Objective-C programs (of which we have a couple of hundred in ports) if they use any of the modern Objective-C language modes. ... Closely related to this, we are redefining _Noreturn, which is a reserved keyword in C11. No, sys/cdefs.h has: 254 /* 255 * Keywords added in C11. 256 */ 257 258 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ 201112L || defined(lint) [...] 284 #if defined(__cplusplus) __cplusplus = 201103L 285 #define _Noreturn [[noreturn]] 286 #else 287 #define _Noreturn __dead2 288 #endif [...] 320 #endif /* __STDC_VERSION__ || __STDC_VERSION__ 201112L */ So the whole block redefining all the _Xxx identifiers is skipped for C11 and higher. E.g.: $ cpp -std=c99 #include sys/cdefs.h _Noreturn void foo(void); ^D # 1 stdin # 1 built-in 1 # 1 built-in 3 # 306 built-in 3 # 1 command line 1 # 1 built-in 2 # 1 stdin 2 # 1 /usr/include/sys/cdefs.h 1 3 4 # 2 stdin 2 __attribute__((__noreturn__)) void foo(void); $ cpp -std=c11 #include sys/cdefs.h _Noreturn void foo(void); ^D # 1 stdin # 1 built-in 1 # 1 built-in 3 # 306 built-in 3 # 1 command line 1 # 1 built-in 2 # 1 stdin 2 # 1 /usr/include/sys/cdefs.h 1 3 4 # 2 stdin 2 _Noreturn void foo(void); -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284370 - head/usr.bin/kdump
On 14 Jun 2015, at 05:30, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sun Jun 14 03:30:39 2015 New Revision: 284370 URL: https://svnweb.freebsd.org/changeset/base/284370 Log: Create proper targets for linux*syscalls.c Modified: head/usr.bin/kdump/Makefile Is this supposed to fix things? Even at r284381, I get: === usr.bin/kdump (depend) sh /usr/src/usr.bin/kdump/mksubr /usr/obj/usr/src/tmp/usr/include kdump_subr.c env MACHINE=i386 CPP=cpp sh /usr/src/usr.bin/kdump/mkioctls print /usr/obj/usr/src/tmp/usr/include ioctl.c stdin:1:10: fatal error: 'cam/cam_compat.h' file not found #include cam/cam_compat.h ^ 1 error generated. rm -f .depend CC='cc ' mkdep -f .depend -a-I/usr/src/usr.bin/kdump/../ktrace -I/usr/src/usr.bin/kdump -I/usr/src/usr.bin/kdump/../.. -I. -DHAVE_LIBCAPSICUM -DPF -std=gnu99 kdump_subr.c /usr/src/usr.bin/kdump/kdump.c ioctl.c /usr/src/usr.bin/kdump/../ktrace/subr.c /usr/src/usr.bin/kdump/kdump.c:153:10: fatal error: 'linux_syscalls.c' file not found #include linux_syscalls.c ^ 1 error generated. mkdep: compile failed *** Error code 1 Stop. Any idea? I obviously do not see any linux_syscalls.c in the objdir. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b
On 13 Jun 2015, at 21:20, Simon J. Gerraty s...@freebsd.org wrote: Author: sjg Date: Sat Jun 13 19:20:56 2015 New Revision: 284345 URL: https://svnweb.freebsd.org/changeset/base/284345 Log: Add META_MODE support. Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Added: head/bin/cat/Makefile.depend (contents, props changed) head/bin/chflags/Makefile.depend (contents, props changed) Some questions about this commit, which I'm sure more people must have: * Was it really necessary to commit hundreds of clearly generated files? * Couldn't these be generated on the fly, or with some make depend like command? * How to update these files, if you change anything in the 'real' Makefiles? * Or are you now the maintainer of these .depend files? :-) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284346 - head/lib/libfetch
Author: dim Date: Sat Jun 13 19:26:48 2015 New Revision: 284346 URL: https://svnweb.freebsd.org/changeset/base/284346 Log: Fix the following clang 3.7.0 warnings in lib/libfetch/http.c: lib/libfetch/http.c:1628:26: error: address of array 'purl-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = purl-user ? ~~^~~~ ~ lib/libfetch/http.c:1630:30: error: address of array 'purl-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = purl-pwd? ~~^~~~ lib/libfetch/http.c:1657:25: error: address of array 'url-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url-user ? ~^~~~ ~ lib/libfetch/http.c:1659:29: error: address of array 'url-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url-pwd ? ~^~~ ~ lib/libfetch/http.c:1669:25: error: address of array 'url-user' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.user = url-user ? ~^~~~ ~ lib/libfetch/http.c:1671:29: error: address of array 'url-pwd' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] aparams.password = url-pwd ? ~^~~ ~ Since url-user and url-pwd are arrays, they can never be NULL, so the checks can be removed. Reviewed by: bapt MFC after:3 days Differential Revision: https://reviews.freebsd.org/D2673 Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c == --- head/lib/libfetch/http.cSat Jun 13 19:20:56 2015(r284345) +++ head/lib/libfetch/http.cSat Jun 13 19:26:48 2015(r284346) @@ -1625,10 +1625,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(aparams); if (*purl-user || *purl-pwd) { - aparams.user = purl-user ? - strdup(purl-user) : strdup(); - aparams.password = purl-pwd? - strdup(purl-pwd) : strdup(); + aparams.user = strdup(purl-user); + aparams.password = strdup(purl-pwd); } else if ((p = getenv(HTTP_PROXY_AUTH)) != NULL *p != '\0') { if (http_authfromenv(p, aparams) 0) { @@ -1654,10 +1652,8 @@ http_request_body(struct url *URL, const http_auth_params_t aparams; init_http_auth_params(aparams); if (*url-user || *url-pwd) { - aparams.user = url-user ? - strdup(url-user) : strdup(); - aparams.password = url-pwd ? - strdup(url-pwd) : strdup(); + aparams.user = strdup(url-user); + aparams.password = strdup(url-pwd); } else if ((p = getenv(HTTP_AUTH)) != NULL *p != '\0') { if (http_authfromenv(p, aparams) 0) { @@ -1666,10 +1662,8 @@ http_request_body(struct url *URL, const } } else if (fetchAuthMethod fetchAuthMethod(url) == 0) { - aparams.user = url-user ? - strdup(url-user) : strdup(); - aparams.password = url-pwd ? - strdup(url-pwd) : strdup(); + aparams.user = strdup(url-user); + aparams.password = strdup(url-pwd); } else { http_seterr(HTTP_NEED_AUTH); goto ouch; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r284274 - head/share/mk
On 11 Jun 2015, at 18:49, Andrew Turner and...@freebsd.org wrote: Author: andrew Date: Thu Jun 11 16:49:14 2015 New Revision: 284274 URL: https://svnweb.freebsd.org/changeset/base/284274 Log: Enable clang on armeb, it is now able to build targeting armeb. This is the last arm platform to move away from gcc. Tested by: jmg Woohoo! :-) signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284167 - head/sys/i386/i386
On 09 Jun 2015, at 08:44, Bruce Evans b...@optusnet.com.au wrote: On Mon, 8 Jun 2015, Dimitry Andric wrote: Log: Merge r283870 from amd64: Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc-p_pid. Requested by:jhb Er. I gave a longer review which implicity requested not doing all of this. The format was correct (it matched the cast), and the cast was less wrong than not casting. Please read https://reviews.freebsd.org/D2695, where Kostik argued pid_t is int32_t on all arches, and I agreed with that. The previous obfuscation is unnecessary now. Both amd64/trap.c i386/trap.c still print pids portably (by casting to long) in one place. They each had 2 unportable printings of pids; now they each have 3 unportable printings of pids. I wasn't updating the other parts of the code, so I stayed out of there for now. Feel free to put a review in Phabricator to make everything consistent. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284167 - head/sys/i386/i386
Author: dim Date: Mon Jun 8 20:12:44 2015 New Revision: 284167 URL: https://svnweb.freebsd.org/changeset/base/284167 Log: Merge r283870 from amd64: Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc-p_pid. Requested by: jhb MFC after:3 days Modified: head/sys/i386/i386/trap.c Modified: head/sys/i386/i386/trap.c == --- head/sys/i386/i386/trap.c Mon Jun 8 20:03:15 2015(r284166) +++ head/sys/i386/i386/trap.c Mon Jun 8 20:12:44 2015(r284167) @@ -998,12 +998,8 @@ trap_fatal(frame, eva) if (frame-tf_eflags PSL_VM) printf(vm86, ); printf(IOPL = %d\n, (frame-tf_eflags PSL_IOPL) 12); - printf(current process = ); - if (curproc) { - printf(%lu (%s)\n, (u_long)curproc-p_pid, curthread-td_name); - } else { - printf(Idle\n); - } + printf(current process = %d (%s)\n, + curproc-p_pid, curthread-td_name); #ifdef KDB if (debugger_on_panic || kdb_active) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r283526 - in head: . contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/ExecutionEngine/RuntimeDy...
Author: dim Date: Mon May 25 13:43:03 2015 New Revision: 283526 URL: https://svnweb.freebsd.org/changeset/base/283526 Log: Upgrade our copy of clang and llvm to 3.6.1 release. This release contains the following cherry-picked revisions from upstream trunk: 226124 226151 226164 226165 226166 226407 226408 226409 226652 226905 226983 227084 227087 227089 227208 227209 227210 227211 227212 227213 227214 227269 227430 227482 227503 227519 227574 227822 227986 227987 227988 227989 227990 228037 228038 228039 228040 228188 228189 228190 228273 228372 228373 228374 228403 228765 228848 228918 229223 229225 229226 229227 229228 229230 229234 229235 229236 229238 229239 229413 229507 229680 229750 229751 229752 229911 230146 230147 230235 230253 230255 230469 230500 230564 230603 230657 230742 230748 230956 231219 231237 231245 231259 231280 231451 231563 231601 231658 231659 231662 231984 231986 232046 232085 232142 232176 232179 232189 232382 232386 232389 232425 232438 232443 232675 232786 232797 232943 232957 233075 233080 233351 233353 233409 233410 233508 233584 233819 233904 234629 234636 234891 234975 234977 235524 235641 235662 235931 236099 236306 236307 Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information. Added: head/contrib/llvm/patches/patch-08-llvm-r230348-arm-fix-bad-ha.diff - copied, changed from r283525, head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff head/contrib/llvm/patches/patch-09-clang-r227115-constantarraytype.diff - copied unchanged from r283313, head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff Deleted: head/contrib/llvm/patches/patch-08-llvm-r227089-fix-mips-i128.diff head/contrib/llvm/patches/patch-09-llvm-r230058-indirectbrs-assert.diff head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/llvm/include/llvm/Target/TargetCallingConv.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/IR/GCOV.cpp head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Windows/explicit_symbols.inc head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsCCState.cpp head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/R600/AMDGPU.td head/contrib/llvm/lib/Target/R600/AMDGPUAlwaysInlinePass.cpp head/contrib/llvm/lib/Target/R600/AMDGPUAsmPrinter.cpp head/contrib/llvm/lib/Target/R600/AMDGPUISelDAGToDAG.cpp head/contrib/llvm/lib/Target/R600/AMDGPUISelLowering.cpp head/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.h head/contrib/llvm/lib/Target/R600/AMDGPUInstrInfo.td head/contrib/llvm/lib/Target/R600/AMDGPUInstructions.td head/contrib/llvm/lib/Target/R600/AMDGPUIntrinsics.td head/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.cpp head/contrib/llvm/lib/Target/R600/AMDGPUSubtarget.h head/contrib/llvm/lib/Target/R600/CaymanInstructions.td head/contrib/llvm/lib/Target/R600/EvergreenInstructions.td head/contrib/llvm/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp head/contrib/llvm/lib/Target/R600/Processors.td
Re: svn commit: r283424 - in head/sys: amd64/linux modules/linux64
On 25 May 2015, at 16:04, Chagin Dmitry dcha...@freebsd.org wrote: On Mon, May 25, 2015 at 07:48:49AM -0400, John Baldwin wrote: On Sunday, May 24, 2015 04:07:12 PM Dmitry Chagin wrote: Author: dchagin Date: Sun May 24 16:07:11 2015 New Revision: 283424 URL: https://svnweb.freebsd.org/changeset/base/283424 Log: Add preliminary support for x86-64 Linux binaries. ... Second, __FreeBSD_version bump perhaps? dim@ bumped, is that enough? I've added notes for both r283424 and r283526 to the porter's handbook: https://svnweb.freebsd.org/doc?view=revisionrevision=46725 -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r283254 - head/sys/sys
Author: dim Date: Thu May 21 17:40:53 2015 New Revision: 283254 URL: https://svnweb.freebsd.org/changeset/base/283254 Log: Ensure that the static structs emitted by the MODULE_DEPEND() and MODULE_VERSION() macros don't end up as .comm symbols, when all the version fields are zero. Normally, such symbols will end up in .bss, but for kernel module version objects, this can lead to garbage version numbers. Fix this by instructing the compiler to always put these structs in the .data segment instead. Reported by: delphij, ae MFC after:1 week Modified: head/sys/sys/module.h Modified: head/sys/sys/module.h == --- head/sys/sys/module.h Thu May 21 17:39:42 2015(r283253) +++ head/sys/sys/module.h Thu May 21 17:40:53 2015(r283254) @@ -107,7 +107,8 @@ struct mod_metadata { DATA_SET(modmetadata_set, _mod_metadata##uniquifier) #defineMODULE_DEPEND(module, mdepend, vmin, vpref, vmax) \ - static struct mod_depend _##module##_depend_on_##mdepend = {\ + static struct mod_depend _##module##_depend_on_##mdepend\ + __section(.data) = { \ vmin, \ vpref, \ vmax\ @@ -147,7 +148,8 @@ struct mod_metadata { DECLARE_MODULE_WITH_MAXVER(name, data, sub, order, __FreeBSD_version) #defineMODULE_VERSION(module, version) \ - static struct mod_version _##module##_version = { \ + static struct mod_version _##module##_version \ + __section(.data) = { \ version \ }; \ MODULE_METADATA(_##module##_version, MDT_VERSION, \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r282994 - head/tools/build
Author: dim Date: Fri May 15 22:19:35 2015 New Revision: 282994 URL: https://svnweb.freebsd.org/changeset/base/282994 Log: Provide reallocarray() in -legacy, if needed, to allow building head on previous releases. Also add a stdlib.h wrapper, which declares the function, otherwise the compiler may assume it returns int, which can cause segfaults on LP64 architectures. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D2558 Added: head/tools/build/stdlib.h (contents, props changed) Modified: head/tools/build/Makefile Modified: head/tools/build/Makefile == --- head/tools/build/Makefile Fri May 15 22:14:42 2015(r282993) +++ head/tools/build/Makefile Fri May 15 22:19:35 2015(r282994) @@ -25,6 +25,14 @@ CFLAGS+= -I${.CURDIR}/../../contrib/libc -I${.CURDIR}/../../lib/libc/include .endif +_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true +.if ${_WITH_REALLOCARRAY} == 0 +.PATH: ${.CURDIR}/../../lib/libc/stdlib +INCS+= stdlib.h +SRCS+= reallocarray.c +CFLAGS+= -I${.CURDIR}/../../lib/libc/include +.endif + .if empty(SRCS) SRCS= dummy.c .endif Added: head/tools/build/stdlib.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/stdlib.h Fri May 15 22:19:35 2015(r282994) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2015 Dimitry Andric d...@freebsd.org + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _LEGACY_STDLIB_H_ +#define_LEGACY_STDLIB_H_ + +#include_next stdlib.h + +__BEGIN_DECLS + +#if __BSD_VISIBLE +void *reallocarray(void *, size_t, size_t); +#endif /* __BSD_VISIBLE */ + +__END_DECLS + +#endif /* !_LEGACY_STDLIB_H_ */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r281451 - head/sys/vm
On 24 Apr 2015, at 13:01, Chris Torek to...@elf.torek.net wrote: The problem seems likely to be related to odd compiler handling of alignment. Consider this code bit, which extracts the essentials: struct x { int x; } __attribute__((__aligned__(32))); struct s1 { int a; struct x b[1]; }; struct s2 { int a; struct x b[]; }; extern void test2(int); void test(void) { test2(sizeof(struct s1)); test2(sizeof(struct s2)); } Compiled, here are the two sizeof values (this particular compiler output is from clang but gcc and clang both agree on sizeof here): movl$64, %edi callq test2 movl$32, %edi popq%rbp jmp test2 # TAILCALL With the flexible array, (sizeof(struct uma_cache)) is going to be 32 bytes smaller than without it. (I have not looked closely enough to determine what the size should be.) I'm not sure I would consider this odd. For purposes of sizeof(), the flexible array member declaration can be thought of as: struct x b[0]; so while both struct s1 and s2 have members that must be aligned at 32 bytes, the former has one extra, while the latter doesn't. Ergo, 2x32 bytes and 1x32 bytes. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r281775 - head/contrib/llvm/lib/MC/MCParser
Author: dim Date: Mon Apr 20 17:36:35 2015 New Revision: 281775 URL: https://svnweb.freebsd.org/changeset/base/281775 Log: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC after:3 days Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Modified: head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp == --- head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:30:13 2015(r281774) +++ head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Mon Apr 20 17:36:35 2015(r281775) @@ -3636,21 +3636,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) -return true; + for (;;) { +if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) -return TokError(unexpected token in directive); +if (Signed) + getStreamer().EmitSLEB128Value(Value); +else + getStreamer().EmitULEB128Value(Value); - if (Signed) -getStreamer().EmitSLEB128Value(Value); - else -getStreamer().EmitULEB128Value(Value); +if (getLexer().is(AsmToken::EndOfStatement)) + break; + +if (getLexer().isNot(AsmToken::Comma)) + return TokError(unexpected token in directive); +Lex(); + } return false; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r281777 - head/contrib/llvm/patches
Author: dim Date: Mon Apr 20 17:37:37 2015 New Revision: 281777 URL: https://svnweb.freebsd.org/changeset/base/281777 Log: Add llvm patch corresponding to r281775. Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Added: head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Mon Apr 20 17:37:37 2015(r281777) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=== +--- lib/MC/MCParser/AsmParser.cpp lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +-return true; ++ for (;;) { ++if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +-return TokError(unexpected token in directive); ++if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +-getStreamer().EmitSLEB128Value(Value); +- else +-getStreamer().EmitULEB128Value(Value); ++if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++if (getLexer().isNot(AsmToken::Comma)) ++ return TokError(unexpected token in directive); ++Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=== +--- test/MC/ELF/uleb.s test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128128 + .uleb12816383 + .uleb12816384 ++.uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: : 00017F80 01FF7F80 8001 ++// ELF_32: : 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: : 00017F80 01FF7F80 8001 ++// ELF_64: : 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r281396 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contri
On 11 Apr 2015, at 05:23, Jung-uk Kim j...@freebsd.org wrote: Author: jkim Date: Sat Apr 11 03:23:41 2015 New Revision: 281396 URL: https://svnweb.freebsd.org/changeset/base/281396 Log: Merge ACPICA 20150410. Shall we MFC this at some point? :) -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r281047 - head/contrib/llvm/patches
Author: dim Date: Fri Apr 3 18:42:38 2015 New Revision: 281047 URL: https://svnweb.freebsd.org/changeset/base/281047 Log: Add clang patch corresponding to r281046. Added: head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff Added: head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-12-clang-r227115-constantarraytype.diff Fri Apr 3 18:42:38 2015(r281047) @@ -0,0 +1,50 @@ +Pull in r227115 from upstream clang trunk (by Ben Langmuir): + + Fix assert instantiating string init of static variable + + ... when the variable's type is a typedef of a ConstantArrayType. Just + look through the typedef (and any other sugar). We only use the + constant array type here to get the element count. + +This fixes an assertion failure when building the games/redeclipse port. + +Introduced here: http://svnweb.freebsd.org/changeset/base/281046 + +Index: tools/clang/lib/Sema/SemaInit.cpp +=== +--- tools/clang/lib/Sema/SemaInit.cpp tools/clang/lib/Sema/SemaInit.cpp +@@ -149,10 +149,10 @@ static void updateStringLiteralType(Expr *E, QualT + static void CheckStringInit(Expr *Str, QualType DeclT, const ArrayType *AT, + Sema S) { + // Get the length of the string as parsed. +- uint64_t StrLength = +-castConstantArrayType(Str-getType())-getSize().getZExtValue(); ++ auto *ConstantArrayTy = ++ castConstantArrayType(Str-getType()-getUnqualifiedDesugaredType()); ++ uint64_t StrLength = ConstantArrayTy-getSize().getZExtValue(); + +- + if (const IncompleteArrayType *IAT = dyn_castIncompleteArrayType(AT)) { + // C99 6.7.8p14. We have an array of character type with unknown size + // being initialized to a string literal. +Index: tools/clang/test/SemaTemplate/instantiate-static-var.cpp +=== +--- tools/clang/test/SemaTemplate/instantiate-static-var.cpp tools/clang/test/SemaTemplate/instantiate-static-var.cpp +@@ -114,3 +114,15 @@ namespace PR6449 { + template class X1char; + + } ++ ++typedef char MyString[100]; ++template typename T ++struct StaticVarWithTypedefString { ++ static MyString str; ++}; ++template typename T ++MyString StaticVarWithTypedefStringT::str = ; ++ ++void testStaticVarWithTypedefString() { ++ (void)StaticVarWithTypedefStringint::str; ++} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r281046 - head/contrib/llvm/tools/clang/lib/Sema
Author: dim Date: Fri Apr 3 18:38:37 2015 New Revision: 281046 URL: https://svnweb.freebsd.org/changeset/base/281046 Log: Pull in r227115 from upstream clang trunk (by Ben Langmuir): Fix assert instantiating string init of static variable ... when the variable's type is a typedef of a ConstantArrayType. Just look through the typedef (and any other sugar). We only use the constant array type here to get the element count. This fixes an assertion failure when building the games/redeclipse port. Reported by: amdmi3 Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Modified: head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp == --- head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Fri Apr 3 18:12:11 2015(r281045) +++ head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp Fri Apr 3 18:38:37 2015(r281046) @@ -149,9 +149,9 @@ static void updateStringLiteralType(Expr static void CheckStringInit(Expr *Str, QualType DeclT, const ArrayType *AT, Sema S) { // Get the length of the string as parsed. - uint64_t StrLength = -castConstantArrayType(Str-getType())-getSize().getZExtValue(); - + auto *ConstantArrayTy = + castConstantArrayType(Str-getType()-getUnqualifiedDesugaredType()); + uint64_t StrLength = ConstantArrayTy-getSize().getZExtValue(); if (const IncompleteArrayType *IAT = dyn_castIncompleteArrayType(AT)) { // C99 6.7.8p14. We have an array of character type with unknown size ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r281049 - in head: contrib/llvm/tools/llvm-cov contrib/llvm/tools/llvm-profdata usr.bin/clang usr.bin/clang/llvm-cov usr.bin/clang/llvm-profdata
Author: dim Date: Fri Apr 3 19:43:39 2015 New Revision: 281049 URL: https://svnweb.freebsd.org/changeset/base/281049 Log: Add the llvm-cov and llvm-profdata tools, when WITH_CLANG_EXTRAS is defined. These help with processing coverage and profile data. Added: head/contrib/llvm/tools/llvm-cov/ - copied from r280968, vendor/llvm/dist/tools/llvm-cov/ head/contrib/llvm/tools/llvm-profdata/ - copied from r280968, vendor/llvm/dist/tools/llvm-profdata/ head/usr.bin/clang/llvm-cov/ head/usr.bin/clang/llvm-cov/Makefile (contents, props changed) head/usr.bin/clang/llvm-cov/llvm-cov.1 (contents, props changed) head/usr.bin/clang/llvm-profdata/ head/usr.bin/clang/llvm-profdata/Makefile (contents, props changed) head/usr.bin/clang/llvm-profdata/llvm-profdata.1 (contents, props changed) Deleted: head/contrib/llvm/tools/llvm-cov/CMakeLists.txt head/contrib/llvm/tools/llvm-cov/LLVMBuild.txt head/contrib/llvm/tools/llvm-cov/Makefile head/contrib/llvm/tools/llvm-profdata/CMakeLists.txt head/contrib/llvm/tools/llvm-profdata/LLVMBuild.txt head/contrib/llvm/tools/llvm-profdata/Makefile Modified: head/usr.bin/clang/Makefile Modified: head/usr.bin/clang/Makefile == --- head/usr.bin/clang/Makefile Fri Apr 3 19:33:26 2015(r281048) +++ head/usr.bin/clang/Makefile Fri Apr 3 19:43:39 2015(r281049) @@ -13,12 +13,14 @@ SUBDIR+=bugpoint \ llvm-as \ llvm-bcanalyzer \ llvm-diff \ + llvm-cov \ llvm-dis \ llvm-extract \ llvm-link \ llvm-mc \ llvm-nm \ llvm-objdump \ + llvm-profdata \ llvm-rtdyld \ llvm-symbolizer \ macho-dump \ Added: head/usr.bin/clang/llvm-cov/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-cov/MakefileFri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +.include bsd.own.mk + +PROG_CXX=llvm-cov + +SRCDIR=tools/llvm-cov +SRCS= CodeCoverage.cpp \ + CoverageFilters.cpp \ + CoverageReport.cpp \ + CoverageSummary.cpp \ + CoverageSummaryInfo.cpp \ + SourceCoverageView.cpp \ + TestingSupport.cpp \ + gcov.cpp \ + llvm-cov.cpp + +LIBDEPS=llvmprofiledata \ + llvmobject \ + llvmmcparser \ + llvmmc \ + llvmbitreader \ + llvmcore \ + llvmsupport + +.include ../clang.prog.mk Added: head/usr.bin/clang/llvm-cov/llvm-cov.1 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-cov/llvm-cov.1 Fri Apr 3 19:43:39 2015 (r281049) @@ -0,0 +1,165 @@ +.\ $FreeBSD$ +.\ Man page generated from reStructuredText. +. +.TH LLVM-COV 1 2015-04-01 3.6 LLVM +.SH NAME +llvm-cov \- emit coverage information +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\ .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\ .rstReportMargin post: +.. +.de UNINDENT +. RE +.\ indent \\n[an-margin] +.\ old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\ new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-cov\fP [options] SOURCEFILE +.SH DESCRIPTION +.sp +The \fBllvm\-cov\fP tool reads code coverage data files and displays the +coverage information for a specified source file. It is compatible with the +\fBgcov\fP tool from version 4.2 of \fBGCC\fP and may also be compatible with +some later versions of \fBgcov\fP\. +.sp +To use llvm\-cov, you must first build an instrumented version of your +application that collects coverage data as it runs. Compile with the +\fB\-fprofile\-arcs\fP and \fB\-ftest\-coverage\fP options to add the +instrumentation. (Alternatively, you can use the \fB\-\-coverage\fP option, which +includes both of those other options.) You should compile with debugging +information (\fB\-g\fP) and without optimization (\fB\-O0\fP); otherwise, the +coverage data cannot be accurately mapped back to the source code. +.sp +At the time you compile the instrumented code, a \fB\.gcno\fP data file will be +generated for each object file. These \fB\.gcno\fP files contain half of the +coverage data. The other half of the data comes from \fB\.gcda\fP files that are +generated when you run the instrumented program, with a separate \fB\.gcda\fP +file for each object file. Each time you run the program, the execution counts +are summed
svn commit: r281050 - head/contrib/llvm
Author: dim Date: Fri Apr 3 19:49:39 2015 New Revision: 281050 URL: https://svnweb.freebsd.org/changeset/base/281050 Log: Update FREEBSD-Xlist for llvm. Modified: head/contrib/llvm/FREEBSD-Xlist Modified: head/contrib/llvm/FREEBSD-Xlist == --- head/contrib/llvm/FREEBSD-Xlist Fri Apr 3 19:43:39 2015 (r281049) +++ head/contrib/llvm/FREEBSD-Xlist Fri Apr 3 19:49:39 2015 (r281050) @@ -397,7 +397,9 @@ tools/llvm-bcanalyzer/LLVMBuild.txt tools/llvm-bcanalyzer/Makefile tools/llvm-c-test/ tools/llvm-config/ -tools/llvm-cov/ +tools/llvm-cov/CMakeLists.txt +tools/llvm-cov/LLVMBuild.txt +tools/llvm-cov/Makefile tools/llvm-diff/CMakeLists.txt tools/llvm-diff/LLVMBuild.txt tools/llvm-diff/Makefile @@ -424,7 +426,9 @@ tools/llvm-nm/Makefile tools/llvm-objdump/CMakeLists.txt tools/llvm-objdump/LLVMBuild.txt tools/llvm-objdump/Makefile -tools/llvm-profdata/ +tools/llvm-profdata/CMakeLists.txt +tools/llvm-profdata/LLVMBuild.txt +tools/llvm-profdata/Makefile tools/llvm-readobj/CMakeLists.txt tools/llvm-readobj/LLVMBuild.txt tools/llvm-readobj/Makefile ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r280980 - in head: . lib/csu/i386-elf sys/boot/i386/boot2 sys/boot/i386/gptboot sys/boot/i386/gptzfsboot sys/boot/i386/zfsboot sys/boot/mips/beri/boot2 sys/boot/pc98/boot0 sys/boot/pc98...
Author: dim Date: Thu Apr 2 06:58:17 2015 New Revision: 280980 URL: https://svnweb.freebsd.org/changeset/base/280980 Log: Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage. Reviewed by: rodrigc, imp, bapt, emaste MFC after:1 week Differential Revision: https://reviews.freebsd.org/D2187 Modified: head/Makefile.inc1 head/lib/csu/i386-elf/Makefile head/sys/boot/i386/boot2/Makefile head/sys/boot/i386/gptboot/Makefile head/sys/boot/i386/gptzfsboot/Makefile head/sys/boot/i386/zfsboot/Makefile head/sys/boot/mips/beri/boot2/Makefile head/sys/boot/pc98/boot0.5/Makefile head/sys/boot/pc98/boot0/Makefile head/sys/boot/pc98/boot2/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Apr 2 03:25:35 2015(r280979) +++ head/Makefile.inc1 Thu Apr 2 06:58:17 2015(r280980) @@ -411,8 +411,9 @@ LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU=i686 mmx sse sse2 LIB32WMAKEFLAGS= \ - AS=${AS} --32 \ - LD=${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32 + AS=${XAS} --32 \ + LD=${XLD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32 \ + OBJCOPY=${XOBJCOPY} .elif ${TARGET_ARCH} == powerpc64 .if empty(TARGET_CPUTYPE) @@ -422,7 +423,8 @@ LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc LIB32WMAKEFLAGS= \ - LD=${LD} -m elf32ppc_fbsd + LD=${XLD} -m elf32ppc_fbsd \ + OBJCOPY=${XOBJCOPY} .endif Modified: head/lib/csu/i386-elf/Makefile == --- head/lib/csu/i386-elf/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/lib/csu/i386-elf/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -35,7 +35,7 @@ crt1_c.o: crt1_c.s crt1.o:crt1_c.o crt1_s.o ${LD} ${_LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o - objcopy --localize-symbol _start1 crt1.o + ${OBJCOPY} --localize-symbol _start1 crt1.o Scrt1_c.s: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1_c.c @@ -46,7 +46,7 @@ Scrt1_c.o: Scrt1_c.s Scrt1.o: Scrt1_c.o crt1_s.o ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o - objcopy --localize-symbol _start1 Scrt1.o + ${OBJCOPY} --localize-symbol _start1 Scrt1.o realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ Modified: head/sys/boot/i386/boot2/Makefile == --- head/sys/boot/i386/boot2/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/boot2/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -61,7 +61,7 @@ boot: boot1 boot2 CLEANFILES+= boot1 boot1.out boot1.o boot1: boot1.out - objcopy -S -O binary boot1.out ${.TARGET} + ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o @@ -82,7 +82,7 @@ boot2.ldr: dd if=/dev/zero of=${.TARGET} bs=512 count=1 boot2.bin: boot2.out - objcopy -S -O binary boot2.out ${.TARGET} + ${OBJCOPY} -S -O binary boot2.out ${.TARGET} boot2.out: ${BTXCRT} boot2.o sio.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} Modified: head/sys/boot/i386/gptboot/Makefile == --- head/sys/boot/i386/gptboot/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/gptboot/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -55,7 +55,7 @@ gptboot: gptldr.bin gptboot.bin ${BTXKER CLEANFILES+= gptldr.bin gptldr.out gptldr.o gptldr.bin: gptldr.out - objcopy -S -O binary gptldr.out ${.TARGET} + ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o @@ -64,7 +64,7 @@ CLEANFILES+= gptboot.bin gptboot.out gpt cons.o util.o gptboot.bin: gptboot.out - objcopy -S -O binary gptboot.out ${.TARGET} + ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o gpt.o crc32.o drv.o cons.o util.o ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND} Modified: head/sys/boot/i386/gptzfsboot/Makefile == --- head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 2 03:25:35 2015 (r280979) +++ head/sys/boot/i386/gptzfsboot/Makefile Thu Apr 2 06:58:17 2015 (r280980) @@ -53,7 +53,7 @@ gptzfsboot: gptldr.bin gptzfsboot.bin ${ CLEANFILES+= gptldr.bin gptldr.out
svn commit: r280867 - head/contrib/llvm/patches
Author: dim Date: Mon Mar 30 20:23:06 2015 New Revision: 280867 URL: https://svnweb.freebsd.org/changeset/base/280867 Log: Add llvm patch corresponding to r280865. Added: head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff Added: head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-11-llvm-r231227-aarch64-tls-relocs.diff Mon Mar 30 20:23:06 2015(r280867) @@ -0,0 +1,811 @@ +Pull in r231227 from upstream llvm trunk (by Kristof Beyls): + + Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers + cannot handle yet. + + As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the + GNU linkers ld.bfd and ld.gold currently only support a subset of the + whole range of AArch64 ELF TLS relocations. Furthermore, they assume + that some of the code sequences to access thread-local variables are + produced in a very specific sequence. When the sequence is not as the + linker expects, it can silently mis-relaxe/mis-optimize the + instructions. + Even if that wouldn't be the case, it's good to produce the exact + sequence, as that ensures that linkers can perform optimizing + relaxations. + + This patch: + + * implements support for 16MiB TLS area size instead of 4GiB TLS area +size. Ideally clang would grow an -mtls-size option to allow +support for both, but that's not part of this patch. + * by default doesn't produce local dynamic access patterns, as even +modern ld.bfd and ld.gold linkers do not support the associated +relocations. An option (-aarch64-elf-ldtls-generation) is added to +enable generation of local dynamic code sequence, but is off by +default. + * makes sure that the exact expected code sequence for local dynamic +and general dynamic accesses is produced, by making use of a new +pseudo instruction. The patch also removes two +(AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing +AArch64-specific pseudo SDNode instructions that are superseded by +the new one (TLSDESC_CALLSEQ). + +Introduced here: https://svnweb.freebsd.org/changeset/base/280865 + +Index: lib/Target/AArch64/AArch64AsmPrinter.cpp +=== +--- lib/Target/AArch64/AArch64AsmPrinter.cpp lib/Target/AArch64/AArch64AsmPrinter.cpp +@@ -12,6 +12,8 @@ + // + //===--===// + ++#include MCTargetDesc/AArch64AddressingModes.h ++#include MCTargetDesc/AArch64MCExpr.h + #include AArch64.h + #include AArch64MCInstLower.h + #include AArch64MachineFunctionInfo.h +@@ -494,12 +496,47 @@ void AArch64AsmPrinter::EmitInstruction(const Mach + EmitToStreamer(OutStreamer, TmpInst); + return; + } +- case AArch64::TLSDESC_BLR: { +-MCOperand Callee, Sym; +-MCInstLowering.lowerOperand(MI-getOperand(0), Callee); +-MCInstLowering.lowerOperand(MI-getOperand(1), Sym); ++ case AArch64::TLSDESC_CALLSEQ: { ++/// lower this to: ++///adrp x0, :tlsdesc:var ++///ldr x1, [x0, #:tlsdesc_lo12:var] ++///add x0, x0, #:tlsdesc_lo12:var ++///.tlsdesccall var ++///blr x1 ++///(TPIDR_EL0 offset now in x0) ++const MachineOperand MO_Sym = MI-getOperand(0); ++MachineOperand MO_TLSDESC_LO12(MO_Sym), MO_TLSDESC(MO_Sym); ++MCOperand Sym, SymTLSDescLo12, SymTLSDesc; ++MO_TLSDESC_LO12.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGEOFF | ++ AArch64II::MO_NC); ++MO_TLSDESC.setTargetFlags(AArch64II::MO_TLS | AArch64II::MO_PAGE); ++MCInstLowering.lowerOperand(MO_Sym, Sym); ++MCInstLowering.lowerOperand(MO_TLSDESC_LO12, SymTLSDescLo12); ++MCInstLowering.lowerOperand(MO_TLSDESC, SymTLSDesc); + +-// First emit a relocation-annotation. This expands to no code, but requests ++MCInst Adrp; ++Adrp.setOpcode(AArch64::ADRP); ++Adrp.addOperand(MCOperand::CreateReg(AArch64::X0)); ++Adrp.addOperand(SymTLSDesc); ++EmitToStreamer(OutStreamer, Adrp); ++ ++MCInst Ldr; ++Ldr.setOpcode(AArch64::LDRXui); ++Ldr.addOperand(MCOperand::CreateReg(AArch64::X1)); ++Ldr.addOperand(MCOperand::CreateReg(AArch64::X0)); ++Ldr.addOperand(SymTLSDescLo12); ++Ldr.addOperand(MCOperand::CreateImm(0)); ++EmitToStreamer(OutStreamer, Ldr); ++ ++MCInst Add; ++Add.setOpcode(AArch64::ADDXri); ++Add.addOperand(MCOperand::CreateReg(AArch64::X0)); ++Add.addOperand(MCOperand::CreateReg(AArch64::X0)); ++Add.addOperand(SymTLSDescLo12); ++Add.addOperand(MCOperand::CreateImm(AArch64_AM::getShiftValue(0))); ++EmitToStreamer(OutStreamer, Add); ++ ++// Emit a relocation-annotation. This expands to no code, but requests + // the following
Re: svn commit: r280865 - in head/contrib/llvm/lib/Target/AArch64: . Utils
On 30 Mar 2015, at 22:01, Ed Maste ema...@freebsd.org wrote: Author: emaste Date: Mon Mar 30 20:01:41 2015 New Revision: 280865 URL: https://svnweb.freebsd.org/changeset/base/280865 Log: llvm: Backport upstream r229195 to fix arm64 TLS relocations Actually, this was upstream r231227: http://llvm.org/viewvc/llvm-project?view=revisionrevision=231227 Upstream r229195 was only a temporary workaround so llvm.org's clang-native-aarch64-full buildbot would not keep failing, and it got reverted after r231227 went in. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r280864 - head/contrib/libc++/include
Author: dim Date: Mon Mar 30 19:36:33 2015 New Revision: 280864 URL: https://svnweb.freebsd.org/changeset/base/280864 Log: Pull in r233552 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Fix PR22771 - Support access control SFINAE in the library version of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 This fixes building clang, and other programs using libc++, with newer versions of gcc (specifically, gcc 4.8 and higher). Reported by: rodrigc MFC after:1 week Modified: head/contrib/libc++/include/type_traits Modified: head/contrib/libc++/include/type_traits == --- head/contrib/libc++/include/type_traits Mon Mar 30 19:15:43 2015 (r280863) +++ head/contrib/libc++/include/type_traits Mon Mar 30 19:36:33 2015 (r280864) @@ -842,7 +842,16 @@ template class _T1, class _T2 struct _ namespace __is_convertible_imp { -template class _Tp char __test(_Tp); +template class _Tp void __test_convert(_Tp); + +template class _From, class _To, class = void +struct __is_convertible_test : public false_type {}; + +template class _From, class _To +struct __is_convertible_test_From, _To, +decltype(__test_convert_To(_VSTD::declval_From())) : public true_type +{}; + template class _Tp __two __test(...); #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template class _Tp _Tp __source(); @@ -877,10 +886,8 @@ template class _T1, class _T2, unsigned _T2_is_array_function_or_void = __is_convertible_imp::__is_array_function_or_void_T2::value struct __is_convertible : public integral_constantbool, -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - sizeof(__is_convertible_imp::__test_T2(__is_convertible_imp::__source_T1())) == 1 -#else - sizeof(__is_convertible_imp::__test_T2(__is_convertible_imp::__source_T1())) == 1 +__is_convertible_imp::__is_convertible_test_T1, _T2::value +#if defined(_LIBCPP_HAS_NO_RVALUE_REFERENCES) !(!is_function_T1::value !is_reference_T1::value is_reference_T2::value (!is_consttypename remove_reference_T2::type::value || is_volatiletypename remove_reference_T2::type::value) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r280784 - head/share/mk
Author: dim Date: Sat Mar 28 12:23:15 2015 New Revision: 280784 URL: https://svnweb.freebsd.org/changeset/base/280784 Log: Re-enable using -mllvm -enable-load-pre=false in CLANG_OPT_SMALL for clang versions before 3.5.0. This should enable building head's version of sys/boot/i386/boot2 on 9.x and 10.x again. Reported by: bz Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkSat Mar 28 10:20:20 2015(r280783) +++ head/share/mk/bsd.sys.mkSat Mar 28 12:23:15 2015(r280784) @@ -131,6 +131,8 @@ CLANG_OPT_SMALL= -mstack-alignment=8 -ml -mllvm -simplifycfg-dup-ret .if ${COMPILER_VERSION} = 30500 CLANG_OPT_SMALL+= -mllvm -enable-gvn=false +.else +CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false .endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == sparc64 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r280636 - head/include
On 26 Mar 2015, at 14:20, Tijl Coosemans t...@freebsd.org wrote: On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans b...@optusnet.com.au wrote: On Wed, 25 Mar 2015, Pedro Giffuni wrote: ... The reason why I had to revert the change is actually a systematic bug in gcc: during it's build process gcc generates a new cdefs.h from our headers. Attempting to use an older gcc from ports that was build with the broken mono-parameter __nonnull() ended up causing breakage in any code using signal.h or pthreads.h. I see. gcc's fixed headers cause lots of problems. I've complained about this multiple times in the past. The gcc ports should not install these fixed headers. Indeed. See also this recent discussion on -current: https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055111.html where a fixed stdio.h (from a gcc port) causes trouble. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r280400 - in head/contrib/llvm: include/llvm/CodeGen lib/CodeGen/SelectionDAG lib/Target/ARM
Author: dim Date: Mon Mar 23 21:13:29 2015 New Revision: 280400 URL: https://svnweb.freebsd.org/changeset/base/280400 Log: Pull in r230348 from upstream llvm trunk (by Tim Northover): ARM: treat [N x i32] and [N x i64] as AAPCS composite types The logic is almost there already, with our special homogeneous aggregate handling. Tweaking it like this allows front-ends to emit AAPCS compliant code without ever having to count registers or add discarded padding arguments. Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to apply the logic to all integer arrays for more consistency. This fixes a possible Unexpected member type for HA error when compiling lib/msun/bsdsrc/b_tgamma.c for armv6. Reported by: Jakub Palider j...@semihalf.com Modified: head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Modified: head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h == --- head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Mon Mar 23 20:51:35 2015(r280399) +++ head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Mon Mar 23 21:13:29 2015(r280400) @@ -122,8 +122,8 @@ public: // There is no need to differentiate between a pending CCValAssign and other // kinds, as they are stored in a different list. static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, -LocInfo HTP) { -return getReg(ValNo, ValVT, 0, LocVT, HTP); +LocInfo HTP, unsigned ExtraInfo = 0) { +return getReg(ValNo, ValVT, ExtraInfo, LocVT, HTP); } void convertToReg(unsigned RegNo) { @@ -146,6 +146,7 @@ public: unsigned getLocReg() const { assert(isRegLoc()); return Loc; } unsigned getLocMemOffset() const { assert(isMemLoc()); return Loc; } + unsigned getExtraInfo() const { return Loc; } MVT getLocVT() const { return LocVT; } LocInfo getLocInfo() const { return HTP; } Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp == --- head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 23 20:51:35 2015(r280399) +++ head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 23 21:13:29 2015(r280400) @@ -7429,11 +7429,8 @@ TargetLowering::LowerCallTo(TargetLoweri } if (Args[i].isNest) Flags.setNest(); - if (NeedsRegBlock) { + if (NeedsRegBlock) Flags.setInConsecutiveRegs(); -if (Value == NumValues - 1) - Flags.setInConsecutiveRegsLast(); - } Flags.setOrigAlign(OriginalAlignment); MVT PartVT = getRegisterType(CLI.RetTy-getContext(), VT); @@ -7482,6 +7479,9 @@ TargetLowering::LowerCallTo(TargetLoweri CLI.Outs.push_back(MyFlags); CLI.OutVals.push_back(Parts[j]); } + + if (NeedsRegBlock Value == NumValues - 1) +CLI.Outs[CLI.Outs.size() - 1].Flags.setInConsecutiveRegsLast(); } } @@ -7696,11 +7696,8 @@ void SelectionDAGISel::LowerArguments(co } if (F.getAttributes().hasAttribute(Idx, Attribute::Nest)) Flags.setNest(); - if (NeedsRegBlock) { + if (NeedsRegBlock) Flags.setInConsecutiveRegs(); -if (Value == NumValues - 1) - Flags.setInConsecutiveRegsLast(); - } Flags.setOrigAlign(OriginalAlignment); MVT RegisterVT = TLI-getRegisterType(*CurDAG-getContext(), VT); @@ -7715,6 +7712,8 @@ void SelectionDAGISel::LowerArguments(co MyFlags.Flags.setOrigAlign(1); Ins.push_back(MyFlags); } + if (NeedsRegBlock Value == NumValues - 1) +Ins[Ins.size() - 1].Flags.setInConsecutiveRegsLast(); PartBase += VT.getStoreSize(); } } Modified: head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h == --- head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h Mon Mar 23 20:51:35 2015(r280399) +++ head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h Mon Mar 23 21:13:29 2015(r280400) @@ -160,6 +160,8 @@ static bool RetCC_ARM_AAPCS_Custom_f64(u State); } +static const uint16_t RRegList[] = { ARM::R0, ARM::R1, ARM::R2, ARM::R3 }; + static const uint16_t SRegList[] = { ARM::S0, ARM::S1, ARM::S2, ARM::S3, ARM::S4, ARM::S5, ARM::S6, ARM::S7, ARM::S8, ARM::S9, ARM::S10, ARM::S11, @@ -168,81 +170,114 @@ static const uint16_t DRegList[] = { ARM
svn commit: r280401 - head/contrib/llvm/patches
Author: dim Date: Mon Mar 23 21:15:07 2015 New Revision: 280401 URL: https://svnweb.freebsd.org/changeset/base/280401 Log: Add llvm patch corresponding to r280400. Added: head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff Added: head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff Mon Mar 23 21:15:07 2015(r280401) @@ -0,0 +1,419 @@ +Pull in r230348 from upstream llvm trunk (by Tim Northover): + + ARM: treat [N x i32] and [N x i64] as AAPCS composite types + + The logic is almost there already, with our special homogeneous + aggregate handling. Tweaking it like this allows front-ends to emit + AAPCS compliant code without ever having to count registers or add + discarded padding arguments. + + Only arrays of i32 and i64 are needed to model AAPCS rules, but I + decided to apply the logic to all integer arrays for more consistency. + +This fixes a possible Unexpected member type for HA error when +compiling lib/msun/bsdsrc/b_tgamma.c for armv6. + +Reported by: Jakub Palider j...@semihalf.com + +Introduced here: https://svnweb.freebsd.org/changeset/base/280400 + +Index: include/llvm/CodeGen/CallingConvLower.h +=== +--- include/llvm/CodeGen/CallingConvLower.h include/llvm/CodeGen/CallingConvLower.h +@@ -122,8 +122,8 @@ class CCValAssign { + // There is no need to differentiate between a pending CCValAssign and other + // kinds, as they are stored in a different list. + static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, +-LocInfo HTP) { +-return getReg(ValNo, ValVT, 0, LocVT, HTP); ++LocInfo HTP, unsigned ExtraInfo = 0) { ++return getReg(ValNo, ValVT, ExtraInfo, LocVT, HTP); + } + + void convertToReg(unsigned RegNo) { +@@ -146,6 +146,7 @@ class CCValAssign { + + unsigned getLocReg() const { assert(isRegLoc()); return Loc; } + unsigned getLocMemOffset() const { assert(isMemLoc()); return Loc; } ++ unsigned getExtraInfo() const { return Loc; } + MVT getLocVT() const { return LocVT; } + + LocInfo getLocInfo() const { return HTP; } +Index: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +=== +--- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +@@ -7429,11 +7429,8 @@ TargetLowering::LowerCallTo(TargetLowering::CallLo + } + if (Args[i].isNest) + Flags.setNest(); +- if (NeedsRegBlock) { ++ if (NeedsRegBlock) + Flags.setInConsecutiveRegs(); +-if (Value == NumValues - 1) +- Flags.setInConsecutiveRegsLast(); +- } + Flags.setOrigAlign(OriginalAlignment); + + MVT PartVT = getRegisterType(CLI.RetTy-getContext(), VT); +@@ -7482,6 +7479,9 @@ TargetLowering::LowerCallTo(TargetLowering::CallLo + CLI.Outs.push_back(MyFlags); + CLI.OutVals.push_back(Parts[j]); + } ++ ++ if (NeedsRegBlock Value == NumValues - 1) ++CLI.Outs[CLI.Outs.size() - 1].Flags.setInConsecutiveRegsLast(); + } + } + +@@ -7696,11 +7696,8 @@ void SelectionDAGISel::LowerArguments(const Functi + } + if (F.getAttributes().hasAttribute(Idx, Attribute::Nest)) + Flags.setNest(); +- if (NeedsRegBlock) { ++ if (NeedsRegBlock) + Flags.setInConsecutiveRegs(); +-if (Value == NumValues - 1) +- Flags.setInConsecutiveRegsLast(); +- } + Flags.setOrigAlign(OriginalAlignment); + + MVT RegisterVT = TLI-getRegisterType(*CurDAG-getContext(), VT); +@@ -7715,6 +7712,8 @@ void SelectionDAGISel::LowerArguments(const Functi + MyFlags.Flags.setOrigAlign(1); + Ins.push_back(MyFlags); + } ++ if (NeedsRegBlock Value == NumValues - 1) ++Ins[Ins.size() - 1].Flags.setInConsecutiveRegsLast(); + PartBase += VT.getStoreSize(); + } + } +Index: lib/Target/ARM/ARMCallingConv.h +=== +--- lib/Target/ARM/ARMCallingConv.h lib/Target/ARM/ARMCallingConv.h +@@ -160,6 +160,8 @@ static bool RetCC_ARM_AAPCS_Custom_f64(unsigned V +State); + } + ++static const uint16_t RRegList[] = { ARM::R0, ARM::R1, ARM::R2, ARM::R3 }; ++ + static const uint16_t SRegList[] = { ARM::S0, ARM::S1, ARM::S2, ARM::S3, + ARM::S4, ARM::S5, ARM::S6, ARM::S7, + ARM::S8, ARM::S9, ARM::S10, ARM::S11, +@@ -168,81 +170,114 @@ static const uint16_t DRegList[] = { ARM::D0, ARM: + ARM::D4, ARM::D5, ARM::D6, ARM::D7 };
svn commit: r280350 - in head/contrib/llvm: . tools/clang tools/lldb
Author: dim Date: Sun Mar 22 17:56:49 2015 New Revision: 280350 URL: https://svnweb.freebsd.org/changeset/base/280350 Log: Add FREEBSD-Xlist files for llvm, clang and lldb. These are generated, and not optimized in any way, since I am not entirely sure of the syntax or format of this type of file. Feel free to suggest ways of shortening these lists. The general idea is the same for all three files, though: * Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc) * Delete tests, tools and utilities we don't want or use (including samples) * Remove various bits of upstream metadata files that we don't want or use (.arcconfig, .gitignore, etc) Added: head/contrib/llvm/FREEBSD-Xlist (contents, props changed) head/contrib/llvm/tools/clang/FREEBSD-Xlist (contents, props changed) head/contrib/llvm/tools/lldb/FREEBSD-Xlist (contents, props changed) Added: head/contrib/llvm/FREEBSD-Xlist == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/FREEBSD-Xlist Sun Mar 22 17:56:49 2015 (r280350) @@ -0,0 +1,514 @@ +# $FreeBSD$ +.arcconfig +.clang-format +.clang-tidy +.gitignore +CMakeLists.txt +CODE_OWNERS.TXT +CREDITS.TXT +LLVMBuild.txt +Makefile +Makefile.common +Makefile.config.in +Makefile.rules +README.txt +autoconf/ +bindings/ +cmake/ +configure +docs/ +examples/ +include/llvm/CMakeLists.txt +include/llvm/Config/ +include/llvm/IR/CMakeLists.txt +include/llvm/Support/DataTypes.h.cmake +include/llvm/Support/LICENSE.TXT +lib/Analysis/CMakeLists.txt +lib/Analysis/IPA/CMakeLists.txt +lib/Analysis/IPA/LLVMBuild.txt +lib/Analysis/IPA/Makefile +lib/Analysis/LLVMBuild.txt +lib/Analysis/Makefile +lib/Analysis/README.txt +lib/AsmParser/CMakeLists.txt +lib/AsmParser/LLVMBuild.txt +lib/AsmParser/Makefile +lib/Bitcode/CMakeLists.txt +lib/Bitcode/LLVMBuild.txt +lib/Bitcode/Makefile +lib/Bitcode/Reader/CMakeLists.txt +lib/Bitcode/Reader/LLVMBuild.txt +lib/Bitcode/Reader/Makefile +lib/Bitcode/Writer/CMakeLists.txt +lib/Bitcode/Writer/LLVMBuild.txt +lib/Bitcode/Writer/Makefile +lib/CMakeLists.txt +lib/CodeGen/AsmPrinter/CMakeLists.txt +lib/CodeGen/AsmPrinter/LLVMBuild.txt +lib/CodeGen/AsmPrinter/Makefile +lib/CodeGen/CMakeLists.txt +lib/CodeGen/LLVMBuild.txt +lib/CodeGen/Makefile +lib/CodeGen/README.txt +lib/CodeGen/SelectionDAG/CMakeLists.txt +lib/CodeGen/SelectionDAG/LLVMBuild.txt +lib/CodeGen/SelectionDAG/Makefile +lib/DebugInfo/CMakeLists.txt +lib/DebugInfo/LLVMBuild.txt +lib/DebugInfo/Makefile +lib/ExecutionEngine/CMakeLists.txt +lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt +lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt +lib/ExecutionEngine/IntelJITEvents/Makefile +lib/ExecutionEngine/Interpreter/CMakeLists.txt +lib/ExecutionEngine/Interpreter/LLVMBuild.txt +lib/ExecutionEngine/Interpreter/Makefile +lib/ExecutionEngine/LLVMBuild.txt +lib/ExecutionEngine/MCJIT/CMakeLists.txt +lib/ExecutionEngine/MCJIT/LLVMBuild.txt +lib/ExecutionEngine/MCJIT/Makefile +lib/ExecutionEngine/Makefile +lib/ExecutionEngine/OProfileJIT/CMakeLists.txt +lib/ExecutionEngine/OProfileJIT/LLVMBuild.txt +lib/ExecutionEngine/OProfileJIT/Makefile +lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt +lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt +lib/ExecutionEngine/RuntimeDyld/Makefile +lib/IR/CMakeLists.txt +lib/IR/LLVMBuild.txt +lib/IR/Makefile +lib/IRReader/CMakeLists.txt +lib/IRReader/LLVMBuild.txt +lib/IRReader/Makefile +lib/LLVMBuild.txt +lib/LTO/CMakeLists.txt +lib/LTO/LLVMBuild.txt +lib/LTO/Makefile +lib/LineEditor/CMakeLists.txt +lib/LineEditor/LLVMBuild.txt +lib/LineEditor/Makefile +lib/Linker/CMakeLists.txt +lib/Linker/LLVMBuild.txt +lib/Linker/Makefile +lib/MC/CMakeLists.txt +lib/MC/LLVMBuild.txt +lib/MC/MCDisassembler/CMakeLists.txt +lib/MC/MCDisassembler/LLVMBuild.txt +lib/MC/MCDisassembler/Makefile +lib/MC/MCParser/CMakeLists.txt +lib/MC/MCParser/LLVMBuild.txt +lib/MC/MCParser/Makefile +lib/MC/Makefile +lib/Makefile +lib/Object/CMakeLists.txt +lib/Object/LLVMBuild.txt +lib/Object/Makefile +lib/Option/CMakeLists.txt +lib/Option/LLVMBuild.txt +lib/Option/Makefile +lib/ProfileData/CMakeLists.txt +lib/ProfileData/LLVMBuild.txt +lib/ProfileData/Makefile +lib/Support/CMakeLists.txt +lib/Support/LLVMBuild.txt +lib/Support/Makefile +lib/Support/README.txt.system +lib/TableGen/CMakeLists.txt +lib/TableGen/LLVMBuild.txt +lib/TableGen/Makefile +lib/Target/AArch64/AsmParser/CMakeLists.txt +lib/Target/AArch64/AsmParser/LLVMBuild.txt +lib/Target/AArch64/AsmParser/Makefile +lib/Target/AArch64/CMakeLists.txt +lib/Target/AArch64/Disassembler/CMakeLists.txt +lib/Target/AArch64/Disassembler/LLVMBuild.txt +lib/Target/AArch64/Disassembler/Makefile +lib/Target/AArch64/InstPrinter/CMakeLists.txt +lib/Target/AArch64/InstPrinter/LLVMBuild.txt +lib/Target/AArch64/InstPrinter/Makefile +lib/Target/AArch64/LLVMBuild.txt +lib/Target/AArch64/MCTargetDesc/CMakeLists.txt
svn commit: r280328 - head/share/mk
Author: dim Date: Sat Mar 21 19:13:13 2015 New Revision: 280328 URL: https://svnweb.freebsd.org/changeset/base/280328 Log: Correctly pass the -mllvm -enable-gvn=false flag in CLANG_OPT_SMALL (this has to be passed as a combination of two flags). Should fix the case where the clang version is before 3.5.0. Submitted by: Pedro Arthur bygran...@gmail.com X-MFC-With: r279018, r279378 Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkSat Mar 21 17:56:55 2015(r280327) +++ head/share/mk/bsd.sys.mkSat Mar 21 19:13:13 2015(r280328) @@ -128,9 +128,9 @@ CWARNFLAGS+=-Wno-unknown-pragmas CLANG_NO_IAS= -no-integrated-as .endif CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ --mllvm -simplifycfg-dup-ret -mllvm +-mllvm -simplifycfg-dup-ret .if ${COMPILER_VERSION} = 30500 -CLANG_OPT_SMALL+= -enable-gvn=false +CLANG_OPT_SMALL+= -mllvm -enable-gvn=false .endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == sparc64 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279980 - head/share/mk
Author: dim Date: Sat Mar 14 12:29:44 2015 New Revision: 279980 URL: https://svnweb.freebsd.org/changeset/base/279980 Log: Allow relative pathnames in SRCS, so as to enable building software which includes more than one file with the same name, in different directories. For example, setting: SRCS+=foo/foo.c bar/foo.c baz/foo.c will now create separate objdirs 'foo', 'bar' and 'baz' for each of the sources in the list, and use those objdirs for the corresponding object files. Reviewed by: brooks, imp MFC after:1 week Differential Revision: https://reviews.freebsd.org/D1984 Modified: head/share/mk/bsd.obj.mk head/share/mk/sys.mk Modified: head/share/mk/bsd.obj.mk == --- head/share/mk/bsd.obj.mkSat Mar 14 12:18:26 2015(r279979) +++ head/share/mk/bsd.obj.mkSat Mar 14 12:29:44 2015(r279980) @@ -89,6 +89,16 @@ obj: .PHONY fi; \ ${ECHO} ${CANONICALOBJDIR} created for ${.CURDIR}; \ fi +.for dir in ${SRCS:H:O:u} + @if ! test -d ${CANONICALOBJDIR}/${dir}/; then \ + mkdir -p ${CANONICALOBJDIR}/${dir}; \ + if ! test -d ${CANONICALOBJDIR}/${dir}/; then \ + ${ECHO} Unable to create ${CANONICALOBJDIR}/${dir}.; \ + exit 1; \ + fi; \ + ${ECHO} ${CANONICALOBJDIR}/${dir} created for ${.CURDIR}; \ + fi +.endfor .endif .if !target(objlink) Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkSat Mar 14 12:18:26 2015(r279979) +++ head/share/mk/sys.mkSat Mar 14 12:29:44 2015(r279980) @@ -242,21 +242,21 @@ YFLAGS?= -d ${CTFCONVERT_CMD} .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .cc.o .cpp.o .cxx.o .C.o: - ${CXX} ${CXXFLAGS} -c ${.IMPSRC} + ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .m.o: - ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} + ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .p.o: - ${PC} ${PFLAGS} -c ${.IMPSRC} + ${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .e .r .F .f: @@ -264,14 +264,15 @@ YFLAGS?= -d -o ${.TARGET} .e.o .r.o .F.o .f.o: - ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} + ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET} .S.o: - ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .asm.o: - ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} + ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \ + -o ${.TARGET} ${CTFCONVERT_CMD} .s.o: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279981 - in head: contrib/compiler-rt/lib/builtins lib/libcompiler_rt
Author: dim Date: Sat Mar 14 12:40:19 2015 New Revision: 279981 URL: https://svnweb.freebsd.org/changeset/base/279981 Log: Pull in r231965 from upstream compiler-rt trunk (by Jörg Sonnenberger): Refactor float to integer conversion to share the same code. 80bit Intel/PPC long double is excluded due to lacking support for the abstraction. Consistently provide saturation logic. Extend to long double on 128bit IEEE extended platforms. Initial patch with test cases from GuanHong Liu. Reviewed by Steve Canon. Differential Revision: http://reviews.llvm.org/D2804 Pull in r232107 from upstream compiler-rt trunk (by Ed Maste): Use signed int implementation for __fixint Requested by: emaste Added: head/contrib/compiler-rt/lib/builtins/fixtfdi.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fixtfsi.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fixtfti.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fixunstfdi.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fixunstfsi.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fixunstfti.c (contents, props changed) head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc (contents, props changed) head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc (contents, props changed) Modified: head/contrib/compiler-rt/lib/builtins/fixdfdi.c head/contrib/compiler-rt/lib/builtins/fixdfsi.c head/contrib/compiler-rt/lib/builtins/fixdfti.c head/contrib/compiler-rt/lib/builtins/fixsfdi.c head/contrib/compiler-rt/lib/builtins/fixsfsi.c head/contrib/compiler-rt/lib/builtins/fixsfti.c head/contrib/compiler-rt/lib/builtins/fixunsdfdi.c head/contrib/compiler-rt/lib/builtins/fixunsdfsi.c head/contrib/compiler-rt/lib/builtins/fixunsdfti.c head/contrib/compiler-rt/lib/builtins/fixunssfdi.c head/contrib/compiler-rt/lib/builtins/fixunssfsi.c head/contrib/compiler-rt/lib/builtins/fixunssfti.c head/contrib/compiler-rt/lib/builtins/fixunsxfdi.c head/contrib/compiler-rt/lib/builtins/fixunsxfsi.c head/contrib/compiler-rt/lib/builtins/fixunsxfti.c head/contrib/compiler-rt/lib/builtins/fixxfdi.c head/contrib/compiler-rt/lib/builtins/fixxfti.c head/lib/libcompiler_rt/Makefile Modified: head/contrib/compiler-rt/lib/builtins/fixdfdi.c == --- head/contrib/compiler-rt/lib/builtins/fixdfdi.c Sat Mar 14 12:29:44 2015(r279980) +++ head/contrib/compiler-rt/lib/builtins/fixdfdi.c Sat Mar 14 12:40:19 2015(r279981) @@ -6,40 +6,17 @@ * Source Licenses. See LICENSE.TXT for details. * * ===--=== - * - * This file implements __fixdfdi for the compiler_rt library. - * - * ===--=== */ -#include int_lib.h - -/* Returns: convert a to a signed long long, rounding toward zero. */ - -/* Assumption: double is a IEEE 64 bit floating point type - *su_int is a 32 bit integral type - *value in double is representable in di_int (no range checking performed) - */ - -/* seee | */ - +#define DOUBLE_PRECISION +#include fp_lib.h ARM_EABI_FNALIAS(d2lz, fixdfdi) +typedef di_int fixint_t; +typedef du_int fixuint_t; +#include fp_fixint_impl.inc + COMPILER_RT_ABI di_int -__fixdfdi(double a) -{ -double_bits fb; -fb.f = a; -int e = ((fb.u.s.high 0x7FF0) 20) - 1023; -if (e 0) -return 0; -di_int s = (si_int)(fb.u.s.high 0x8000) 31; -dwords r; -r.s.high = (fb.u.s.high 0x000F) | 0x0010; -r.s.low = fb.u.s.low; -if (e 52) -r.all = (e - 52); -else -r.all = (52 - e); -return (r.all ^ s) - s; -} +__fixdfdi(fp_t a) { +return __fixint(a); +} Modified: head/contrib/compiler-rt/lib/builtins/fixdfsi.c == --- head/contrib/compiler-rt/lib/builtins/fixdfsi.c Sat Mar 14 12:29:44 2015(r279980) +++ head/contrib/compiler-rt/lib/builtins/fixdfsi.c Sat Mar 14 12:40:19 2015(r279981) @@ -1,50 +1,22 @@ -//===-- lib/fixdfsi.c - Double-precision - integer conversion *- C -*-===// -// -// 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. -// -//===--===// -// -// This file implements double-precision to integer conversion for the -// compiler-rt library. No range checking is performed; the behavior of this -// conversion is undefined for out of range values in the C standard. -//
svn commit: r279994 - head/sys/conf
Author: dim Date: Sat Mar 14 17:19:48 2015 New Revision: 279994 URL: https://svnweb.freebsd.org/changeset/base/279994 Log: Amend r277940, by also disabling -Wcast-qual warnings for a few specific aesni files on i386. Modified: head/sys/conf/files.i386 Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Sat Mar 14 17:08:28 2015(r279993) +++ head/sys/conf/files.i386Sat Mar 14 17:19:48 2015(r279994) @@ -118,12 +118,12 @@ crypto/aesni/aeskeys_i386.S optional aes crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ dependency $S/crypto/aesni/aesni_ghash.c \ - compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} \ + compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} \ no-implicit-rule\ clean aesni_ghash.o aesni_wrap.o optional aesni \ dependency $S/crypto/aesni/aesni_wrap.c \ - compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC} \ + compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC} \ no-implicit-rule\ clean aesni_wrap.o crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279760 - head/lib/libnv/tests
Author: dim Date: Sun Mar 8 00:30:52 2015 New Revision: 279760 URL: https://svnweb.freebsd.org/changeset/base/279760 Log: Fix lib/libnv tests compilation with -std=c++11, by adding appropriate casts for NULL to invocations of the ATF_REQUIER_EQ() macro. Reviewed by: rstone, jmmv Differential Revision: https://reviews.freebsd.org/D2027 Modified: head/lib/libnv/tests/dnv_tests.cc head/lib/libnv/tests/nv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc == --- head/lib/libnv/tests/dnv_tests.cc Sat Mar 7 23:01:27 2015 (r279759) +++ head/lib/libnv/tests/dnv_tests.cc Sun Mar 8 00:30:52 2015 (r279760) @@ -450,7 +450,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_nvlist__ nvl = nvlist_create(0); actual_val = dnvlist_take_nvlist(nvl, 123, NULL); - ATF_REQUIRE_EQ(actual_val, NULL); + ATF_REQUIRE_EQ(actual_val, static_castnvlist_t *(NULL)); free(actual_val); nvlist_destroy(nvl); Modified: head/lib/libnv/tests/nv_tests.cc == --- head/lib/libnv/tests/nv_tests.ccSat Mar 7 23:01:27 2015 (r279759) +++ head/lib/libnv/tests/nv_tests.ccSun Mar 8 00:30:52 2015 (r279760) @@ -54,7 +54,7 @@ ATF_TEST_CASE_BODY(nvlist_create__is_emp ATF_REQUIRE(nvlist_empty(nvl)); it = NULL; - ATF_REQUIRE_EQ(nvlist_next(nvl, type, it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type, it), static_castconst char *(NULL)); nvlist_destroy(nvl); } @@ -85,7 +85,7 @@ ATF_TEST_CASE_BODY(nvlist_add_null__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NULL); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(nvl); } @@ -118,7 +118,7 @@ ATF_TEST_CASE_BODY(nvlist_add_bool__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BOOL); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(nvl); } @@ -153,7 +153,7 @@ ATF_TEST_CASE_BODY(nvlist_add_number__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(nvl); } @@ -191,7 +191,7 @@ ATF_TEST_CASE_BODY(nvlist_add_string__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(nvl); } @@ -237,7 +237,7 @@ ATF_TEST_CASE_BODY(nvlist_add_nvlist__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(sublist); nvlist_destroy(nvl); @@ -303,7 +303,7 @@ ATF_TEST_CASE_BODY(nvlist_add_binary__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BINARY); - ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type,it), static_castconst char *(NULL)); nvlist_destroy(nvl); free(value); @@ -352,7 +352,7 @@ ATF_TEST_CASE_BODY(nvlist_clone__nonempt it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(clone, type, it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(clone, type, it), NULL); + ATF_REQUIRE_EQ(nvlist_next(clone, type, it), static_castconst char *(NULL)); nvlist_destroy(clone); nvlist_destroy(nvl); @@ -400,13 +400,13 @@ verify_test_nvlist(const nvlist_t *nvl) ATF_REQUIRE_EQ(strcmp(nvlist_next(value, type, it), test_string_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(value, type, it), NULL); + ATF_REQUIRE_EQ(nvlist_next(value, type, it), static_castconst char *(NULL)); it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, type, it), test_subnvlist_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, type, it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, type, it), static_castconst char *(NULL)); } ATF_TEST_CASE_WITHOUT_HEAD(nvlist_clone__nested_nvlist);
svn commit: r279757 - head/contrib/libc++/include
Author: dim Date: Sat Mar 7 22:53:15 2015 New Revision: 279757 URL: https://svnweb.freebsd.org/changeset/base/279757 Log: Pull in r228344 from upstream libc++ trunk (by Eric Fiselier): Get tests running with warnings. Fix warnings in headers and tests This fixes a number of -Wunused-local-typedef warnings in libc++ headers. MFC after:3 days Modified: head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/algorithm Modified: head/contrib/libc++/include/__bit_reference == --- head/contrib/libc++/include/__bit_reference Sat Mar 7 22:46:35 2015 (r279756) +++ head/contrib/libc++/include/__bit_reference Sat Mar 7 22:53:15 2015 (r279757) @@ -906,7 +906,6 @@ rotate(__bit_iterator_Cp, false __firs { typedef __bit_iterator_Cp, false _I1; typedef typename _I1::difference_type difference_type; -typedef typename _I1::__storage_type __storage_type; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; Modified: head/contrib/libc++/include/algorithm == --- head/contrib/libc++/include/algorithm Sat Mar 7 22:46:35 2015 (r279756) +++ head/contrib/libc++/include/algorithm Sat Mar 7 22:53:15 2015 (r279757) @@ -4365,8 +4365,6 @@ __buffered_inplace_merge(_BidirectionalI typename iterator_traits_BidirectionalIterator::value_type* __buff) { typedef typename iterator_traits_BidirectionalIterator::value_type value_type; -typedef typename iterator_traits_BidirectionalIterator::difference_type difference_type; -typedef typename iterator_traits_BidirectionalIterator::pointer pointer; __destruct_n __d(0); unique_ptrvalue_type, __destruct_n __h2(__buff, __d); if (__len1 = __len2) @@ -4400,7 +4398,6 @@ __inplace_merge(_BidirectionalIterator _ typename iterator_traits_BidirectionalIterator::difference_type __len2, typename iterator_traits_BidirectionalIterator::value_type* __buff, ptrdiff_t __buff_size) { -typedef typename iterator_traits_BidirectionalIterator::value_type value_type; typedef typename iterator_traits_BidirectionalIterator::difference_type difference_type; while (true) { @@ -4799,7 +4796,6 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, typename iterator_traits_RandomAccessIterator::difference_type __len) { -typedef typename iterator_traits_RandomAccessIterator::difference_type difference_type; typedef typename iterator_traits_RandomAccessIterator::value_type value_type; if (__len 1) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279758 - head/contrib/libc++/include
Author: dim Date: Sat Mar 7 22:55:31 2015 New Revision: 279758 URL: https://svnweb.freebsd.org/changeset/base/279758 Log: Fix another -Wunused-local-typedef warning in libc++, in include/__tree. MFC after:3 days Modified: head/contrib/libc++/include/__tree Modified: head/contrib/libc++/include/__tree == --- head/contrib/libc++/include/__tree Sat Mar 7 22:53:15 2015 (r279757) +++ head/contrib/libc++/include/__tree Sat Mar 7 22:55:31 2015 (r279758) @@ -2069,7 +2069,6 @@ template class _Key typename __tree_Tp, _Compare, _Allocator::size_type __tree_Tp, _Compare, _Allocator::__count_multi(const _Key __k) const { -typedef pairconst_iterator, const_iterator _Pp; __node_const_pointer __result = __end_node(); __node_const_pointer __rt = __root(); while (__rt != nullptr) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279598 - in head/sys/boot: i386/boot2 pc98/boot2
Author: dim Date: Wed Mar 4 20:33:15 2015 New Revision: 279598 URL: https://svnweb.freebsd.org/changeset/base/279598 Log: When compiling boot2 with gcc on i386 and pc98, only use the custom flag -mno-align-long-strings when compiling with base gcc. This is checked by comparing the version number against 4.2.1, which is not exactly right, but good enough. (There is no other way to check whether we are using the non-standard gcc in base, as far as I know.) Reported by: rodrigc MFC after:3 days Modified: head/sys/boot/i386/boot2/Makefile head/sys/boot/pc98/boot2/Makefile Modified: head/sys/boot/i386/boot2/Makefile == --- head/sys/boot/i386/boot2/Makefile Wed Mar 4 20:04:23 2015 (r279597) +++ head/sys/boot/i386/boot2/Makefile Wed Mar 4 20:33:15 2015 (r279598) @@ -41,8 +41,10 @@ CFLAGS= -fomit-frame-pointer \ CFLAGS.gcc+= -Os \ -fno-guess-branch-probability \ -fno-unit-at-a-time \ - -mno-align-long-strings \ --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == gcc ${COMPILER_VERSION} = 40201 +CFLAGS.gcc+= -mno-align-long-strings +.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} Modified: head/sys/boot/pc98/boot2/Makefile == --- head/sys/boot/pc98/boot2/Makefile Wed Mar 4 20:04:23 2015 (r279597) +++ head/sys/boot/pc98/boot2/Makefile Wed Mar 4 20:33:15 2015 (r279598) @@ -39,8 +39,10 @@ CFLAGS= -fomit-frame-pointer \ CFLAGS.gcc+= -Os \ -fno-guess-branch-probability \ -fno-unit-at-a-time \ - -mno-align-long-strings \ --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == gcc ${COMPILER_VERSION} = 40201 +CFLAGS.gcc+= -mno-align-long-strings +.endif # Set machine type to PC98_SYSTEM_PARAMETER #CFLAGS+= -DSET_MACHINE_TYPE ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279307 - head/contrib/libcxxrt
Author: dim Date: Thu Feb 26 07:20:05 2015 New Revision: 279307 URL: https://svnweb.freebsd.org/changeset/base/279307 Log: Make libcxxrt's parsing of DWARF exception handling tables work on architectures with strict alignment, by using memcpy() instead of directly reading fields. Reported by: Daisuke Aoyama aoy...@peach.ne.jp Reviewed by: imp, bapt Tested by:bapt MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1967 Modified: head/contrib/libcxxrt/dwarf_eh.h Modified: head/contrib/libcxxrt/dwarf_eh.h == --- head/contrib/libcxxrt/dwarf_eh.hThu Feb 26 02:22:47 2015 (r279306) +++ head/contrib/libcxxrt/dwarf_eh.hThu Feb 26 07:20:05 2015 (r279307) @@ -218,15 +218,17 @@ static int64_t read_sleb128(dw_eh_ptr_t static uint64_t read_value(char encoding, dw_eh_ptr_t *data) { enum dwarf_data_encoding type = get_encoding(encoding); - uint64_t v; switch (type) { // Read fixed-length types #define READ(dwarf, type) \ case dwarf:\ - v = static_castuint64_t(*reinterpret_casttype*(*data));\ - *data += sizeof(type);\ - break; + {\ + type t;\ + memcpy(t, *data, sizeof t);\ + *data += sizeof t;\ + return static_castuint64_t(t);\ + } READ(DW_EH_PE_udata2, uint16_t) READ(DW_EH_PE_udata4, uint32_t) READ(DW_EH_PE_udata8, uint64_t) @@ -237,15 +239,11 @@ static uint64_t read_value(char encoding #undef READ // Read variable-length types case DW_EH_PE_sleb128: - v = read_sleb128(data); - break; + return read_sleb128(data); case DW_EH_PE_uleb128: - v = read_uleb128(data); - break; + return read_uleb128(data); default: abort(); } - - return v; } /** ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279312 - in head/sys/arm: arm ti ti/am335x ti/omap4
Author: dim Date: Thu Feb 26 07:47:35 2015 New Revision: 279312 URL: https://svnweb.freebsd.org/changeset/base/279312 Log: Fix a number of -Wcast-qual warnings under sys/arm. No functional change. Submitted by: andrew MFC after:3 days Modified: head/sys/arm/arm/disassem.c head/sys/arm/ti/am335x/am335x_scm_padconf.c head/sys/arm/ti/omap4/omap4_scm_padconf.c head/sys/arm/ti/ti_scm.h Modified: head/sys/arm/arm/disassem.c == --- head/sys/arm/arm/disassem.c Thu Feb 26 07:45:40 2015(r279311) +++ head/sys/arm/arm/disassem.c Thu Feb 26 07:47:35 2015(r279312) @@ -289,7 +289,7 @@ static void disassemble_printaddr(u_int vm_offset_t disasm(const disasm_interface_t *di, vm_offset_t loc, int altfmt) { - struct arm32_insn *i_ptr = (struct arm32_insn *)arm32_i; + const struct arm32_insn *i_ptr = arm32_i; u_int insn; int matchp; Modified: head/sys/arm/ti/am335x/am335x_scm_padconf.c == --- head/sys/arm/ti/am335x/am335x_scm_padconf.c Thu Feb 26 07:45:40 2015 (r279311) +++ head/sys/arm/ti/am335x/am335x_scm_padconf.c Thu Feb 26 07:47:35 2015 (r279312) @@ -298,6 +298,6 @@ const static struct ti_scm_padconf ti_pa const struct ti_scm_device ti_scm_dev = { .padconf_muxmode_mask = 0x7, .padconf_sate_mask = 0x78, - .padstate = (struct ti_scm_padstate *) ti_padstate_devmap, - .padconf= (struct ti_scm_padconf *) ti_padconf_devmap, + .padstate = ti_padstate_devmap, + .padconf= ti_padconf_devmap, }; Modified: head/sys/arm/ti/omap4/omap4_scm_padconf.c == --- head/sys/arm/ti/omap4/omap4_scm_padconf.c Thu Feb 26 07:45:40 2015 (r279311) +++ head/sys/arm/ti/omap4/omap4_scm_padconf.c Thu Feb 26 07:47:35 2015 (r279312) @@ -298,6 +298,6 @@ const static struct ti_scm_padconf ti_pa const struct ti_scm_device ti_scm_dev = { .padconf_muxmode_mask = CONTROL_PADCONF_MUXMODE_MASK, .padconf_sate_mask = CONTROL_PADCONF_SATE_MASK, - .padstate = (struct ti_scm_padstate *) ti_padstate_devmap, - .padconf= (struct ti_scm_padconf *) ti_padconf_devmap, + .padstate = ti_padstate_devmap, + .padconf= ti_padconf_devmap, }; Modified: head/sys/arm/ti/ti_scm.h == --- head/sys/arm/ti/ti_scm.hThu Feb 26 07:45:40 2015(r279311) +++ head/sys/arm/ti/ti_scm.hThu Feb 26 07:47:35 2015(r279312) @@ -59,8 +59,8 @@ struct ti_scm_padstate { struct ti_scm_device { uint16_tpadconf_muxmode_mask; uint16_tpadconf_sate_mask; - struct ti_scm_padstate *padstate; - struct ti_scm_padconf *padconf; + const struct ti_scm_padstate*padstate; + const struct ti_scm_padconf *padconf; }; struct ti_scm_softc { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279310 - head/contrib/libcxxrt
Author: dim Date: Thu Feb 26 07:42:16 2015 New Revision: 279310 URL: https://svnweb.freebsd.org/changeset/base/279310 Log: Since newer versions of compiler-rt require unwind.h, and we want to use the copy in libcxxrt for it, fix the arm-specific header to define the _Unwind_Action type. Submitted by: andrew MFC after:3 days Modified: head/contrib/libcxxrt/unwind-arm.h Modified: head/contrib/libcxxrt/unwind-arm.h == --- head/contrib/libcxxrt/unwind-arm.h Thu Feb 26 07:26:56 2015 (r279309) +++ head/contrib/libcxxrt/unwind-arm.h Thu Feb 26 07:42:16 2015 (r279310) @@ -36,6 +36,8 @@ _URC_FATAL_PHASE1_ERROR = _URC_FAILURE } _Unwind_Reason_Code; +typedef int _Unwind_Action; + typedef uint32_t _Unwind_State; #ifdef __clang__ static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279311 - head/sys/arm/ti/am335x
Author: dim Date: Thu Feb 26 07:45:40 2015 New Revision: 279311 URL: https://svnweb.freebsd.org/changeset/base/279311 Log: In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about am33x_rtc_softc::sc_irq_res (which is an array) never being NULL. Submitted by: andrew MFC after:3 days Modified: head/sys/arm/ti/am335x/am335x_rtc.c Modified: head/sys/arm/ti/am335x/am335x_rtc.c == --- head/sys/arm/ti/am335x/am335x_rtc.c Thu Feb 26 07:42:16 2015 (r279310) +++ head/sys/arm/ti/am335x/am335x_rtc.c Thu Feb 26 07:45:40 2015 (r279311) @@ -137,7 +137,7 @@ am335x_rtc_detach(device_t dev) struct am335x_rtc_softc *sc; sc = device_get_softc(dev); - if (sc-sc_irq_res) + if (sc-sc_irq_res[0] != NULL) bus_release_resources(dev, am335x_rtc_irq_spec, sc-sc_irq_res); if (sc-sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc-sc_mem_res); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279162 - head/contrib/llvm/patches
Author: dim Date: Sun Feb 22 15:56:16 2015 New Revision: 279162 URL: https://svnweb.freebsd.org/changeset/base/279162 Log: Add llvm patch corresponding to r279161. Added: head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff Added: head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-32-llvm-r230058-indirectbrs-assert.diff Sun Feb 22 15:56:16 2015(r279162) @@ -0,0 +1,55 @@ +Pull in r230058 from upstream llvm trunk (by Benjamin Kramer): + + LoopRotate: When reconstructing loop simplify form don't split edges + from indirectbrs. + + Yet another chapter in the endless story. While this looks like we + leave the loop in a non-canonical state this replicates the logic in + LoopSimplify so it doesn't diverge from the canonical form in any way. + + PR21968 + +This fixes a Cannot split critical edge from IndirectBrInst assertion +failure when building the devel/radare2 port. + +Introduced here: https://svnweb.freebsd.org/changeset/base/279161 + +Index: lib/Transforms/Scalar/LoopRotation.cpp +=== +--- lib/Transforms/Scalar/LoopRotation.cpp lib/Transforms/Scalar/LoopRotation.cpp +@@ -498,6 +498,8 @@ bool LoopRotate::rotateLoop(Loop *L, bool Simplifi + Loop *PredLoop = LI-getLoopFor(*PI); + if (!PredLoop || PredLoop-contains(Exit)) + continue; ++ if (isaIndirectBrInst((*PI)-getTerminator())) ++continue; + SplitLatchEdge |= L-getLoopLatch() == *PI; + BasicBlock *ExitSplit = SplitCriticalEdge(*PI, Exit, this); + ExitSplit-moveBefore(Exit); +Index: test/Transforms/LoopRotate/crash.ll +=== +--- test/Transforms/LoopRotate/crash.ll test/Transforms/LoopRotate/crash.ll +@@ -153,3 +153,21 @@ entry: + 5: ; preds = %3, %entry + ret void + } ++ ++; PR21968 ++define void @test8(i1 %C, i8* %P) #0 { ++entry: ++ br label %for.cond ++ ++for.cond: ; preds = %for.inc, %entry ++ br i1 %C, label %l_bad, label %for.body ++ ++for.body: ; preds = %for.cond ++ indirectbr i8* %P, [label %for.inc, label %l_bad] ++ ++for.inc: ; preds = %for.body ++ br label %for.cond ++ ++l_bad:; preds = %for.body, %for.cond ++ ret void ++} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r279161 - head/contrib/llvm/lib/Transforms/Scalar
Author: dim Date: Sun Feb 22 15:51:49 2015 New Revision: 279161 URL: https://svnweb.freebsd.org/changeset/base/279161 Log: Pull in r230058 from upstream llvm trunk (by Benjamin Kramer): LoopRotate: When reconstructing loop simplify form don't split edges from indirectbrs. Yet another chapter in the endless story. While this looks like we leave the loop in a non-canonical state this replicates the logic in LoopSimplify so it doesn't diverge from the canonical form in any way. http://llvm.org/PR21968 This fixes a Cannot split critical edge from IndirectBrInst assertion failure when building the devel/radare2 port. PR: 195480, 196987 MFC after:3 days Modified: head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp Modified: head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp == --- head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cppSun Feb 22 15:48:36 2015(r279160) +++ head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cppSun Feb 22 15:51:49 2015(r279161) @@ -498,6 +498,8 @@ bool LoopRotate::rotateLoop(Loop *L, boo Loop *PredLoop = LI-getLoopFor(*PI); if (!PredLoop || PredLoop-contains(Exit)) continue; + if (isaIndirectBrInst((*PI)-getTerminator())) +continue; SplitLatchEdge |= L-getLoopLatch() == *PI; BasicBlock *ExitSplit = SplitCriticalEdge(*PI, Exit, this); ExitSplit-moveBefore(Exit); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278438 - head/sys/dev/drm2/radeon
Author: dim Date: Mon Feb 9 07:56:50 2015 New Revision: 278438 URL: https://svnweb.freebsd.org/changeset/base/278438 Log: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1748 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c == --- head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev-family) { case CHIP_BARTS: - io_mc_regs = (const u32 *)barts_io_mc_regs; + io_mc_regs = barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (const u32 *)turks_io_mc_regs; + io_mc_regs = turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (const u32 *)caicos_io_mc_regs; + io_mc_regs = caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (const u32 *)cayman_io_mc_regs; + io_mc_regs = cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: head/sys/dev/drm2/radeon/si.c == --- head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev-family) { case CHIP_TAHITI: - io_mc_regs = (const u32 *)tahiti_io_mc_regs; + io_mc_regs = tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (const u32 *)pitcairn_io_mc_regs; + io_mc_regs = pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (const u32 *)verde_io_mc_regs; + io_mc_regs = verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278349 - head/contrib/llvm/lib/Target/X86
Author: dim Date: Sat Feb 7 12:50:33 2015 New Revision: 278349 URL: https://svnweb.freebsd.org/changeset/base/278349 Log: Pull in r224884 from upstream llvm trunk (by Keno Fischer): [FastIsel][X86] Fix invalid register replacement for bool args Summary: Consider the following IR: %3 = load i8* undef %4 = trunc i8 %3 to i1 %5 = call %jl_value_t.0* @foo(..., i1 %4, ...) ret %jl_value_t.0* %5 Bools (that are the result of direct truncs) are lowered as whatever the argument to the trunc was and a and 1, causing the part of the MBB responsible for this argument to look something like this: %vreg8def,tied1 = AND8ri %vreg7kill,tied0, 1, %EFLAGSimp-def; GR8:%vreg8,%vreg7 Later, when the load is lowered, it will insert %vreg15def = MOV8rm %vreg14, 1, %noreg, 0, %noreg; mem:LD1[undef] GR8:%vreg15 GR64:%vreg14 but remember to (at the end of isel) replace vreg7 by vreg15. Now for the bug. In fast isel lowering, we mistakenly mark vreg8 as the result of the load instead of the trunc. This adds a fixup to have vreg8 replaced by whatever the result of the load is as well, so we end up with %vreg15def,tied1 = AND8ri %vreg15kill,tied0, 1, %EFLAGSimp-def; GR8:%vreg15 which is an SSA violation and causes problems later down the road. This fixes PR21557. Test Plan: Test test case from PR21557 is added to the test suite. Reviewers: ributzka Reviewed By: ributzka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6245 This fixes a possible assertion failure when compiling toolbox.cxx from LibreOffice 4.3.5. Reported by: kwm Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp == --- head/contrib/llvm/lib/Target/X86/X86FastISel.cppSat Feb 7 12:20:33 2015(r278348) +++ head/contrib/llvm/lib/Target/X86/X86FastISel.cppSat Feb 7 12:50:33 2015(r278349) @@ -2699,6 +2699,9 @@ bool X86FastISel::FastLowerCall(CallLowe TM.Options.GuaranteedTailCallOpt)) return false; + SmallVectorMVT, 16 OutVTs; + SmallVectorunsigned, 16 ArgRegs; + // If this is a constant i1/i8/i16 argument, promote to i32 to avoid an extra // instruction. This is safe because it is common to all FastISel supported // calling conventions on x86. @@ -2716,28 +2719,34 @@ bool X86FastISel::FastLowerCall(CallLowe // Passing bools around ends up doing a trunc to i1 and passing it. // Codegen this as an argument + and 1. -if (auto *TI = dyn_castTruncInst(Val)) { - if (TI-getType()-isIntegerTy(1) CLI.CS - (TI-getParent() == CLI.CS-getInstruction()-getParent()) - TI-hasOneUse()) { -Val = castTruncInst(Val)-getOperand(0); -unsigned ResultReg = getRegForValue(Val); +MVT VT; +auto *TI = dyn_castTruncInst(Val); +unsigned ResultReg; +if (TI TI-getType()-isIntegerTy(1) CLI.CS + (TI-getParent() == CLI.CS-getInstruction()-getParent()) + TI-hasOneUse()) { + Value *PrevVal = TI-getOperand(0); + ResultReg = getRegForValue(PrevVal); + + if (!ResultReg) +return false; -if (!ResultReg) - return false; + if (!isTypeLegal(PrevVal-getType(), VT)) +return false; -MVT ArgVT; -if (!isTypeLegal(Val-getType(), ArgVT)) - return false; + ResultReg = +FastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1); -ResultReg = - FastEmit_ri(ArgVT, ArgVT, ISD::AND, ResultReg, Val-hasOneUse(), 1); - -if (!ResultReg) - return false; -UpdateValueMap(Val, ResultReg); - } + if (!ResultReg) +return false; +} else { + if (!isTypeLegal(Val-getType(), VT)) +return false; + ResultReg = getRegForValue(Val); } + +ArgRegs.push_back(ResultReg); +OutVTs.push_back(VT); } // Analyze operands of the call, assigning locations to each operand. @@ -2749,13 +2758,6 @@ bool X86FastISel::FastLowerCall(CallLowe if (IsWin64) CCInfo.AllocateStack(32, 8); - SmallVectorMVT, 16 OutVTs; - for (auto *Val : OutVals) { -MVT VT; -if (!isTypeLegal(Val-getType(), VT)) - return false; -OutVTs.push_back(VT); - } CCInfo.AnalyzeCallOperands(OutVTs, OutFlags, CC_X86); // Get a count of how many bytes are to be pushed on the stack. @@ -2777,9 +2779,7 @@ bool X86FastISel::FastLowerCall(CallLowe if (ArgVT == MVT::x86mmx) return false; -unsigned ArgReg = getRegForValue(ArgVal); -if (!ArgReg) - return false; +unsigned ArgReg = ArgRegs[VA.getValNo()]; // Promote the value if needed. switch (VA.getLocInfo()) { ___
svn commit: r278348 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: dim Date: Sat Feb 7 12:20:33 2015 New Revision: 278348 URL: https://svnweb.freebsd.org/changeset/base/278348 Log: Fix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by making the ia_array field of struct ar9300_ini_array const, and removing the const-dropping casts. No functional change. Reviewed by: adrian MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1725 Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hSat Feb 7 08:47:15 2015(r278347) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.hSat Feb 7 12:20:33 2015(r278348) @@ -317,12 +317,12 @@ typedef struct { /* Support for multiple INIs */ struct ar9300_ini_array { -u_int32_t *ia_array; +const u_int32_t *ia_array; u_int32_t ia_rows; u_int32_t ia_columns; }; #define INIT_INI_ARRAY(iniarray, array, rows, columns) do { \ -(iniarray)-ia_array = (u_int32_t *)(array);\ +(iniarray)-ia_array = (const u_int32_t *)(array);\ (iniarray)-ia_rows = (rows); \ (iniarray)-ia_columns = (columns); \ } while (0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278350 - head/contrib/llvm/patches
Author: dim Date: Sat Feb 7 12:52:34 2015 New Revision: 278350 URL: https://svnweb.freebsd.org/changeset/base/278350 Log: Add llvm patch corresponding to r278349. Added: head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff Added: head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff Sat Feb 7 12:52:34 2015(r278350) @@ -0,0 +1,164 @@ +Pull in r224884 from upstream llvm trunk (by Keno Fischer): + + [FastIsel][X86] Fix invalid register replacement for bool args + + Summary: + Consider the following IR: + + %3 = load i8* undef + %4 = trunc i8 %3 to i1 + %5 = call %jl_value_t.0* @foo(..., i1 %4, ...) + ret %jl_value_t.0* %5 + + Bools (that are the result of direct truncs) are lowered as whatever + the argument to the trunc was and a and 1, causing the part of the + MBB responsible for this argument to look something like this: + + %vreg8def,tied1 = AND8ri %vreg7kill,tied0, 1, %EFLAGSimp-def; GR8:%vreg8,%vreg7 + + Later, when the load is lowered, it will insert + + %vreg15def = MOV8rm %vreg14, 1, %noreg, 0, %noreg; mem:LD1[undef] GR8:%vreg15 GR64:%vreg14 + + but remember to (at the end of isel) replace vreg7 by vreg15. Now for + the bug. In fast isel lowering, we mistakenly mark vreg8 as the result + of the load instead of the trunc. This adds a fixup to have + vreg8 replaced by whatever the result of the load is as well, so + we end up with + + %vreg15def,tied1 = AND8ri %vreg15kill,tied0, 1, %EFLAGSimp-def; GR8:%vreg15 + + which is an SSA violation and causes problems later down the road. + + This fixes PR21557. + + Test Plan: Test test case from PR21557 is added to the test suite. + + Reviewers: ributzka + + Reviewed By: ributzka + + Subscribers: llvm-commits + + Differential Revision: http://reviews.llvm.org/D6245 + +This fixes a possible assertion failure when compiling toolbox.cxx from +LibreOffice 4.3.5. + +Introduced here: http://svnweb.freebsd.org/changeset/base/278349 + +Index: lib/Target/X86/X86FastISel.cpp +=== +--- lib/Target/X86/X86FastISel.cpp lib/Target/X86/X86FastISel.cpp +@@ -2699,6 +2699,9 @@ bool X86FastISel::FastLowerCall(CallLoweringInfo +TM.Options.GuaranteedTailCallOpt)) + return false; + ++ SmallVectorMVT, 16 OutVTs; ++ SmallVectorunsigned, 16 ArgRegs; ++ + // If this is a constant i1/i8/i16 argument, promote to i32 to avoid an extra + // instruction. This is safe because it is common to all FastISel supported + // calling conventions on x86. +@@ -2716,28 +2719,34 @@ bool X86FastISel::FastLowerCall(CallLoweringInfo + + // Passing bools around ends up doing a trunc to i1 and passing it. + // Codegen this as an argument + and 1. +-if (auto *TI = dyn_castTruncInst(Val)) { +- if (TI-getType()-isIntegerTy(1) CLI.CS +- (TI-getParent() == CLI.CS-getInstruction()-getParent()) +- TI-hasOneUse()) { +-Val = castTruncInst(Val)-getOperand(0); +-unsigned ResultReg = getRegForValue(Val); ++MVT VT; ++auto *TI = dyn_castTruncInst(Val); ++unsigned ResultReg; ++if (TI TI-getType()-isIntegerTy(1) CLI.CS ++ (TI-getParent() == CLI.CS-getInstruction()-getParent()) ++ TI-hasOneUse()) { ++ Value *PrevVal = TI-getOperand(0); ++ ResultReg = getRegForValue(PrevVal); + +-if (!ResultReg) +- return false; ++ if (!ResultReg) ++return false; + +-MVT ArgVT; +-if (!isTypeLegal(Val-getType(), ArgVT)) +- return false; ++ if (!isTypeLegal(PrevVal-getType(), VT)) ++return false; + +-ResultReg = +- FastEmit_ri(ArgVT, ArgVT, ISD::AND, ResultReg, Val-hasOneUse(), 1); ++ ResultReg = ++FastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1); + +-if (!ResultReg) +- return false; +-UpdateValueMap(Val, ResultReg); +- } ++ if (!ResultReg) ++return false; ++} else { ++ if (!isTypeLegal(Val-getType(), VT)) ++return false; ++ ResultReg = getRegForValue(Val); + } ++ ++ArgRegs.push_back(ResultReg); ++OutVTs.push_back(VT); + } + + // Analyze operands of the call, assigning locations to each operand. +@@ -2749,13 +2758,6 @@ bool X86FastISel::FastLowerCall(CallLoweringInfo + if (IsWin64) + CCInfo.AllocateStack(32, 8); + +- SmallVectorMVT, 16 OutVTs; +- for (auto *Val : OutVals) { +-MVT VT; +-if (!isTypeLegal(Val-getType(), VT)) +- return false; +-OutVTs.push_back(VT); +- } + CCInfo.AnalyzeCallOperands(OutVTs, OutFlags, CC_X86); + + // Get a count of how many bytes are
Re: svn commit: r278349 - head/contrib/llvm/lib/Target/X86
On 07 Feb 2015, at 17:42, Matthew D. Fuller fulle...@over-yonder.net wrote: On Sat, Feb 07, 2015 at 12:50:34PM + I heard the voice of Dimitry Andric, and lo! it spake thus: Log: Pull in r224884 from upstream llvm trunk (by Keno Fischer): This blows up the kernel build for me. Apparently reproducible, as my first build was -j'd and so unreadable, and another non--j build yielded the below. With the rev patch -R'd out, build completes fine. ... Cannot emit physreg copy instruction UNREACHABLE executed at /usr/src/lib/clang/libllvmx86codegen/../../../contrib/llvm/lib/Target/X86/X86InstrInfo.cpp:3176! Stack dump: 0.Program arguments: /usr/obj/usr/src/tmp/usr/bin/cc -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -mrelax-all -disable-free -main-file-name hptproc.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -mcode-model kernel -target-cpu x86-64 -target-feature -mmx -target-feature -sse -target-feature -aes -target-feature -avx -disable-red-zone -no-implicit-float -gdwarf-2 -dwarf-column-info -coverage-file /usr/obj/usr/src/sys/MORTIS/modules/usr/src/sys/modules/hptmv/hptproc.o -nostdsysteminc -nobuiltininc -resource-dir /usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.5.1 -include /usr/obj/usr/src/sys/MORTIS/opt_global.h -D _KERNEL -D KLD_MODULE -D HAVE_KERNEL_OPTION_HEADERS -I . -I /usr/src/sys -I /usr/src/sys/contrib/altq -I /usr/obj/usr/src/sys/MORTIS -isysroot /usr/obj/usr/src/tmp -Werror -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-include-dirs -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -std=iso9899:1999 -fdebug-compilation-dir /usr/obj/usr/src/sys/MORTIS/modules/usr/src/sys/modules/hptmv -ferror-limit 19 -fmessage-length 80 -ffreestanding -fformat-extensions -fwrapv -stack-protector 1 -mstackrealign -fobjc-runtime=gnustep -fno-common -fdiagnostics-show-option -fcolor-diagnostics -o hptproc.o -x c /usr/src/sys/modules/hptmv/../../dev/hptmv/hptproc.c 1.eof parser at end of file 2.Code generation 3.Running pass 'Function Pass Manager' on module '/usr/src/sys/modules/hptmv/../../dev/hptmv/hptproc.c'. 4.Running pass 'Post-RA pseudo instruction expansion pass' on function '@hpt_proc_in' Right, I also got the same report from Sean Bruno. I've backed this out in r278361 for now, since building head is more important than one particular file from LibreOffice. Sorry for the breakage. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r278361 - in head/contrib/llvm: lib/Target/X86 patches
Author: dim Date: Sat Feb 7 16:57:32 2015 New Revision: 278361 URL: https://svnweb.freebsd.org/changeset/base/278361 Log: Back out r278349 and r278350 for now, since this apparently blows up the kernel build in sys/dev/hptmv/hptproc.c for some people. Reported by: sbruno, Matthew Fuller fulle...@over-yonder.net Deleted: head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp == --- head/contrib/llvm/lib/Target/X86/X86FastISel.cppSat Feb 7 14:31:51 2015(r278360) +++ head/contrib/llvm/lib/Target/X86/X86FastISel.cppSat Feb 7 16:57:32 2015(r278361) @@ -2699,9 +2699,6 @@ bool X86FastISel::FastLowerCall(CallLowe TM.Options.GuaranteedTailCallOpt)) return false; - SmallVectorMVT, 16 OutVTs; - SmallVectorunsigned, 16 ArgRegs; - // If this is a constant i1/i8/i16 argument, promote to i32 to avoid an extra // instruction. This is safe because it is common to all FastISel supported // calling conventions on x86. @@ -2719,34 +2716,28 @@ bool X86FastISel::FastLowerCall(CallLowe // Passing bools around ends up doing a trunc to i1 and passing it. // Codegen this as an argument + and 1. -MVT VT; -auto *TI = dyn_castTruncInst(Val); -unsigned ResultReg; -if (TI TI-getType()-isIntegerTy(1) CLI.CS - (TI-getParent() == CLI.CS-getInstruction()-getParent()) - TI-hasOneUse()) { - Value *PrevVal = TI-getOperand(0); - ResultReg = getRegForValue(PrevVal); - - if (!ResultReg) -return false; +if (auto *TI = dyn_castTruncInst(Val)) { + if (TI-getType()-isIntegerTy(1) CLI.CS + (TI-getParent() == CLI.CS-getInstruction()-getParent()) + TI-hasOneUse()) { +Val = castTruncInst(Val)-getOperand(0); +unsigned ResultReg = getRegForValue(Val); - if (!isTypeLegal(PrevVal-getType(), VT)) -return false; +if (!ResultReg) + return false; - ResultReg = -FastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1); +MVT ArgVT; +if (!isTypeLegal(Val-getType(), ArgVT)) + return false; - if (!ResultReg) -return false; -} else { - if (!isTypeLegal(Val-getType(), VT)) -return false; - ResultReg = getRegForValue(Val); -} +ResultReg = + FastEmit_ri(ArgVT, ArgVT, ISD::AND, ResultReg, Val-hasOneUse(), 1); -ArgRegs.push_back(ResultReg); -OutVTs.push_back(VT); +if (!ResultReg) + return false; +UpdateValueMap(Val, ResultReg); + } +} } // Analyze operands of the call, assigning locations to each operand. @@ -2758,6 +2749,13 @@ bool X86FastISel::FastLowerCall(CallLowe if (IsWin64) CCInfo.AllocateStack(32, 8); + SmallVectorMVT, 16 OutVTs; + for (auto *Val : OutVals) { +MVT VT; +if (!isTypeLegal(Val-getType(), VT)) + return false; +OutVTs.push_back(VT); + } CCInfo.AnalyzeCallOperands(OutVTs, OutFlags, CC_X86); // Get a count of how many bytes are to be pushed on the stack. @@ -2779,7 +2777,9 @@ bool X86FastISel::FastLowerCall(CallLowe if (ArgVT == MVT::x86mmx) return false; -unsigned ArgReg = ArgRegs[VA.getValNo()]; +unsigned ArgReg = getRegForValue(ArgVal); +if (!ArgReg) + return false; // Promote the value if needed. switch (VA.getLocInfo()) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278297 - head/usr.sbin/syslogd
Author: dim Date: Thu Feb 5 22:28:00 2015 New Revision: 278297 URL: https://svnweb.freebsd.org/changeset/base/278297 Log: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f-f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f-f_prevline !strcmp(msg, f-f_prevline) ~~~^~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f-f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f-f_prevline) { ~~ ~~~^~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1716 Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Thu Feb 5 22:24:22 2015 (r278296) +++ head/usr.sbin/syslogd/syslogd.c Thu Feb 5 22:28:00 2015 (r278297) @@ -1020,7 +1020,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f-f_type != F_PIPE) 1 (flags MARK) == 0 msglen == f-f_prevlen - f-f_prevline !strcmp(msg, f-f_prevline) + !strcmp(msg, f-f_prevline) !strcasecmp(from, f-f_prevhost)) { (void)strlcpy(f-f_lasttime, timestamp, sizeof(f-f_lasttime)); @@ -1175,11 +1175,9 @@ fprintlog(struct filed *f, int flags, co v-iov_base = repbuf; v-iov_len = snprintf(repbuf, sizeof repbuf, last message repeated %d times, f-f_prevcount); - } else if (f-f_prevline) { + } else { v-iov_base = f-f_prevline; v-iov_len = f-f_prevlen; - } else { - return; } v++; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278222 - head/sys/sys
Author: dim Date: Wed Feb 4 20:55:21 2015 New Revision: 278222 URL: https://svnweb.freebsd.org/changeset/base/278222 Log: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. MFC after:3 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hWed Feb 4 20:03:57 2015(r278221) +++ head/sys/sys/cdefs.hWed Feb 4 20:55:21 2015(r278222) @@ -293,7 +293,8 @@ #elif defined(__COUNTER__) #define_Static_assert(x, y)__Static_assert(x, __COUNTER__) #define__Static_assert(x, y) ___Static_assert(x, y) -#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define_Static_assert(x, y)struct __hack #endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r278223 - head/lib/clang
On 04 Feb 2015, at 22:09, NGie Cooper yaneurab...@gmail.com wrote: On Wed, Feb 4, 2015 at 1:00 PM, Dimitry Andric d...@freebsd.org wrote: Author: dim Date: Wed Feb 4 21:00:29 2015 New Revision: 278223 URL: https://svnweb.freebsd.org/changeset/base/278223 Log: For now, add -stdlib=libc++ to the flags for building clang, since that makes it easier to build head on stable/9, where libstdc++ is still the default. We can revisit this when somebody will try to build base with gcc 4.8.1 or higher, and its included libstdc++. Maybe this should be conditionalized on COMPILER_TYPE? COMPILER_TYPE doesn't say anything about the C++ library used. Maybe we need a CXX_LIBRARY_TYPE setting for it? That said, you may be right that it should be conditionalized on the compiler type anyway, since gcc does not support the -stdlib= option. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r278225 - head/lib/clang
Author: dim Date: Wed Feb 4 21:48:50 2015 New Revision: 278225 URL: https://svnweb.freebsd.org/changeset/base/278225 Log: Followup to r278223, by only using -stdlib=libc++ when the compiler is clang; not even recent versions of gcc support the -stdlib flag. Noticed by: ngie Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk == --- head/lib/clang/clang.build.mk Wed Feb 4 21:08:28 2015 (r278224) +++ head/lib/clang/clang.build.mk Wed Feb 4 21:48:50 2015 (r278225) @@ -34,7 +34,8 @@ BUILD_TRIPLE?=${BUILD_ARCH:C/amd64/x86_ CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\${TARGET_TRIPLE}\ \ -DLLVM_HOST_TRIPLE=\${BUILD_TRIPLE}\ \ -DDEFAULT_SYSROOT=\${TOOLS_PREFIX}\ -CXXFLAGS+= -std=c++11 -stdlib=libc++ -fno-exceptions -fno-rtti +CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti +CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278223 - head/lib/clang
Author: dim Date: Wed Feb 4 21:00:29 2015 New Revision: 278223 URL: https://svnweb.freebsd.org/changeset/base/278223 Log: For now, add -stdlib=libc++ to the flags for building clang, since that makes it easier to build head on stable/9, where libstdc++ is still the default. We can revisit this when somebody will try to build base with gcc 4.8.1 or higher, and its included libstdc++. Reported by: rpaulo Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk == --- head/lib/clang/clang.build.mk Wed Feb 4 20:55:21 2015 (r278222) +++ head/lib/clang/clang.build.mk Wed Feb 4 21:00:29 2015 (r278223) @@ -34,7 +34,7 @@ BUILD_TRIPLE?=${BUILD_ARCH:C/amd64/x86_ CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\${TARGET_TRIPLE}\ \ -DLLVM_HOST_TRIPLE=\${BUILD_TRIPLE}\ \ -DDEFAULT_SYSROOT=\${TOOLS_PREFIX}\ -CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti +CXXFLAGS+= -std=c++11 -stdlib=libc++ -fno-exceptions -fno-rtti .PATH: ${LLVM_SRCS}/${SRCDIR} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r278223 - head/lib/clang
On 04 Feb 2015, at 22:23, NGie Cooper yaneurab...@gmail.com wrote: On Wed, Feb 4, 2015 at 1:16 PM, Dimitry Andric d...@freebsd.org wrote: On 04 Feb 2015, at 22:09, NGie Cooper yaneurab...@gmail.com wrote: On Wed, Feb 4, 2015 at 1:00 PM, Dimitry Andric d...@freebsd.org wrote: Author: dim Date: Wed Feb 4 21:00:29 2015 New Revision: 278223 URL: https://svnweb.freebsd.org/changeset/base/278223 Log: For now, add -stdlib=libc++ to the flags for building clang, since that makes it easier to build head on stable/9, where libstdc++ is still the default. We can revisit this when somebody will try to build base with gcc 4.8.1 or higher, and its included libstdc++. Maybe this should be conditionalized on COMPILER_TYPE? COMPILER_TYPE doesn't say anything about the C++ library used. Maybe we need a CXX_LIBRARY_TYPE setting for it? That said, you may be right that it should be conditionalized on the compiler type anyway, since gcc does not support the -stdlib= option. Yeah... true. My original point was coming more from a perspective that this was being done strictly for the GNU toolchain, so conditionalizing the CFLAGS on the compiler being used seemed reasonable. This flag is only relevant when you are 1) using clang to compile, and 2) on freebsd 9.x. You cannot compile clang in head with base gcc anyway. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r278109 - head/contrib/llvm/patches
Author: dim Date: Mon Feb 2 20:05:52 2015 New Revision: 278109 URL: https://svnweb.freebsd.org/changeset/base/278109 Log: Belatedly add the clang patch corresponding to r277423. Added: head/contrib/llvm/patches/patch-29-clang-add-mips-triples.diff head/contrib/llvm/patches/patch-30-llvm-r226664-aarch64-x18.diff - copied unchanged from r278063, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff head/contrib/llvm/patches/patch-31-clang-r227062-fixes-x18.diff - copied unchanged from r278063, head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Deleted: head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff head/contrib/llvm/patches/patch-30-clang-r227062-fixes-x18.diff Added: head/contrib/llvm/patches/patch-29-clang-add-mips-triples.diff == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-29-clang-add-mips-triples.diff Mon Feb 2 20:05:52 2015(r278109) @@ -0,0 +1,33 @@ +Allow clang to be built for mips/mips64 backend types by adding our mips +triple ids + +This only allows testing and does not change the defaults for mips/mips64. +They still build/use gcc by default. + +Differential Revision: https://reviews.freebsd.org/D1190 +Reviewed by: dim + +Introduced here: http://svnweb.freebsd.org/changeset/base/277423 + +Index: tools/clang/lib/Driver/Tools.cpp +=== +--- tools/clang/lib/Driver/Tools.cpp tools/clang/lib/Driver/Tools.cpp +@@ -6592,6 +6592,17 @@ void freebsd::Link::ConstructJob(Compilation C, c + CmdArgs.push_back(elf32ppc_fbsd); + } + ++ if (Arg *A = Args.getLastArg(options::OPT_G)) { ++if (ToolChain.getArch() == llvm::Triple::mips || ++ ToolChain.getArch() == llvm::Triple::mipsel || ++ ToolChain.getArch() == llvm::Triple::mips64 || ++ ToolChain.getArch() == llvm::Triple::mips64el) { ++ StringRef v = A-getValue(); ++ CmdArgs.push_back(Args.MakeArgString(-G + v)); ++ A-claim(); ++} ++ } ++ + if (Output.isFilename()) { + CmdArgs.push_back(-o); + CmdArgs.push_back(Output.getFilename()); Copied: head/contrib/llvm/patches/patch-30-llvm-r226664-aarch64-x18.diff (from r278063, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-30-llvm-r226664-aarch64-x18.diffMon Feb 2 20:05:52 2015(r278109, copy of r278063, head/contrib/llvm/patches/patch-29-llvm-r226664-aarch64-x18.diff) @@ -0,0 +1,83 @@ +Pull in r226664 from upstream llvm trunk (by Tim Northover): + + AArch64: add backend option to reserve x18 (platform register) + + AAPCS64 says that it's up to the platform to specify whether x18 is + reserved, and a first step on that way is to add a flag controlling + it. + + From: Andrew Turner and...@fubar.geek.nz + +Introduced here: http://svnweb.freebsd.org/changeset/base/24 + +Index: lib/Target/AArch64/AArch64RegisterInfo.cpp +=== +--- lib/Target/AArch64/AArch64RegisterInfo.cpp lib/Target/AArch64/AArch64RegisterInfo.cpp +@@ -33,6 +33,10 @@ using namespace llvm; + #define GET_REGINFO_TARGET_DESC + #include AArch64GenRegisterInfo.inc + ++static cl::optbool ++ReserveX18(aarch64-reserve-x18, cl::Hidden, ++ cl::desc(Reserve X18, making it unavailable as GPR)); ++ + AArch64RegisterInfo::AArch64RegisterInfo(const AArch64InstrInfo *tii, + const AArch64Subtarget *sti) + : AArch64GenRegisterInfo(AArch64::LR), TII(tii), STI(sti) {} +@@ -90,7 +94,7 @@ AArch64RegisterInfo::getReservedRegs(const Machine + Reserved.set(AArch64::W29); + } + +- if (STI-isTargetDarwin()) { ++ if (STI-isTargetDarwin() || ReserveX18) { + Reserved.set(AArch64::X18); // Platform register + Reserved.set(AArch64::W18); + } +@@ -117,7 +121,7 @@ bool AArch64RegisterInfo::isReservedReg(const Mach + return true; + case AArch64::X18: + case AArch64::W18: +-return STI-isTargetDarwin(); ++return STI-isTargetDarwin() || ReserveX18; + case AArch64::FP: + case AArch64::W29: + return TFI-hasFP(MF) || STI-isTargetDarwin(); +@@ -379,7 +383,7 @@ unsigned AArch64RegisterInfo::getRegPressureLimit( + case AArch64::GPR64commonRegClassID: + return 32 - 1 // XZR/SP +- (TFI-hasFP(MF) || STI-isTargetDarwin()) // FP +- - STI-isTargetDarwin() // X18 reserved as platform register ++ - (STI-isTargetDarwin() || ReserveX18) // X18 reserved as platform register +- hasBasePointer(MF); // X19 + case AArch64::FPR8RegClassID: + case AArch64::FPR16RegClassID: +Index:
Re: svn commit: r278004 - head/sys/dev/drm2/radeon
On 01 Feb 2015, at 06:00, Bruce Evans b...@optusnet.com.au wrote: On Sat, 31 Jan 2015, Dimitry Andric wrote: Log: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. This is much better than using __DECONST(), but still has bogus casts. ... Anyway, it is clearer to point to the first element: io_mc_regs = barts_io_mc_regs[0][0]; Thanks, I've put that up for review, here: https://reviews.freebsd.org/D1748 -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r277974 - head/sys/dev/usb/input
Author: dim Date: Sat Jan 31 14:18:46 2015 New Revision: 277974 URL: https://svnweb.freebsd.org/changeset/base/277974 Log: Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D1743 Modified: head/sys/dev/usb/input/uhid.c Modified: head/sys/dev/usb/input/uhid.c == --- head/sys/dev/usb/input/uhid.c Sat Jan 31 13:53:29 2015 (r277973) +++ head/sys/dev/usb/input/uhid.c Sat Jan 31 14:18:46 2015 (r277974) @@ -734,7 +734,7 @@ uhid_attach(device_t dev) if (uaa-info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE) { sc-sc_repdesc_size = sizeof(uhid_graphire_report_descr); - sc-sc_repdesc_ptr = (void *)uhid_graphire_report_descr; + sc-sc_repdesc_ptr = __DECONST(void *, uhid_graphire_report_descr); sc-sc_flags |= UHID_FLAG_STATIC_DESC; } else if (uaa-info.idProduct == USB_PRODUCT_WACOM_GRAPHIRE3_4X5) { @@ -755,7 +755,7 @@ uhid_attach(device_t dev) usbd_errstr(error)); } sc-sc_repdesc_size = sizeof(uhid_graphire3_4x5_report_descr); - sc-sc_repdesc_ptr = (void *)uhid_graphire3_4x5_report_descr; + sc-sc_repdesc_ptr = __DECONST(void *, uhid_graphire3_4x5_report_descr); sc-sc_flags |= UHID_FLAG_STATIC_DESC; } } else if ((uaa-info.bInterfaceClass == UICLASS_VENDOR) @@ -775,7 +775,7 @@ uhid_attach(device_t dev) } /* the Xbox 360 gamepad has no report descriptor */ sc-sc_repdesc_size = sizeof(uhid_xb360gp_report_descr); - sc-sc_repdesc_ptr = (void *)uhid_xb360gp_report_descr; + sc-sc_repdesc_ptr = __DECONST(void *, uhid_xb360gp_report_descr); sc-sc_flags |= UHID_FLAG_STATIC_DESC; } if (sc-sc_repdesc_ptr == NULL) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278010 - head/contrib/libcxxrt
Author: dim Date: Sat Jan 31 23:08:29 2015 New Revision: 278010 URL: https://svnweb.freebsd.org/changeset/base/278010 Log: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd Modified: head/contrib/libcxxrt/typeinfo.cc Modified: head/contrib/libcxxrt/typeinfo.cc == --- head/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:02:27 2015 (r278009) +++ head/contrib/libcxxrt/typeinfo.cc Sat Jan 31 23:08:29 2015 (r278010) @@ -35,23 +35,15 @@ type_info::~type_info() {} bool type_info::operator==(const type_info other) const { -#ifdef LIBCXXRT_MERGED_TYPEINFO return __type_name == other.__type_name; -#else - return __type_name == other.__type_name || strcmp(__type_name, other.__type_name) == 0; -#endif } bool type_info::operator!=(const type_info other) const { - return !operator==(other); + return __type_name != other.__type_name; } bool type_info::before(const type_info other) const { -#ifdef LIBCXXRT_MERGED_TYPEINFO return __type_name other.__type_name; -#else - return strcmp(__type_name, other.__type_name) 0; -#endif } const char* type_info::name() const { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278004 - head/sys/dev/drm2/radeon
Author: dim Date: Sat Jan 31 22:18:52 2015 New Revision: 278004 URL: https://svnweb.freebsd.org/changeset/base/278004 Log: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1727 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c == --- head/sys/dev/drm2/radeon/ni.c Sat Jan 31 22:07:38 2015 (r278003) +++ head/sys/dev/drm2/radeon/ni.c Sat Jan 31 22:18:52 2015 (r278004) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev-mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev-family) { case CHIP_BARTS: - io_mc_regs = (u32 *)barts_io_mc_regs; + io_mc_regs = (const u32 *)barts_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)turks_io_mc_regs; + io_mc_regs = (const u32 *)turks_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)caicos_io_mc_regs; + io_mc_regs = (const u32 *)caicos_io_mc_regs; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)cayman_io_mc_regs; + io_mc_regs = (const u32 *)cayman_io_mc_regs; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: head/sys/dev/drm2/radeon/si.c == --- head/sys/dev/drm2/radeon/si.c Sat Jan 31 22:07:38 2015 (r278003) +++ head/sys/dev/drm2/radeon/si.c Sat Jan 31 22:18:52 2015 (r278004) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev-mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev-family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)tahiti_io_mc_regs; + io_mc_regs = (const u32 *)tahiti_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)pitcairn_io_mc_regs; + io_mc_regs = (const u32 *)pitcairn_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)verde_io_mc_regs; + io_mc_regs = (const u32 *)verde_io_mc_regs; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r278016 - head/contrib/libcxxrt
Author: dim Date: Sat Jan 31 23:31:45 2015 New Revision: 278016 URL: https://svnweb.freebsd.org/changeset/base/278016 Log: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() MFC after:3 days Modified: head/contrib/libcxxrt/exception.cc Directory Properties: head/contrib/libcxxrt/ (props changed) Modified: head/contrib/libcxxrt/exception.cc == --- head/contrib/libcxxrt/exception.cc Sat Jan 31 23:24:25 2015 (r278015) +++ head/contrib/libcxxrt/exception.cc Sat Jan 31 23:31:45 2015 (r278016) @@ -673,7 +673,7 @@ static _Unwind_Reason_Code trace(struct * If the failure happened by falling off the end of the stack without finding * a handler, prints a back trace before aborting. */ -#if __GNUC__ 3 __GNUC_MINOR__ 2 +#if __GNUC__ 4 || (__GNUC__ == 4 __GNUC_MINOR__ = 4) extern C void *__cxa_begin_catch(void *e) throw(); #else extern C void *__cxa_begin_catch(void *e); @@ -1191,7 +1191,7 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_persona * pointer to the caught exception, which is either the adjusted pointer (for * C++ exceptions) of the unadjusted pointer (for foreign exceptions). */ -#if __GNUC__ 3 __GNUC_MINOR__ 2 +#if __GNUC__ 4 || (__GNUC__ == 4 __GNUC_MINOR__ = 4) extern C void *__cxa_begin_catch(void *e) throw() #else extern C void *__cxa_begin_catch(void *e) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r277951 - head/sys/netgraph
Author: dim Date: Fri Jan 30 21:59:53 2015 New Revision: 277951 URL: https://svnweb.freebsd.org/changeset/base/277951 Log: Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using __DECONST. No functional change. MFC after:3 days Modified: head/sys/netgraph/ng_parse.c Modified: head/sys/netgraph/ng_parse.c == --- head/sys/netgraph/ng_parse.cFri Jan 30 21:22:18 2015 (r277950) +++ head/sys/netgraph/ng_parse.cFri Jan 30 21:59:53 2015 (r277951) @@ -1122,7 +1122,7 @@ ng_bytearray_parse(const struct ng_parse struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)subtype.private = type-info; + subtype.private = __DECONST(void *, type-info); return ng_array_parse(subtype, s, off, start, buf, buflen); } } @@ -1134,7 +1134,7 @@ ng_bytearray_unparse(const struct ng_par struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)subtype.private = type-info; + subtype.private = __DECONST(void *, type-info); return ng_array_unparse(subtype, data, off, cbuf, cbuflen); } @@ -1145,7 +1145,7 @@ ng_bytearray_getDefault(const struct ng_ struct ng_parse_type subtype; subtype = ng_parse_bytearray_subtype; - *(const void **)subtype.private = type-info; + subtype.private = __DECONST(void *, type-info); return ng_array_getDefault(subtype, start, buf, buflen); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r277952 - head/sys/fs/udf
Author: dim Date: Fri Jan 30 22:01:45 2015 New Revision: 277952 URL: https://svnweb.freebsd.org/changeset/base/277952 Log: Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change. MFC after:3 days Modified: head/sys/fs/udf/udf_vnops.c Modified: head/sys/fs/udf/udf_vnops.c == --- head/sys/fs/udf/udf_vnops.c Fri Jan 30 21:59:53 2015(r277951) +++ head/sys/fs/udf/udf_vnops.c Fri Jan 30 22:01:45 2015(r277952) @@ -526,8 +526,9 @@ udf_transname(char *cs0string, char *des } while (unilen 0 destleft 0) { - udf_iconv-conv(udfmp-im_d2l, (const char **)unibuf, - (size_t *)unilen, (char **)destname, destleft); + udf_iconv-conv(udfmp-im_d2l, __DECONST(const char **, + unibuf), (size_t *)unilen, (char **)destname, + destleft); /* Unconverted character found */ if (unilen 0 destleft 0) { *destname++ = '?'; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r277953 - head/sys/fs/smbfs
Author: dim Date: Fri Jan 30 22:02:32 2015 New Revision: 277953 URL: https://svnweb.freebsd.org/changeset/base/277953 Log: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. MFC after:3 days Modified: head/sys/fs/smbfs/smbfs_subr.c Modified: head/sys/fs/smbfs/smbfs_subr.c == --- head/sys/fs/smbfs/smbfs_subr.c Fri Jan 30 22:01:45 2015 (r277952) +++ head/sys/fs/smbfs/smbfs_subr.c Fri Jan 30 22:02:32 2015 (r277953) @@ -170,8 +170,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp-vc_tolocal, (const char **)ibuf, ilen, obuf, olen, copt); + error = iconv_conv_case(vcp-vc_tolocal, + __DECONST(const char **, ibuf), ilen, obuf, olen, copt); if (error SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r277940 - in head/sys: conf modules/aesni
Author: dim Date: Fri Jan 30 18:17:17 2015 New Revision: 277940 URL: https://svnweb.freebsd.org/changeset/base/277940 Log: For clang, disable -Wcast-qual warnings for specific aesni files, since clang 3.6.0 will emit a number of such warnings for those files, and they are partially contributed code. Modified: head/sys/conf/files.amd64 head/sys/conf/kern.mk head/sys/modules/aesni/Makefile Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Fri Jan 30 18:07:46 2015(r277939) +++ head/sys/conf/files.amd64 Fri Jan 30 18:17:17 2015(r277940) @@ -131,12 +131,12 @@ crypto/aesni/aeskeys_amd64.S optional ae crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ dependency $S/crypto/aesni/aesni_ghash.c \ - compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} \ + compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC} \ no-implicit-rule\ clean aesni_ghash.o aesni_wrap.o optional aesni \ dependency $S/crypto/aesni/aesni_wrap.c \ - compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC} \ + compile-with${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC} \ no-implicit-rule\ clean aesni_wrap.o crypto/blowfish/bf_enc.c optionalcrypto | ipsec Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Jan 30 18:07:46 2015(r277939) +++ head/sys/conf/kern.mk Fri Jan 30 18:17:17 2015(r277940) @@ -23,6 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou NO_WSELF_ASSIGN= -Wno-self-assign NO_WUNNEEDED_INTERNAL_DECL=-Wno-unneeded-internal-declaration NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized +NO_WCAST_QUAL= -Wno-cast-qual # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: head/sys/modules/aesni/Makefile == --- head/sys/modules/aesni/Makefile Fri Jan 30 18:07:46 2015 (r277939) +++ head/sys/modules/aesni/Makefile Fri Jan 30 18:17:17 2015 (r277940) @@ -22,3 +22,6 @@ aesni_wrap.o: aesni_wrap.c ${CTFCONVERT_CMD} .include bsd.kmod.mk + +CWARNFLAGS.aesni_ghash.c= ${NO_WCAST_QUAL} +CWARNFLAGS.aesni_wrap.c= ${NO_WCAST_QUAL} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r277944 - head/contrib/libcxxrt
Author: dim Date: Fri Jan 30 18:26:38 2015 New Revision: 277944 URL: https://svnweb.freebsd.org/changeset/base/277944 Log: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC after:3 days Modified: head/contrib/libcxxrt/stdexcept.cc Modified: head/contrib/libcxxrt/stdexcept.cc == --- head/contrib/libcxxrt/stdexcept.cc Fri Jan 30 18:25:53 2015 (r277943) +++ head/contrib/libcxxrt/stdexcept.cc Fri Jan 30 18:26:38 2015 (r277944) @@ -82,19 +82,14 @@ const char* bad_typeid::what() const thr return std::bad_typeid; } -__attribute__((weak)) bad_array_new_length::bad_array_new_length() throw() {} -__attribute__((weak)) bad_array_new_length::~bad_array_new_length() {} -__attribute__((weak)) bad_array_new_length::bad_array_new_length(const bad_array_new_length) throw() {} -__attribute__((weak)) bad_array_new_length bad_array_new_length::operator=(const bad_array_new_length) throw() { return *this; } -__attribute__((weak)) const char* bad_array_new_length::what() const throw() { return std::bad_array_new_length; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r277860 - head/usr.sbin/sa
On 29 Jan 2015, at 09:23, John-Mark Gurney j...@funkthat.com wrote: Dimitry Andric wrote this message on Wed, Jan 28, 2015 at 22:22 +: Replace the VERSION_KEY define with a writable char array, so no const qualifier needs to be dropped anymore. You do realize that you should juse use __DECONST for this instead? This moves the data from .rodata into .data making it writable, and also means that bad programs could end up stop working, instead of faulting when someone tries to change the version string... I don't see the risk here, the db api does not actually modify the incoming key (the API is just badly designed). But if you think it is nicer to use __DECONST, feel free to change it. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r277883 - head/sys/sys
Author: dim Date: Thu Jan 29 18:44:21 2015 New Revision: 277883 URL: https://svnweb.freebsd.org/changeset/base/277883 Log: Ensure that lint does not pick up C11 keywords (e.g. _Noreturn), even if C11 mode is used. It does not support any C11 constructs. MFC after:3 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hThu Jan 29 18:08:50 2015(r277882) +++ head/sys/sys/cdefs.hThu Jan 29 18:44:21 2015(r277883) @@ -252,7 +252,7 @@ * Keywords added in C11. */ -#if !defined(__STDC_VERSION__) || __STDC_VERSION__ 201112L +#if !defined(__STDC_VERSION__) || __STDC_VERSION__ 201112L || defined(lint) #if !__has_extension(c_alignas) #if (defined(__cplusplus) __cplusplus = 201103L) || \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org