Re: How to identity processor architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 26, 2011, at 10:45 PM, Mulyadi Santosa wrote:

On Thu, Jan 27, 2011 at 13:40, prabhu <prabhum@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux