Re: need help in 64-bit code

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

 



Hi Thomas,

Thomas Petazzoni wrote:
Hi,

Le Fri, 05 May 2006 18:02:48 +0530,
sudheer <urwithsudheer@xxxxxxxxx> a écrit :

  
To have  the compatability i have used  the macro CONFIG_X86_64 in 
.config  .
    

Why do you need to differentiate code executed on 32 bits platforms
from code executed on 64 bits platform ? Generally speaking, your code
should be portable, and not rely on CONFIG_X86_64 or other options of
the same kind.

  
I want to assign some data to a long pointer variable SysAdddr.

#ifdef CONFIG_64
*(SysAddr + num_items) = (0xaa55aa55aa000000 + num_items);
#else
*(SysAddr + num_items) = (0x11220000 + (num_items));
#endif
If it is 64 but system i should assign 64 bit or else 32 bit data.
Can i have any other option/method ?

Thanks
Sudheer



[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