diff options
author | Felipe Magno de Almeida <felipe@expertisesolutions.com.br> | 2016-12-06 17:58:10 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-12-06 17:58:10 +0000 |
commit | f68963c09232f56ee793ab12b902f16c45af0214 (patch) | |
tree | ac0247edd0c766e17035431b412a6497fee73f38 /libstdc++-v3/src | |
parent | 6649ad7efdd583d84099beb5ee2b03a0ed28b9ee (diff) | |
download | gcc-f68963c09232f56ee793ab12b902f16c45af0214.zip gcc-f68963c09232f56ee793ab12b902f16c45af0214.tar.gz gcc-f68963c09232f56ee793ab12b902f16c45af0214.tar.bz2 |
Add #ifdef case for 16 bits in cow-stdexcept.cc
Added #ifdef case for when void* is 16 bits so it compiles in AVR
target.
2016-12-06 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
* src/c++11/cow-stdexcept.cc: Add special case for 16 bit pointers.
From-SVN: r243310
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/c++11/cow-stdexcept.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libstdc++-v3/src/c++11/cow-stdexcept.cc b/libstdc++-v3/src/c++11/cow-stdexcept.cc index 31a89df..641b372 100644 --- a/libstdc++-v3/src/c++11/cow-stdexcept.cc +++ b/libstdc++-v3/src/c++11/cow-stdexcept.cc @@ -208,6 +208,8 @@ extern void* _ZGTtnaX (size_t sz) __attribute__((weak)); extern void _ZGTtdlPv (void* ptr) __attribute__((weak)); extern uint8_t _ITM_RU1(const uint8_t *p) ITM_REGPARM __attribute__((weak)); +extern uint16_t _ITM_RU2(const uint16_t *p) + ITM_REGPARM __attribute__((weak)); extern uint32_t _ITM_RU4(const uint32_t *p) ITM_REGPARM __attribute__((weak)); extern uint64_t _ITM_RU8(const uint64_t *p) @@ -272,12 +274,15 @@ _txnal_cow_string_C1_for_exceptions(void* that, const char* s, static void* txnal_read_ptr(void* const * ptr) { static_assert(sizeof(uint64_t) == sizeof(void*) - || sizeof(uint32_t) == sizeof(void*), - "Pointers must be 32 bits or 64 bits wide"); + || sizeof(uint32_t) == sizeof(void*) + || sizeof(uint16_t) == sizeof(void*), + "Pointers must be 16 bits, 32 bits or 64 bits wide"); #if __UINTPTR_MAX__ == __UINT64_MAX__ return (void*)_ITM_RU8((const uint64_t*)ptr); -#else +#elif __UINTPTR_MAX__ == __UINT32_MAX__ return (void*)_ITM_RU4((const uint32_t*)ptr); +#else + return (void*)_ITM_RU2((const uint16_t*)ptr); #endif } |