mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12671 from hugueskamba/hk-netsocket-remove-armc5-support
Netsocket/lwIP Stack: Remove support for ARM Compiler 5pull/12840/head
commit
27405bff31
|
@ -509,9 +509,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros(uint8_t value)
|
|||
|
||||
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
|
||||
{
|
||||
#ifdef __CC_ARM
|
||||
return value ? __clz((unsigned int) value << 24) : 8;
|
||||
#elif defined __GNUC__
|
||||
#if defined __GNUC__
|
||||
return value ? __builtin_clz((unsigned int) value << 24) : 8;
|
||||
#else
|
||||
uint_fast8_t cnt = 0;
|
||||
|
@ -536,9 +534,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_8(uint8_t value)
|
|||
|
||||
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
|
||||
{
|
||||
#ifdef __CC_ARM
|
||||
return value ? __clz((unsigned int) value << 16) : 16;
|
||||
#elif defined __GNUC__
|
||||
#if defined __GNUC__
|
||||
return value ? __builtin_clz((unsigned int) value << 16) : 16;
|
||||
#else
|
||||
uint_fast8_t cnt = 0;
|
||||
|
@ -567,9 +563,7 @@ COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_16(uint16_t value)
|
|||
|
||||
COMMON_FUNCTIONS_FN uint_fast8_t common_count_leading_zeros_32(uint32_t value)
|
||||
{
|
||||
#ifdef __CC_ARM
|
||||
return __clz(value);
|
||||
#elif defined __GNUC__
|
||||
#if defined __GNUC__
|
||||
return value ? __builtin_clz(value) : 32;
|
||||
#else
|
||||
uint_fast8_t cnt = 0;
|
||||
|
|
|
@ -106,8 +106,6 @@ typedef int_fast32_t int_fast24_t;
|
|||
#define NS_NORETURN _Noreturn
|
||||
#elif defined __GNUC__
|
||||
#define NS_NORETURN __attribute__((__noreturn__))
|
||||
#elif defined __CC_ARM
|
||||
#define NS_NORETURN __declspec(noreturn)
|
||||
#elif defined __IAR_SYSTEMS_ICC__
|
||||
#define NS_NORETURN __noreturn
|
||||
#else
|
||||
|
@ -117,7 +115,7 @@ typedef int_fast32_t int_fast24_t;
|
|||
|
||||
/* C11's "alignas" macro, emulated for integer expressions if necessary */
|
||||
#ifndef __alignas_is_defined
|
||||
#if defined __CC_ARM || defined __TASKING__
|
||||
#if defined __TASKING__
|
||||
#define alignas(n) __align(n)
|
||||
#define __alignas_is_defined 1
|
||||
#elif (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L) || (defined __cplusplus && __cplusplus >= 201103L)
|
||||
|
@ -149,7 +147,7 @@ typedef int_fast32_t int_fast24_t;
|
|||
* static int foo(void) MAYBE_UNUSED;
|
||||
* ~~~
|
||||
*/
|
||||
#if defined __CC_ARM || defined __GNUC__
|
||||
#if defined __GNUC__
|
||||
#define MAYBE_UNUSED __attribute__((unused))
|
||||
#else
|
||||
#define MAYBE_UNUSED
|
||||
|
@ -219,7 +217,7 @@ typedef int_fast32_t int_fast24_t;
|
|||
#else /* C */
|
||||
# if __STDC_VERSION__ >= 201112L
|
||||
# define NS_STATIC_ASSERT(test, str) _Static_assert(test, str);
|
||||
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
|
||||
# elif defined __GNUC__ && NS_GCC_VERSION >= 40600
|
||||
# ifdef _Static_assert
|
||||
/*
|
||||
* Some versions of glibc cdefs.h (which comes in via <stdint.h> above)
|
||||
|
@ -255,7 +253,7 @@ typedef int_fast32_t int_fast24_t;
|
|||
|
||||
/** \brief Pragma to suppress warnings about always true/false comparisons
|
||||
*/
|
||||
#if defined __GNUC__ && NS_GCC_VERSION >= 40600 && !defined __CC_ARM
|
||||
#if defined __GNUC__ && NS_GCC_VERSION >= 40600
|
||||
#define NS_FUNNY_COMPARE_OK _Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic ignored \"-Wtype-limits\"")
|
||||
#define NS_FUNNY_COMPARE_RESTORE _Pragma("GCC diagnostic pop")
|
||||
|
@ -272,11 +270,7 @@ typedef int_fast32_t int_fast24_t;
|
|||
* components should ensure this is not included by only using it in
|
||||
* a ifdef blocks providing dummy definitions.
|
||||
*/
|
||||
#ifdef __CC_ARM
|
||||
// statement is unreachable(111), controlling expression is constant(236), expression has no effect(174),
|
||||
// function was declared but never referenced(177), variable was set but never used(550)
|
||||
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=111,236,174,177,550")
|
||||
#elif defined __IAR_SYSTEMS_ICC__
|
||||
#if defined __IAR_SYSTEMS_ICC__
|
||||
// controlling expression is constant
|
||||
#define NS_DUMMY_DEFINITIONS_OK _Pragma("diag_suppress=Pe236")
|
||||
#else
|
||||
|
|
|
@ -54,14 +54,7 @@ extern "C" {
|
|||
#define LWIP_PROVIDE_ERRNO
|
||||
#endif
|
||||
|
||||
#if defined(__arm__) && defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050)
|
||||
/* Keil uVision4 tools */
|
||||
#define PACK_STRUCT_BEGIN __packed
|
||||
#define PACK_STRUCT_STRUCT
|
||||
#define PACK_STRUCT_END
|
||||
#define PACK_STRUCT_FIELD(fld) fld
|
||||
#define ALIGNED(n) __align(n)
|
||||
#elif defined (__IAR_SYSTEMS_ICC__)
|
||||
#if defined (__IAR_SYSTEMS_ICC__)
|
||||
/* IAR Embedded Workbench tools */
|
||||
#define PACK_STRUCT_BEGIN __packed
|
||||
#define PACK_STRUCT_STRUCT
|
||||
|
|
|
@ -94,10 +94,6 @@
|
|||
#elif defined(__clang__)
|
||||
#define FNET_CFG_COMP_CLANG (1)
|
||||
#define FNET_COMP_STR "CLANG"
|
||||
/* Keil uVision compiler using armcc. */
|
||||
#elif defined(__CC_ARM)
|
||||
#define FNET_CFG_COMP_UV (1)
|
||||
#define FNET_COMP_STR "UV"
|
||||
/* GNU GCC */
|
||||
#elif defined(__GNUC__)
|
||||
#define FNET_CFG_COMP_GNUC (1)
|
||||
|
|
|
@ -24,10 +24,6 @@
|
|||
|
||||
#include "ns_types.h"
|
||||
|
||||
#ifdef __CC_ARM
|
||||
#pragma diag_suppress 546 // transfer of control bypasses initialization
|
||||
#endif
|
||||
|
||||
#define __ns_cfg_header(x) #x
|
||||
#define _ns_cfg_header(x) __ns_cfg_header(configs/cfg_##x.h)
|
||||
#define ns_cfg_header(x) _ns_cfg_header(x)
|
||||
|
|
|
@ -247,15 +247,6 @@ bool Kinetis_EMAC::low_level_init_successful()
|
|||
config.rxAccelerConfig = kENET_RxAccelMacCheckEnabled;
|
||||
ENET_Init(ENET, &g_handle, &config, &buffCfg, hwaddr, sysClock);
|
||||
|
||||
#if defined(TOOLCHAIN_ARM)
|
||||
#if defined(__OPTIMISE_TIME) && (__ARMCC_VERSION < 5060750)
|
||||
/* Add multicast groups
|
||||
work around for https://github.com/ARMmbed/mbed-os/issues/4372 */
|
||||
ENET->GAUR = 0xFFFFFFFFu;
|
||||
ENET->GALR = 0xFFFFFFFFu;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENET_SetCallback(&g_handle, &Kinetis_EMAC::ethernet_callback, this);
|
||||
ENET_ActiveRead(ENET);
|
||||
|
||||
|
|
|
@ -241,15 +241,6 @@ bool Kinetis_EMAC::low_level_init_successful()
|
|||
config.rxAccelerConfig = kENET_RxAccelMacCheckEnabled;
|
||||
ENET_Init(ENET, &g_handle, &config, &buffCfg, hwaddr, sysClock);
|
||||
|
||||
#if defined(TOOLCHAIN_ARM)
|
||||
#if defined(__OPTIMISE_TIME) && (__ARMCC_VERSION < 5060750)
|
||||
/* Add multicast groups
|
||||
work around for https://github.com/ARMmbed/mbed-os/issues/4372 */
|
||||
ENET->GAUR = 0xFFFFFFFFu;
|
||||
ENET->GALR = 0xFFFFFFFFu;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
ENET_SetCallback(&g_handle, &Kinetis_EMAC::ethernet_callback, this);
|
||||
ENET_ActiveRead(ENET);
|
||||
|
||||
|
|
|
@ -97,12 +97,6 @@ ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptor
|
|||
#pragma location=0x30040400
|
||||
uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffers */
|
||||
|
||||
#elif defined ( __CC_ARM ) /* ARMC5 */
|
||||
|
||||
__attribute__((section(".RxDecripSection"))) ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT]; /* Ethernet Rx DMA Descriptors */
|
||||
__attribute__((section(".TxDecripSection"))) ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT]; /* Ethernet Tx DMA Descriptors */
|
||||
__attribute__((section(".RxArraySection"))) uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE]; /* Ethernet Receive Buffer */
|
||||
|
||||
#elif defined ( __GNUC__ ) /* GCC & ARMC6*/
|
||||
|
||||
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */
|
||||
|
|
|
@ -256,14 +256,7 @@ typedef int sys_prot_t;
|
|||
#define OUTPUT_BUFFER 0
|
||||
#define INPUT_BUFFER 1
|
||||
|
||||
#if defined(__arm__) && defined(__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050)
|
||||
/* Keil uVision4 tools */
|
||||
#define PACK_STRUCT_BEGIN __packed
|
||||
#define PACK_STRUCT_STRUCT
|
||||
#define PACK_STRUCT_END
|
||||
#define PACK_STRUCT_FIELD(fld) fld
|
||||
#define ALIGNED(n) __align(n)
|
||||
#elif defined (__IAR_SYSTEMS_ICC__)
|
||||
#if defined (__IAR_SYSTEMS_ICC__)
|
||||
/* IAR Embedded Workbench tools */
|
||||
#define PACK_STRUCT_BEGIN __packed
|
||||
#define PACK_STRUCT_STRUCT
|
||||
|
|
Loading…
Reference in New Issue