Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
82a165d9
Commit
82a165d9
authored
Feb 27, 2014
by
Paul Sokolovsky
Browse files
nlr.h: Do proper arch selection, using the same tests as nlr*.S .
parent
793838a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/nlr.h
View file @
82a165d9
...
...
@@ -3,23 +3,19 @@
#include
<limits.h>
//#ifndef __WORDSIZE
//#error __WORDSIZE needs to be defined
//#endif
typedef
struct
_nlr_buf_t
nlr_buf_t
;
struct
_nlr_buf_t
{
// the entries here must all be machine word size
nlr_buf_t
*
prev
;
void
*
ret_val
;
#if
__WORDSIZE == 32
#if
defined(__i386__)
void
*
regs
[
6
];
#elif
__WORDSIZE == 64
#elif
defined(__x86_64__)
void
*
regs
[
8
];
#else
// hack for thumb
#elif defined(__thumb2__)
void
*
regs
[
10
];
//#error Unsupported __WORDSIZE
#else
#error Unknown arch in nlr.h
#endif
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment