Please review: http://reviews.llvm.org/D15883 and http://reviews.llvm.org/D15781

2016-02-06 Thread Timon Van Overveldt via cfe-commits
Hi there,

Could someone take a look at http://reviews.llvm.org/D15883 and
http://reviews.llvm.org/D15781. I was halfway through the review process,
with Logan (on to: line) as my main reviewer, but he seems to have become
unresponsive.

I was told by Logan to submit patch D15883 first, so as not to break the
bootstrap build of compiler-rt. Hence the reason for the two separate
patches.

Your reviews will be much appreciated!

Cheers,
Timon
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-15 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

Could someone please take a look at this patch as well as 
http://reviews.llvm.org/D15781? Thanks!


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-15 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

Hi compnerd, thanks for getting back to me. I've updated the code.

I was wondering though, where did you see @nbjoerg's comment? I couldn't find 
any reference to it here or on cfe-commits.


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-15 Thread Timon Van Overveldt via cfe-commits
timonvo updated this revision to Diff 48015.
timonvo added a comment.

Guard ARM EHABI enums using \#ifs (compnerd/nbjoerg's advice).


http://reviews.llvm.org/D15883

Files:
  lib/Headers/unwind.h

Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,10 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +92,11 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +158,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__)
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,


Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,10 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +92,11 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +158,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__)
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-15 Thread Timon Van Overveldt via cfe-commits
timonvo updated this revision to Diff 48026.
timonvo added a comment.

Added local macro for enhanced readability.


http://reviews.llvm.org/D15883

Files:
  lib/Headers/unwind.h

Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -53,6 +53,13 @@
 # endif
 #else
 
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+#define _UNWIND_ARM_EHABI 1
+#else
+#define _UNWIND_ARM_EHABI 0
+#endif
+
 #include 
 
 #ifdef __cplusplus
@@ -79,6 +86,9 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if _UNWIND_ARM_EHABI
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +98,10 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if _UNWIND_ARM_EHABI
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +163,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if _UNWIND_ARM_EHABI
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,


Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -53,6 +53,13 @@
 # endif
 #else
 
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+#define _UNWIND_ARM_EHABI 1
+#else
+#define _UNWIND_ARM_EHABI 0
+#endif
+
 #include 
 
 #ifdef __cplusplus
@@ -79,6 +86,9 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if _UNWIND_ARM_EHABI
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +98,10 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if _UNWIND_ARM_EHABI
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +163,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if _UNWIND_ARM_EHABI
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-15 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

Note that I avoided using a local macro at first because I didn't want to 
export any additional symbols/macros from this file. But I've moved to use one 
now. Note that I changed the name slightly to be more in line with libunwind's 
naming (it uses _LIBUNWIND_ARM_EHABI as the macro name).


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-26 Thread Timon Van Overveldt via cfe-commits
timonvo updated this revision to Diff 49215.
timonvo added a comment.

That's basically the Diff 48015 I had at some point. Reverted back to it now. 
Now this patch doesn't declare any macros anymore.


http://reviews.llvm.org/D15883

Files:
  lib/Headers/unwind.h

Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,10 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +92,11 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +158,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__)
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,


Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,10 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_OK = 0, /* used by ARM EHABI */
+#endif
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +92,11 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
+!defined(__ARM_DWARF_EH__)
+  _URC_FAILURE = 9 /* used by ARM EHABI */
+#endif
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +158,15 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__ARM_DWARF_EH__)
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+#endif
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-02-27 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

I don't have commit access. Can I land this CL myself somehow without commit 
access (e.g. using arc), or will you have to submit it for me?


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-01-05 Thread Timon Van Overveldt via cfe-commits
timonvo created this revision.
timonvo added a reviewer: logan.
timonvo added a subscriber: cfe-commits.
Herald added subscribers: rengolin, aemerson.

Adds a number of constants, defined in the ARM EHABI spec, to the Clang
lib/Headers/unwind.h header. This is prerequisite for landing
http://reviews.llvm.org/D15781, as previously discussed there.

http://reviews.llvm.org/D15883

Files:
  lib/Headers/unwind.h

Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,7 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+  _URC_OK = 0, /* used by ARM EHABI */
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +89,8 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+  _URC_FAILURE = 9 /* used by ARM EHABI */
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +152,13 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,


Index: lib/Headers/unwind.h
===
--- lib/Headers/unwind.h
+++ lib/Headers/unwind.h
@@ -79,6 +79,7 @@
 struct _Unwind_Exception;
 typedef enum {
   _URC_NO_REASON = 0,
+  _URC_OK = 0, /* used by ARM EHABI */
   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
 
   _URC_FATAL_PHASE2_ERROR = 2,
@@ -88,7 +89,8 @@
   _URC_END_OF_STACK = 5,
   _URC_HANDLER_FOUND = 6,
   _URC_INSTALL_CONTEXT = 7,
-  _URC_CONTINUE_UNWIND = 8
+  _URC_CONTINUE_UNWIND = 8,
+  _URC_FAILURE = 9 /* used by ARM EHABI */
 } _Unwind_Reason_Code;
 
 typedef enum {
@@ -150,6 +152,13 @@
   _UVRSR_FAILED = 2
 } _Unwind_VRS_Result;
 
+typedef uint32_t _Unwind_State;
+#define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
+#define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
+#define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
+#define _US_ACTION_MASK   ((_Unwind_State)3)
+#define _US_FORCE_UNWIND  ((_Unwind_State)8)
+
 _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
   _Unwind_VRS_RegClass __regclass,
   uint32_t __regno,
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-01-05 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

In http://reviews.llvm.org/D15883#319445, @rengolin wrote:

> Tests?


Sure, I could add some. But is it common practice to test constants? The tests 
would end up being a duplication of the definition, I'm not sure how valuable 
that would be. I also couldn't find tests for any of the existing constants, at 
least not through a quick search under Clang's test/ directory.

Or were you thinking of some other type of test?


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D15883: Add ARM EHABI-related constants to unwind.h.

2016-01-18 Thread Timon Van Overveldt via cfe-commits
timonvo added a comment.

Logan, how should we proceed here? Can you approve the patch?

I also have no committer rights to the project, so does that mean you (or 
someone else) need to commit it on my behalf?


http://reviews.llvm.org/D15883



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits