diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-13 00:41:12 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-13 00:41:12 +0000 |
commit | 13e64f06604c1502317921201bdde33c57161808 (patch) | |
tree | 865c85e4aaa41fc86711010362b7c0b0b4dbf832 /py/mpconfig.h | |
parent | 813edf63a3e4c0bab3dd5edd4e7295462386c2f3 (diff) | |
parent | 34f813ee29c7191e3de455c3fc9c788496e3b29e (diff) | |
download | micropython-13e64f06604c1502317921201bdde33c57161808.tar.gz micropython-13e64f06604c1502317921201bdde33c57161808.zip |
Merge remote-tracking branch 'upstream/master' into containment
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 2017ba366a..ada4aa2ea4 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -62,6 +62,18 @@ #define MICROPY_ENABLE_LEXER_UNIX (0) #endif +// Long int implementation +#define MICROPY_LONGINT_IMPL_NONE (0) +#define MICROPY_LONGINT_IMPL_LONGLONG (1) + +#ifndef MICROPY_LONGINT_IMPL +#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) +#endif + +#if MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_LONGLONG +typedef long long mp_longint_impl_t; +#endif + // Whether to support float and complex types #ifndef MICROPY_ENABLE_FLOAT #define MICROPY_ENABLE_FLOAT (0) @@ -76,6 +88,11 @@ /*****************************************************************************/ /* Miscellaneous settings */ +#define BITS_PER_BYTE (8) +#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD) +// machine_int_t value with most significant bit set +#define WORD_MSBIT_HIGH (1 << (BYTES_PER_WORD * 8 - 1)) + // printf format spec to use for machine_int_t and friends #ifndef INT_FMT #ifdef __LP64__ |