Re: [lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-08 Thread Maxim Uvarov

Merged this patch.

Now only issue left is fix:
hash_main: no such file
I think something wrong in Makefile.am, not sure if CI also captures 
that issues,

but we will see. That is different issue.

Maxim.


On 12/03/2015 00:56, Bill Fischofer wrote:

Change the internal hash_name_and_kind() function to eliminate the use
of architecture-specific hash instructions. This eliminates build issues
surrounding ARM variants. Future optimizations will use the arch directory
consistent with other ODP modules.

Signed-off-by: Bill Fischofer 
---
  platform/linux-generic/odp_name_table.c | 182 +---
  1 file changed, 1 insertion(+), 181 deletions(-)

diff --git a/platform/linux-generic/odp_name_table.c 
b/platform/linux-generic/odp_name_table.c
index 10a760e..610f034 100644
--- a/platform/linux-generic/odp_name_table.c
+++ b/platform/linux-generic/odp_name_table.c
@@ -48,140 +48,6 @@
  
  #define SECONDARY_HASH_HISTO_PRINT  1
  
- /* #define USE_AES */

-
-#if defined __x86_64__ || defined __i386__
-
-#ifdef USE_AES
-
-typedef long long int v2di __attribute__((vector_size(16)));
-
-static const v2di HASH_CONST1 = { 0x123456, 0xFEBCDA383   };
-static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
-
-#define PLATFORM_HASH_STATE v2di
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
-   ({  \
-   hash_state = HASH_CONST1;   \
-   hash_state[0] ^= name_len;  \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word) \
-   ({ \
-   v2di data; \
-  \
-   data[0]= name_word;\
-   data[1]= name_word << 1;  \
-   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind)\
-   ({  \
-   uint64_t result;\
-   v2di data;  \
-   \
-   data[0]= name_kind; \
-   data[1]= name_kind << 7;\
-   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
-   hash_state = __builtin_ia32_aesenc128(hash_state,   \
- HASH_CONST2); \
-   hash_state = __builtin_ia32_aesenc128(hash_state,   \
- HASH_CONST1); \
-   result = (uint64_t)hash_state[0] ^ hash_state[1];   \
-   result = result ^ result >> 32; \
-   (uint32_t)result;   \
-   })
-
-#else
-
-#define PLATFORM_HASH_STATE uint64_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)\
-   ({\
-   hash_state  = (uint64_t)name_len; \
-   hash_state |= hash_state << 8;  \
-   hash_state |= hash_state << 16; \
-   hash_state |= hash_state << 32; \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word)  \
-   ({  \
-   uint64_t temp;  \
-   \
-   temp= ((uint64_t)name_word) * 0xFEFDFCF5;   \
-   hash_state  = hash_state * 0xFF;\
-   hash_state ^= temp ^ (uint64_t)name_word;   \
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind)\
-   ({  \
-   hash_state ^= (((uint32_t)kind) << 13); \
-   hash_state  = hash_state * 0xFEFDFCF5;  \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   hash_state  = hash_state % 0xFEEDDCCBBAA1;  \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   (uint32_t)hash_state;   \
-   })
-
-#endif
-
-#elif defined(__tile_gx__)
-
-#define PLATFORM_HASH_STATE  uint32_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
-   ({  \
-   hash_state = 0xFEFDFCF5;   \
-   

Re: [lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-08 Thread Bill Fischofer
hash_main is the binary output from compiling the hash CUnit test.  That's
should have nothing to do with TM.

On Tue, Dec 8, 2015 at 9:35 AM, Maxim Uvarov 
wrote:

> Merged this patch.
>
> Now only issue left is fix:
> hash_main: no such file
> I think something wrong in Makefile.am, not sure if CI also captures that
> issues,
> but we will see. That is different issue.
>
> Maxim.
>
>
>
> On 12/03/2015 00:56, Bill Fischofer wrote:
>
>> Change the internal hash_name_and_kind() function to eliminate the use
>> of architecture-specific hash instructions. This eliminates build issues
>> surrounding ARM variants. Future optimizations will use the arch directory
>> consistent with other ODP modules.
>>
>> Signed-off-by: Bill Fischofer 
>> ---
>>   platform/linux-generic/odp_name_table.c | 182
>> +---
>>   1 file changed, 1 insertion(+), 181 deletions(-)
>>
>> diff --git a/platform/linux-generic/odp_name_table.c
>> b/platform/linux-generic/odp_name_table.c
>> index 10a760e..610f034 100644
>> --- a/platform/linux-generic/odp_name_table.c
>> +++ b/platform/linux-generic/odp_name_table.c
>> @@ -48,140 +48,6 @@
>> #define SECONDARY_HASH_HISTO_PRINT  1
>>   - /* #define USE_AES */
>> -
>> -#if defined __x86_64__ || defined __i386__
>> -
>> -#ifdef USE_AES
>> -
>> -typedef long long int v2di __attribute__((vector_size(16)));
>> -
>> -static const v2di HASH_CONST1 = { 0x123456, 0xFEBCDA383   };
>> -static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
>> -
>> -#define PLATFORM_HASH_STATE v2di
>> -
>> -#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
>> -   ({  \
>> -   hash_state = HASH_CONST1;   \
>> -   hash_state[0] ^= name_len;  \
>> -   })
>> -
>> -#define PLATFORM_HASH32(hash_state, name_word) \
>> -   ({ \
>> -   v2di data; \
>> -  \
>> -   data[0]= name_word;\
>> -   data[1]= name_word << 1;\
>> -   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
>> -   })
>> -
>> -#define PLATFORM_HASH32_FINISH(hash_state, kind)\
>> -   ({  \
>> -   uint64_t result;\
>> -   v2di data;  \
>> -   \
>> -   data[0]= name_kind; \
>> -   data[1]= name_kind << 7;\
>> -   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,   \
>> - HASH_CONST2); \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,   \
>> - HASH_CONST1); \
>> -   result = (uint64_t)hash_state[0] ^ hash_state[1];   \
>> -   result = result ^ result >> 32; \
>> -   (uint32_t)result;   \
>> -   })
>> -
>> -#else
>> -
>> -#define PLATFORM_HASH_STATE uint64_t
>> -
>> -#define PLATFORM_HASH32_INIT(hash_state, name_len)\
>> -   ({\
>> -   hash_state  = (uint64_t)name_len; \
>> -   hash_state |= hash_state << 8;\
>> -   hash_state |= hash_state << 16;   \
>> -   hash_state |= hash_state << 32;   \
>> -   })
>> -
>> -#define PLATFORM_HASH32(hash_state, name_word)  \
>> -   ({  \
>> -   uint64_t temp;  \
>> -   \
>> -   temp= ((uint64_t)name_word) * 0xFEFDFCF5;   \
>> -   hash_state  = hash_state * 0xFF;\
>> -   hash_state ^= temp ^ (uint64_t)name_word;   \
>> -   })
>> -
>> -#define PLATFORM_HASH32_FINISH(hash_state, kind)\
>> -   ({  \
>> -   hash_state ^= (((uint32_t)kind) << 13); \
>> -   hash_state  = hash_state * 0xFEFDFCF5;  \
>> -   hash_state  = hash_state ^ hash_state >> 32;\
>> -   hash_state  = hash_state % 

Re: [lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-04 Thread Maxim Uvarov

Bill, here is the same problem which I had with mine updated IPC patches.

odp-check says that there is no hash_main binary so test fails.

I think something like that is needed. But it does not help:

+++ b/test/validation/hash/Makefile.am
@@ -3,7 +3,7 @@ include ../Makefile.inc
 noinst_LTLIBRARIES = libtesthash.la
 libtesthash_la_SOURCES = hash.c

-bin_PROGRAMS = hash_main$(EXEEXT)
+test_PROGRAMS = hash_main$(EXEEXT)

CC Anders as autotools expert :)

Maxim.


On 12/04/2015 06:49, Bill Fischofer wrote:
Ping.  This patch needs a review as it fixes critical bug 
https://bugs.linaro.org/show_bug.cgi?id=1930 that is breaking CI for 
api-next.


Thanks.

On Wed, Dec 2, 2015 at 3:56 PM, Bill Fischofer 
> wrote:


Change the internal hash_name_and_kind() function to eliminate the use
of architecture-specific hash instructions. This eliminates build
issues
surrounding ARM variants. Future optimizations will use the arch
directory
consistent with other ODP modules.

Signed-off-by: Bill Fischofer >
---
 platform/linux-generic/odp_name_table.c | 182
+---
 1 file changed, 1 insertion(+), 181 deletions(-)

diff --git a/platform/linux-generic/odp_name_table.c
b/platform/linux-generic/odp_name_table.c
index 10a760e..610f034 100644
--- a/platform/linux-generic/odp_name_table.c
+++ b/platform/linux-generic/odp_name_table.c
@@ -48,140 +48,6 @@

 #define SECONDARY_HASH_HISTO_PRINT  1

- /* #define USE_AES */
-
-#if defined __x86_64__ || defined __i386__
-
-#ifdef USE_AES
-
-typedef long long int v2di __attribute__((vector_size(16)));
-
-static const v2di HASH_CONST1 = { 0x123456,  0xFEBCDA383   };
-static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
-
-#define PLATFORM_HASH_STATE v2di
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len) \
-   ({ \
-   hash_state = HASH_CONST1;\
-   hash_state[0] ^= name_len; \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word)\
-   ({\
-   v2di data;\
-   \
-   data[0]= name_word;   \
-   data[1]= name_word << 1;   \
-   hash_state = __builtin_ia32_aesenc128(hash_state,
data); \
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind) \
-   ({ \
-   uint64_t result; \
-   v2di data; \
-\
-   data[0]= name_kind;\
-   data[1]= name_kind << 7;   \
-   hash_state = __builtin_ia32_aesenc128(hash_state,
data); \
-   hash_state = __builtin_ia32_aesenc128(hash_state, 
 \

-  HASH_CONST2); \
-   hash_state = __builtin_ia32_aesenc128(hash_state, 
 \

-  HASH_CONST1); \
-   result = (uint64_t)hash_state[0] ^
hash_state[1];   \
-   result = result ^ result >> 32;  \
-   (uint32_t)result;\
-   })
-
-#else
-
-#define PLATFORM_HASH_STATE uint64_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)\
-   ({\
-   hash_state  = (uint64_t)name_len; \
-   hash_state |= hash_state << 8; \
-   hash_state |= hash_state << 16;  \
-   hash_state |= hash_state << 32;\
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word) \
-   ({ \
-   uint64_t temp; \
-\
-   temp= ((uint64_t)name_word) * 0xFEFDFCF5; 
 \

-   hash_state  = hash_state * 0xFF; \
-   hash_state ^= temp ^ (uint64_t)name_word;\
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind) \
-   ({ \
-   hash_state ^= (((uint32_t)kind) << 13); \
-   hash_state  = hash_state * 0xFEFDFCF5; \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   hash_state  = hash_state % 0xFEEDDCCBBAA1; \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   (uint32_t)hash_state;\
-   })
-
-#endif
-
-#elif defined(__tile_gx__)
-
-#define PLATFORM_HASH_STATE  uint32_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len) \
-   ({ \
-   hash_state = 0xFEFDFCF5;

Re: [lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-04 Thread Bill Fischofer
Per our discussion a few moments ago, When I run the following:

GIT_BRANCH=api-next PATCH_DIR=$HOME/linaro/tmcrcfix CLEANUP=0 ./build.sh

it executes cleanly for me, so I'm not sure what the problem is.

On Fri, Dec 4, 2015 at 5:52 AM, Maxim Uvarov 
wrote:

> Bill, here is the same problem which I had with mine updated IPC patches.
>
> odp-check says that there is no hash_main binary so test fails.
>
> I think something like that is needed. But it does not help:
>
> +++ b/test/validation/hash/Makefile.am
> @@ -3,7 +3,7 @@ include ../Makefile.inc
>  noinst_LTLIBRARIES = libtesthash.la
>  libtesthash_la_SOURCES = hash.c
>
> -bin_PROGRAMS = hash_main$(EXEEXT)
> +test_PROGRAMS = hash_main$(EXEEXT)
>
> CC Anders as autotools expert :)
>
> Maxim.
>
>
> On 12/04/2015 06:49, Bill Fischofer wrote:
>
>> Ping.  This patch needs a review as it fixes critical bug
>> https://bugs.linaro.org/show_bug.cgi?id=1930 that is breaking CI for
>> api-next.
>>
>> Thanks.
>>
>> On Wed, Dec 2, 2015 at 3:56 PM, Bill Fischofer > > wrote:
>>
>> Change the internal hash_name_and_kind() function to eliminate the use
>> of architecture-specific hash instructions. This eliminates build
>> issues
>> surrounding ARM variants. Future optimizations will use the arch
>> directory
>> consistent with other ODP modules.
>>
>> Signed-off-by: Bill Fischofer > >
>>
>> ---
>>  platform/linux-generic/odp_name_table.c | 182
>> +---
>>  1 file changed, 1 insertion(+), 181 deletions(-)
>>
>> diff --git a/platform/linux-generic/odp_name_table.c
>> b/platform/linux-generic/odp_name_table.c
>> index 10a760e..610f034 100644
>> --- a/platform/linux-generic/odp_name_table.c
>> +++ b/platform/linux-generic/odp_name_table.c
>> @@ -48,140 +48,6 @@
>>
>>  #define SECONDARY_HASH_HISTO_PRINT  1
>>
>> - /* #define USE_AES */
>> -
>> -#if defined __x86_64__ || defined __i386__
>> -
>> -#ifdef USE_AES
>> -
>> -typedef long long int v2di __attribute__((vector_size(16)));
>> -
>> -static const v2di HASH_CONST1 = { 0x123456,  0xFEBCDA383   };
>> -static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
>> -
>> -#define PLATFORM_HASH_STATE v2di
>> -
>> -#define PLATFORM_HASH32_INIT(hash_state, name_len) \
>> -   ({ \
>> -   hash_state = HASH_CONST1;\
>> -   hash_state[0] ^= name_len; \
>> -   })
>> -
>> -#define PLATFORM_HASH32(hash_state, name_word)\
>> -   ({\
>> -   v2di data;\
>> -   \
>> -   data[0]= name_word;   \
>> -   data[1]= name_word << 1;   \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,
>> data); \
>> -   })
>> -
>> -#define PLATFORM_HASH32_FINISH(hash_state, kind) \
>> -   ({ \
>> -   uint64_t result; \
>> -   v2di data; \
>> -\
>> -   data[0]= name_kind;\
>> -   data[1]= name_kind << 7;   \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,
>> data); \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,
>>   \
>> -  HASH_CONST2); \
>> -   hash_state = __builtin_ia32_aesenc128(hash_state,
>>   \
>> -  HASH_CONST1); \
>> -   result = (uint64_t)hash_state[0] ^
>> hash_state[1];   \
>> -   result = result ^ result >> 32;  \
>> -   (uint32_t)result;\
>> -   })
>> -
>> -#else
>> -
>> -#define PLATFORM_HASH_STATE uint64_t
>> -
>> -#define PLATFORM_HASH32_INIT(hash_state, name_len)\
>> -   ({\
>> -   hash_state  = (uint64_t)name_len; \
>> -   hash_state |= hash_state << 8; \
>> -   hash_state |= hash_state << 16;  \
>> -   hash_state |= hash_state << 32;\
>> -   })
>> -
>> -#define PLATFORM_HASH32(hash_state, name_word) \
>> -   ({ \
>> -   uint64_t temp; \
>> -\
>> -   temp= ((uint64_t)name_word) * 0xFEFDFCF5;
>>   \
>> -   hash_state  = hash_state * 0xFF; \
>> -   hash_state ^= temp ^ (uint64_t)name_word;\
>> -   })
>> -
>> -#define PLATFORM_HASH32_FINISH(hash_state, kind) \
>> -   ({ \
>> -   hash_state ^= 

Re: [lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-03 Thread Bill Fischofer
Ping.  This patch needs a review as it fixes critical bug
https://bugs.linaro.org/show_bug.cgi?id=1930 that is breaking CI for
api-next.

Thanks.

On Wed, Dec 2, 2015 at 3:56 PM, Bill Fischofer 
wrote:

> Change the internal hash_name_and_kind() function to eliminate the use
> of architecture-specific hash instructions. This eliminates build issues
> surrounding ARM variants. Future optimizations will use the arch directory
> consistent with other ODP modules.
>
> Signed-off-by: Bill Fischofer 
> ---
>  platform/linux-generic/odp_name_table.c | 182
> +---
>  1 file changed, 1 insertion(+), 181 deletions(-)
>
> diff --git a/platform/linux-generic/odp_name_table.c
> b/platform/linux-generic/odp_name_table.c
> index 10a760e..610f034 100644
> --- a/platform/linux-generic/odp_name_table.c
> +++ b/platform/linux-generic/odp_name_table.c
> @@ -48,140 +48,6 @@
>
>  #define SECONDARY_HASH_HISTO_PRINT  1
>
> - /* #define USE_AES */
> -
> -#if defined __x86_64__ || defined __i386__
> -
> -#ifdef USE_AES
> -
> -typedef long long int v2di __attribute__((vector_size(16)));
> -
> -static const v2di HASH_CONST1 = { 0x123456, 0xFEBCDA383   };
> -static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
> -
> -#define PLATFORM_HASH_STATE v2di
> -
> -#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
> -   ({  \
> -   hash_state = HASH_CONST1;   \
> -   hash_state[0] ^= name_len;  \
> -   })
> -
> -#define PLATFORM_HASH32(hash_state, name_word) \
> -   ({ \
> -   v2di data; \
> -  \
> -   data[0]= name_word;\
> -   data[1]= name_word << 1;\
> -   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
> -   })
> -
> -#define PLATFORM_HASH32_FINISH(hash_state, kind)\
> -   ({  \
> -   uint64_t result;\
> -   v2di data;  \
> -   \
> -   data[0]= name_kind; \
> -   data[1]= name_kind << 7;\
> -   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
> -   hash_state = __builtin_ia32_aesenc128(hash_state,   \
> - HASH_CONST2); \
> -   hash_state = __builtin_ia32_aesenc128(hash_state,   \
> - HASH_CONST1); \
> -   result = (uint64_t)hash_state[0] ^ hash_state[1];   \
> -   result = result ^ result >> 32; \
> -   (uint32_t)result;   \
> -   })
> -
> -#else
> -
> -#define PLATFORM_HASH_STATE uint64_t
> -
> -#define PLATFORM_HASH32_INIT(hash_state, name_len)\
> -   ({\
> -   hash_state  = (uint64_t)name_len; \
> -   hash_state |= hash_state << 8;\
> -   hash_state |= hash_state << 16;   \
> -   hash_state |= hash_state << 32;   \
> -   })
> -
> -#define PLATFORM_HASH32(hash_state, name_word)  \
> -   ({  \
> -   uint64_t temp;  \
> -   \
> -   temp= ((uint64_t)name_word) * 0xFEFDFCF5;   \
> -   hash_state  = hash_state * 0xFF;\
> -   hash_state ^= temp ^ (uint64_t)name_word;   \
> -   })
> -
> -#define PLATFORM_HASH32_FINISH(hash_state, kind)\
> -   ({  \
> -   hash_state ^= (((uint32_t)kind) << 13); \
> -   hash_state  = hash_state * 0xFEFDFCF5;  \
> -   hash_state  = hash_state ^ hash_state >> 32;\
> -   hash_state  = hash_state % 0xFEEDDCCBBAA1;  \
> -   hash_state  = hash_state ^ hash_state >> 32;\
> -   (uint32_t)hash_state;   \
> -   })
> -
> -#endif
> -
> -#elif defined(__tile_gx__)
> -
> -#define PLATFORM_HASH_STATE  uint32_t
> -
> -#define PLATFORM_HASH32_INIT(hash_state, name_len)  \

[lng-odp] [API-NEXT PATCH] linux-generic: tm: use odp_hash_crc32c() api to avoid arch issues

2015-12-02 Thread Bill Fischofer
Change the internal hash_name_and_kind() function to eliminate the use
of architecture-specific hash instructions. This eliminates build issues
surrounding ARM variants. Future optimizations will use the arch directory
consistent with other ODP modules.

Signed-off-by: Bill Fischofer 
---
 platform/linux-generic/odp_name_table.c | 182 +---
 1 file changed, 1 insertion(+), 181 deletions(-)

diff --git a/platform/linux-generic/odp_name_table.c 
b/platform/linux-generic/odp_name_table.c
index 10a760e..610f034 100644
--- a/platform/linux-generic/odp_name_table.c
+++ b/platform/linux-generic/odp_name_table.c
@@ -48,140 +48,6 @@
 
 #define SECONDARY_HASH_HISTO_PRINT  1
 
- /* #define USE_AES */
-
-#if defined __x86_64__ || defined __i386__
-
-#ifdef USE_AES
-
-typedef long long int v2di __attribute__((vector_size(16)));
-
-static const v2di HASH_CONST1 = { 0x123456, 0xFEBCDA383   };
-static const v2di HASH_CONST2 = { 0x493BA3F689, 0x102F5D73A8C };
-
-#define PLATFORM_HASH_STATE v2di
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
-   ({  \
-   hash_state = HASH_CONST1;   \
-   hash_state[0] ^= name_len;  \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word) \
-   ({ \
-   v2di data; \
-  \
-   data[0]= name_word;\
-   data[1]= name_word << 1;\
-   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind)\
-   ({  \
-   uint64_t result;\
-   v2di data;  \
-   \
-   data[0]= name_kind; \
-   data[1]= name_kind << 7;\
-   hash_state = __builtin_ia32_aesenc128(hash_state, data); \
-   hash_state = __builtin_ia32_aesenc128(hash_state,   \
- HASH_CONST2); \
-   hash_state = __builtin_ia32_aesenc128(hash_state,   \
- HASH_CONST1); \
-   result = (uint64_t)hash_state[0] ^ hash_state[1];   \
-   result = result ^ result >> 32; \
-   (uint32_t)result;   \
-   })
-
-#else
-
-#define PLATFORM_HASH_STATE uint64_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)\
-   ({\
-   hash_state  = (uint64_t)name_len; \
-   hash_state |= hash_state << 8;\
-   hash_state |= hash_state << 16;   \
-   hash_state |= hash_state << 32;   \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word)  \
-   ({  \
-   uint64_t temp;  \
-   \
-   temp= ((uint64_t)name_word) * 0xFEFDFCF5;   \
-   hash_state  = hash_state * 0xFF;\
-   hash_state ^= temp ^ (uint64_t)name_word;   \
-   })
-
-#define PLATFORM_HASH32_FINISH(hash_state, kind)\
-   ({  \
-   hash_state ^= (((uint32_t)kind) << 13); \
-   hash_state  = hash_state * 0xFEFDFCF5;  \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   hash_state  = hash_state % 0xFEEDDCCBBAA1;  \
-   hash_state  = hash_state ^ hash_state >> 32;\
-   (uint32_t)hash_state;   \
-   })
-
-#endif
-
-#elif defined(__tile_gx__)
-
-#define PLATFORM_HASH_STATE  uint32_t
-
-#define PLATFORM_HASH32_INIT(hash_state, name_len)  \
-   ({  \
-   hash_state = 0xFEFDFCF5;   \
-   hash_state = __insn_crc_32_32(hash_state, name_len);   \
-   })
-
-#define PLATFORM_HASH32(hash_state, name_word)  \
-   ({ \
-   hash_state = __insn_crc_32_32(hash_state,