summaryrefslogtreecommitdiff
path: root/gtk/roaring
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-25 16:11:23 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2020-12-25 16:16:43 +0100
commit84c6708366c81e18adfefe875623d3065778e3f1 (patch)
treebd617356083695db19f2077ff5399a694cd92bab /gtk/roaring
parentf7e30169492298e1b566f17d09e3cb561e7b86fc (diff)
downloadgtk+-84c6708366c81e18adfefe875623d3065778e3f1.tar.gz
Remove unused static inline function
This was causing a warning on AArch64 since __LITTLE_ENDIAN__ and __BIG_ENDIAN__ weren’t set, but the functions were actually completely unused.
Diffstat (limited to 'gtk/roaring')
-rw-r--r--gtk/roaring/roaring.h180
1 files changed, 0 insertions, 180 deletions
diff --git a/gtk/roaring/roaring.h b/gtk/roaring/roaring.h
index b3dc60de90..6ce4eced6d 100644
--- a/gtk/roaring/roaring.h
+++ b/gtk/roaring/roaring.h
@@ -6310,186 +6310,6 @@ void ra_shift_tail(roaring_array_t *ra, int32_t count, int32_t distance);
#endif
/* end file include/roaring/roaring_array.h */
-/* begin file include/roaring/misc/configreport.h */
-/*
- * configreport.h
- *
- */
-
-#ifndef INCLUDE_MISC_CONFIGREPORT_H_
-#define INCLUDE_MISC_CONFIGREPORT_H_
-
-#include <stddef.h> // for size_t
-#include <stdint.h>
-#include <stdio.h>
-
-
-#ifdef IS_X64
-// useful for basic info (0)
-static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
- unsigned int *ecx, unsigned int *edx) {
-#ifdef ROARING_INLINE_ASM
- __asm volatile("cpuid"
- : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
- : "0"(*eax), "2"(*ecx));
-#endif /* not sure what to do when inline assembly is unavailable*/
-}
-
-// CPUID instruction takes no parameters as CPUID implicitly uses the EAX
-// register.
-// The EAX register should be loaded with a value specifying what information to
-// return
-static inline void cpuinfo(int code, int *eax, int *ebx, int *ecx, int *edx) {
-#ifdef ROARING_INLINE_ASM
- __asm__ volatile("cpuid;" // call cpuid instruction
- : "=a"(*eax), "=b"(*ebx), "=c"(*ecx),
- "=d"(*edx) // output equal to "movl %%eax %1"
- : "a"(code) // input equal to "movl %1, %%eax"
- //:"%eax","%ebx","%ecx","%edx"// clobbered register
- );
-#endif /* not sure what to do when inline assembly is unavailable*/
-}
-
-static inline int computecacheline(void) {
- int eax = 0, ebx = 0, ecx = 0, edx = 0;
- cpuinfo((int)0x80000006, &eax, &ebx, &ecx, &edx);
- return ecx & 0xFF;
-}
-
-// this is quite imperfect, but can be handy
-static inline const char *guessprocessor(void) {
- unsigned eax = 1, ebx = 0, ecx = 0, edx = 0;
- native_cpuid(&eax, &ebx, &ecx, &edx);
- const char *codename;
- switch (eax >> 4) {
- case 0x506E:
- codename = "Skylake";
- break;
- case 0x406C:
- codename = "CherryTrail";
- break;
- case 0x306D:
- codename = "Broadwell";
- break;
- case 0x306C:
- codename = "Haswell";
- break;
- case 0x306A:
- codename = "IvyBridge";
- break;
- case 0x206A:
- case 0x206D:
- codename = "SandyBridge";
- break;
- case 0x2065:
- case 0x206C:
- case 0x206F:
- codename = "Westmere";
- break;
- case 0x106E:
- case 0x106A:
- case 0x206E:
- codename = "Nehalem";
- break;
- case 0x1067:
- case 0x106D:
- codename = "Penryn";
- break;
- case 0x006F:
- case 0x1066:
- codename = "Merom";
- break;
- case 0x0066:
- codename = "Presler";
- break;
- case 0x0063:
- case 0x0064:
- codename = "Prescott";
- break;
- case 0x006D:
- codename = "Dothan";
- break;
- case 0x0366:
- codename = "Cedarview";
- break;
- case 0x0266:
- codename = "Lincroft";
- break;
- case 0x016C:
- codename = "Pineview";
- break;
- default:
- codename = "UNKNOWN";
- break;
- }
- return codename;
-}
-
-static inline void tellmeall(void) {
- printf("Intel processor: %s\t", guessprocessor());
-
-#ifdef __VERSION__
- printf(" compiler version: %s\t", __VERSION__);
-#endif
- printf("\tBuild option USEAVX ");
-#ifdef USEAVX
- printf("enabled\n");
-#else
- printf("disabled\n");
-#endif
-#ifndef __AVX2__
- printf("AVX2 is NOT available.\n");
-#endif
-
- if ((sizeof(int) != 4) || (sizeof(long) != 8)) {
- printf("number of bytes: int = %lu long = %lu \n",
- (long unsigned int)sizeof(size_t),
- (long unsigned int)sizeof(int));
- }
-#if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__
-// This is what we expect!
-// printf("you have little endian machine");
-#endif
-#if defined(__BIG_ENDIAN__) && __BIG_ENDIAN__
- printf("you have a big endian machine");
-#endif
-#if __CHAR_BIT__
- if (__CHAR_BIT__ != 8) printf("on your machine, chars don't have 8bits???");
-#endif
- if (computecacheline() != 64)
- printf("cache line: %d bytes\n", computecacheline());
-}
-#else
-
-static inline void tellmeall(void) {
- printf("Non-X64 processor\n");
-#ifdef __arm__
- printf("ARM processor detected\n");
-#endif
-#ifdef __VERSION__
- printf(" compiler version: %s\t", __VERSION__);
-#endif
- if ((sizeof(int) != 4) || (sizeof(long) != 8)) {
- printf("number of bytes: int = %lu long = %lu \n",
- (long unsigned int)sizeof(size_t),
- (long unsigned int)sizeof(int));
- }
-#if __LITTLE_ENDIAN__
-// This is what we expect!
-// printf("you have little endian machine");
-#endif
-#if __BIG_ENDIAN__
- printf("you have a big endian machine");
-#endif
-#if __CHAR_BIT__
- if (__CHAR_BIT__ != 8) printf("on your machine, chars don't have 8bits???");
-#endif
-}
-
-#endif
-
-#endif /* INCLUDE_MISC_CONFIGREPORT_H_ */
-/* end file include/roaring/misc/configreport.h */
/* begin file include/roaring/roaring.h */
/*
An implementation of Roaring Bitmaps in C.