Skip to content

Commit ada2839

Browse files
remove compatibility wrappers for GCC < 4.8
As we made our move to C11, GCC requirements has been bumped. Wrappers for old versions of GCC can be dropped. Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
1 parent 934c0cc commit ada2839

File tree

9 files changed

+3
-69
lines changed

9 files changed

+3
-69
lines changed

lib/eal/arm/include/rte_byteorder.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,6 @@ extern "C" {
1717
#include <rte_common.h>
1818
#include "generic/rte_byteorder.h"
1919

20-
/* fix missing __builtin_bswap16 for gcc older then 4.8 */
21-
#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
22-
23-
static inline uint16_t rte_arch_bswap16(uint16_t _x)
24-
{
25-
uint16_t x = _x;
26-
27-
asm volatile ("rev16 %w0,%w1"
28-
: "=r" (x)
29-
: "r" (x)
30-
);
31-
return x;
32-
}
33-
34-
#define rte_bswap16(x) ((uint16_t)(__builtin_constant_p(x) ? \
35-
rte_constant_bswap16(x) : \
36-
rte_arch_bswap16(x)))
37-
#endif
38-
3920
/* ARM architecture is bi-endian (both big and little). */
4021
#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
4122

lib/eal/arm/include/rte_vect.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,6 @@ vcopyq_laneq_u32(uint32x4_t a, const int lane_a,
8383
#if defined(RTE_ARCH_ARM64)
8484
#if RTE_CC_IS_GNU && (GCC_VERSION < 70000)
8585

86-
#if (GCC_VERSION < 40900)
87-
typedef uint64_t poly64_t;
88-
typedef uint64x2_t poly64x2_t;
89-
typedef uint8_t poly128_t __attribute__((vector_size(16), aligned(16)));
90-
91-
static inline uint32x4_t
92-
vceqzq_u32(uint32x4_t a)
93-
{
94-
return (a == 0);
95-
}
96-
#endif
97-
9886
/* NEON intrinsic vreinterpretq_u64_p128() is supported since GCC version 7 */
9987
static inline uint64x2_t
10088
vreinterpretq_u64_p128(poly128_t x)

lib/eal/include/generic/rte_byteorder.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,7 @@ static uint64_t rte_be_to_cpu_64(rte_be64_t x);
234234
#endif /* __DOXYGEN__ */
235235

236236
#ifdef RTE_FORCE_INTRINSICS
237-
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
238237
#define rte_bswap16(x) __builtin_bswap16(x)
239-
#endif
240238

241239
#define rte_bswap32(x) __builtin_bswap32(x)
242240

lib/eal/include/rte_debug.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ void rte_dump_stack(void);
6060
* documentation.
6161
*/
6262
void __rte_panic(const char *funcname , const char *format, ...)
63-
#ifdef __GNUC__
64-
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2))
6563
__rte_cold
66-
#endif
67-
#endif
6864
__rte_noreturn
6965
__rte_format_printf(2, 3);
7066

lib/eal/ppc/include/rte_byteorder.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ static inline uint64_t rte_arch_bswap64(uint64_t _x)
6262
#define rte_bswap64(x) ((uint64_t)(__builtin_constant_p(x) ? \
6363
rte_constant_bswap64(x) : \
6464
rte_arch_bswap64(x)))
65-
#else
66-
/*
67-
* __builtin_bswap16 is only available gcc 4.8 and upwards
68-
*/
69-
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
70-
#define rte_bswap16(x) ((uint16_t)(__builtin_constant_p(x) ? \
71-
rte_constant_bswap16(x) : \
72-
rte_arch_bswap16(x)))
73-
#endif
7465
#endif
7566

7667
/* Power 8 have both little endian and big endian mode

lib/eal/x86/include/rte_byteorder.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ static inline uint32_t rte_arch_bswap32(uint32_t _x)
5959
#define rte_bswap64(x) ((uint64_t)(__builtin_constant_p(x) ? \
6060
rte_constant_bswap64(x) : \
6161
rte_arch_bswap64(x)))
62-
#else
63-
/*
64-
* __builtin_bswap16 is only available gcc 4.8 and upwards
65-
*/
66-
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
67-
#define rte_bswap16(x) ((uint16_t)(__builtin_constant_p(x) ? \
68-
rte_constant_bswap16(x) : \
69-
rte_arch_bswap16(x)))
70-
#endif
7162
#endif
7263

7364
#define rte_cpu_to_le_16(x) (x)

lib/eal/x86/include/rte_vect.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,13 @@
1616
#include <rte_common.h>
1717
#include "generic/rte_vect.h"
1818

19-
#if (defined(__ICC) || \
20-
(defined(_WIN64)) || \
21-
(__GNUC__ == 4 && __GNUC_MINOR__ < 4))
22-
19+
#if defined(__ICC) || defined(_WIN64)
2320
#include <smmintrin.h> /* SSE4 */
24-
2521
#if defined(__AVX__)
2622
#include <immintrin.h>
2723
#endif
28-
2924
#else
30-
3125
#include <x86intrin.h>
32-
3326
#endif
3427

3528
#ifdef __cplusplus

lib/log/rte_log.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,7 @@ void rte_log_dump(FILE *f);
277277
* - Negative on error.
278278
*/
279279
int rte_log(uint32_t level, uint32_t logtype, const char *format, ...)
280-
#ifdef __GNUC__
281-
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2))
282280
__rte_cold
283-
#endif
284-
#endif
285281
__rte_format_printf(3, 4);
286282

287283
/**

lib/table/rte_lru_x86.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern "C" {
2020

2121
#if RTE_TABLE_HASH_LRU_STRATEGY == 2
2222

23-
#if RTE_CC_IS_GNU && (GCC_VERSION > 40306)
23+
#if RTE_CC_IS_GNU
2424
#include <x86intrin.h>
2525
#else
2626
#include <emmintrin.h>
@@ -64,7 +64,7 @@ do { \
6464

6565
#elif RTE_TABLE_HASH_LRU_STRATEGY == 3
6666

67-
#if RTE_CC_IS_GNU && (GCC_VERSION > 40306)
67+
#if RTE_CC_IS_GNU
6868
#include <x86intrin.h>
6969
#else
7070
#include <emmintrin.h>

0 commit comments

Comments
 (0)