Interestingly, in 64-bit mode the default size of operands on IA is still 
32-bit. Instructions often need to have the REX prefix on them to actually use 
64-bit data. The REX prefix is explained in section 2.2.1 of the "Intel? 64 and 
IA-32 Architectures Software Developer?s Manual", Volume 2

Regards,
/Bruce

-----Original Message-----
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jay Rolette
Sent: Monday, December 15, 2014 2:29 PM
To: Wodkowski, PawelX
Cc: Dev
Subject: Re: [dpdk-dev] [PATCH] replaced O(n^2) sort in sort_by_physaddr() with 
qsort() from standard library

FWIW, it surprised the heck out of me as well.

Turns out that even though I'm compiling in 64-bit mode, gcc has
sizeof(int) as 4 bytes rather than 8. Not really sure what the scoop is on 
that, but the standard leaves that up to the compiler. I'm used to int always 
being the "natural size" on the CPU/OS, so for a 64-bit executable on Intel, I 
assumed int would be 64-bit.

Being an embedded developer for so many years, I rarely use semi-defined data 
types just to avoid these sorts of problems.

On Mon, Dec 15, 2014 at 7:20 AM, Wodkowski, PawelX < pawelx.wodkowski at 
intel.com> wrote:
>
> > Because it doesn't work correctly :-)
>
> It should, what I am missing here? :P
>
> Pawel
>
>

Reply via email to