How to identity processor architecture

dharmvir kumar dvm9999 at gmail.com
Thu Jan 27 02:15:47 EST 2011


 64-bit processors  have lm ("long mode") in the flags section of
cpuinfowhereas   32-bit processors have not.
regards
Dharmvir Kumar


On Thu, Jan 27, 2011 at 12:24 PM, Enrico Granata <egranata at ucsd.edu> wrote:

> On Jan 26, 2011, at 10:45 PM, Mulyadi Santosa wrote:
>
> On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum at msys-tech.com> wrote:
>
> No, because 32bit code will tell the datatype size and i think pointer
>
> variable depends on architecture.
>
> So 64 bit processor needs 64 address line to point the data location. So
>
> pointer variable needs to be 8 byte.
>
>
> Please don't top post and please use the new list address, ok? :)
>
> IMO, I second your opinion. And as addition, I think it's worth to
> check /proc/cpuinfo too  in "address sizes" field
>
> NB: I was thinking, if in x64, it is operating in full 32 bit mode
> (not hybrid one), it is supposed to yield 32 bit address too, right?
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
> I guess a 64bit processor does need 64bit addresses to reference memory.
> But at the same time, if 32 bit programs are to run unmodified on 64 bit
> architectures there needs to be ways in which 32bit pointers can still work.
> So, I am almost 100% sure that compiling 32bit code, even on a 64bit
> processor, should yield 4 for sizeof(void*)
>
> *Enrico Granata*
> *Computer Science & Engineering Department (EBU3B) - **Room 3240*
> *office phone 858 534 9914*
> *University of California, San Diego*
> *
> *
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110127/e349ee2a/attachment-0001.html 


More information about the Kernelnewbies mailing list