Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2017-11-30 Thread Reid Kleckner via cfe-commits
On Thu, Nov 30, 2017 at 10:21 AM, Dan Olson via Phabricator < revi...@reviews.llvm.org> wrote: > dolson added a comment. > > Hello, > > In the process of upgrading from clang 3.6.1 to a newer version, I ran > into this new error and thus imported the new intrinsics from intrin.h for > rep movsb an

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-12-27 Thread Vitaly Buka via cfe-commits
Both work: #define DECLARE_ASM_REP_MOVS(Type, Movs) \ template <> void asm_rep_movs(Type * dst, Type * src, size_t size) { \ __asm__("rep " Movs " \n\t" \ : "+D"(dst), "+S"(src), "+c"(size) \ : \ : "memory"); \ }

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-09-25 Thread Ziv Izhar via cfe-commits
zizhar added a comment. Hello :) I will prepare another patch as you suggested, is this patch good? Can it be submitted? Ziv https://reviews.llvm.org/D15075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-09-12 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. You can create a separate patch for the changes made to lib/Headers/intrin.h and have it reviewed before committing this patch. Also, __dst, __x and __n should be added to the output list and "memory" to the clobber list as majnemer pointed out. I think you can use con

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-09-08 Thread Ziv Izhar via cfe-commits
zizhar updated this revision to Diff 70660. zizhar added a comment. Hi, I have moved the relevant code to TargetInfo as previously discussed, and created a default implementation and the x86 implementation. Regarding the intrinsics, I believe it should be a separate fix, as it is not related to

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D15075#486986, @zizhar wrote: > Akira, > You've mentioned a good point, this X86 logic should indeed be moved to > X86TargetInfo. > The current convertConstraint() implementation is not doing what I need – it > doesn’t handle all the input

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-18 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Headers/Intrin.h:841-874 @@ -840,44 +840,36 @@ #if defined(__i386__) || defined(__x86_64__) static __inline__ void __DEFAULT_FN_ATTRS __movsb(unsigned char *__dst, unsigned char const *__src, size_t __n) { - __asm__("rep m

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-18 Thread Ziv Izhar via cfe-commits
zizhar added a comment. Akira, You've mentioned a good point, this X86 logic should indeed be moved to X86TargetInfo. The current convertConstraint() implementation is not doing what I need – it doesn’t handle all the input/output constraints I need, and it returns the constraint in a different

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-18 Thread Ziv Izhar via cfe-commits
zizhar added a comment. Hello Hans, Regarding the changes in intrin.h, You're the last to change/add these lines, I found out that there is a conflict between the clobber list and input or output lists. Can you review this change? Thanks, Ziv Izhar https://reviews.llvm.org/D15075 __

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-01 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/TargetInfo.h:585 @@ +584,3 @@ + StringRef + TargetInfo::getNormalizedGCCRegisterName(StringRef Name, + bool ReturnCannonical = false) const; This gives bui

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-06-16 Thread Ziv Izhar via cfe-commits
zizhar updated this revision to Diff 60996. zizhar added a comment. A redo, investigated a bit more, had to fix some things, moved it to ActOnGCCAsmStmt. fixed intrin.h (the patch reveals a problem in it). added tests to check for regression and examples. http://reviews.llvm.org/D15075 Files:

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-02-26 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. > After going a bit through the log, I think that there is no reason for clang > to not detect it, probably the check was just forgotten. > > This patch is the check. Which part of your patch (in SemaStmtAsm.cpp) is supposed to catch that? I applied this patch and

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-02-24 Thread Ziv Izhar via cfe-commits
zizhar added a comment. You understood corectly :) After going a bit through the log, I think that there is no reason for clang to not detect it, probably the check was just forgotten. This patch is the check. "r" constraint means (taken from the spec:) A register operand is allowed provided