Re: [PATCH 3/3] app/test: enable test_red to build on non x86 platform
From: Jerin Jacob <hidden>
Date: 2015-08-27 04:09:02
From: Jerin Jacob <hidden>
Date: 2015-08-27 04:09:02
On Tue, Aug 25, 2015 at 02:03:13PM +0200, Thomas Monjalon wrote:
2015-08-18 18:10, Jerin Jacob:quoted
--- a/app/test/test_red.c +++ b/app/test/test_red.c +#if defined(RTE_ARCH_X86_64) || defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_X32) #ifdef __PIC__ asm volatile ( "mov %%ebx, %%edi\n"@@ -155,6 +156,7 @@ static inline void rdtsc_prof_start(struct rdtsc_prof *p) #else asm( "cpuid" : : : "%eax", "%ebx", "%ecx", "%edx" ); #endif +#endif p->clk_start = rte_rdtsc();The right fix would be to move that arch-specific code into an EAL abstraction.
I agree. I thought the same. But I am not able to understand why 'cpuid' instruction used here without any input/output parameters. What is the role of 'cpuid' instruction in this specific function and what to abstract in eal ?