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

Support for 32bit pointers in long mode



Hi,

a few people have played with the idea of generating binaries with
32 bit pointers for x86_64 long mode. The goal would be to reap the
benefits of the additional and larger registers in long mode without
the cost of doubling pointer size. A proof-of-concept patch for
binutils/gcc can be found here:

http://gcc.gnu.org/ml/gcc/2007-11/msg00633.html

The same thing was done on Alpha with ofs1 binaries, which linux
supports so there is some kernel supports already in linux to handle
this. But not for x86_64.

On alpha we have: (processor.h)
#define STACK_TOP \
  (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)


On x86 we have: (processor.h)

#define TASK_SIZE64	((1UL << 47) - PAGE_SIZE)
#define IA32_PAGE_OFFSET	((current->personality & ADDR_LIMIT_3GB) ? \
					0xc0000000 : 0xFFFFe000)

#define TASK_SIZE		(test_thread_flag(TIF_IA32) ? \
					IA32_PAGE_OFFSET : TASK_SIZE64)
#define TASK_SIZE_OF(child)	((test_tsk_thread_flag(child, TIF_IA32)) ? \
					IA32_PAGE_OFFSET : TASK_SIZE64)

#define STACK_TOP		TASK_SIZE



Could that be changed to

#define TASK_SIZE	    ((test_thread_flag(TIF_IA32) \
                             | (current->personality & ADDR_LIMIT_32BIT)) ? \
					IA32_PAGE_OFFSET : TASK_SIZE64)
#define TASK_SIZE_OF(child) (((test_tsk_thread_flag(child, TIF_IA32)) \
                             | (child->personality & ADDR_LIMIT_32BIT)) ? \
					IA32_PAGE_OFFSET : TASK_SIZE64)

MfG
        Goswin
--
To unsubscribe from this list: send the line "unsubscribe linux-x86_64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Linux ia64]     [Linux Kernel]     [DCCP]     [Linux ARM]     [Linux]     [Photo]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

Add to Google Powered by Linux