This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

x86-64 merger part 2 - type sizes


Hi

This patch defines the basic type sizes for x86_64 port.

Thu Mar  8 20:19:52 CET 2001  Jan Hubicka  <jh@suse.cz>
	* i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to 128bit for x86_64
	(BOOL_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, WCHAR_TYPE_SIZE,
	 MAX_WCHAR_TYPE_SIZE, FLOAT_TYPE_SIZE, LONG_TYPE_SIZE, MAX_LONG_TYPE_SIZE,
	 DOUBLE_TYPE_SIZE, LONG_LONG_TYPE_SIZE): New constants.
	(BITS_PER_WORD, UNITS_PER_WORD, POINTER_SIZE, PARM_BOUNDARY,
	 STACK_BOUNDARY): Set properly for 64bits.
	(MAX_BITS_PER_WORD, MIN_UNITS_PER_WORD): New constants.
	(EMPTY_FIELD_BOUNDARY): Define using BITS_PER_WORD.
	(BIGGEST_FIELD_ALIGNMENT): Set to 128 for 64bits.
	(MOVE_MAX): Set to 16.
	(MOVE_MAX_PIECES): 8 for 64bit.
	(Pmode): Set to SImode.
	
*** i386.h	Sat Mar  3 19:32:20 2001
--- /home/hubicka/x86-64/gcc/gcc/config/i386/i386.h	Thu Mar  8 12:01:37 2001
*************** extern int ix86_arch;
*** 497,507 ****
--- 555,581 ----
   */
  #define LONG_DOUBLE_TYPE_SIZE (TARGET_128BIT_LONG_DOUBLE ? 128 : 96)
  #define MAX_LONG_DOUBLE_TYPE_SIZE 128
+ #ifdef __x86_64__
+ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128
+ #else
+ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 96
+ #endif
  /* Tell real.c that this is the 80-bit Intel extended float format
     packaged in a 128-bit or 96bit entity.  */
  #define INTEL_EXTENDED_IEEE_FORMAT
  
  
+ #define BOOL_TYPE_SIZE 8
+ #define SHORT_TYPE_SIZE 16
+ #define INT_TYPE_SIZE 32
+ #define WCHAR_TYPE_SIZE 32
+ #define MAX_WCHAR_TYPE_SIZE 32
+ #define FLOAT_TYPE_SIZE 32
+ #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)
+ #define MAX_LONG_TYPE_SIZE 64
+ #define DOUBLE_TYPE_SIZE 64
+ #define LONG_LONG_TYPE_SIZE 64
+ 
  /* Define if you don't want extended real, but do want to use the
     software floating point emulator for REAL_ARITHMETIC and
     decimal <-> binary conversion. */
*************** extern int ix86_arch;
*** 528,547 ****
     Note that this is not necessarily the width of data type `int';
     if using 16-bit ints on a 80386, this would still be 32.
     But on a machine with 16-bit registers, this would be 16.  */
! #define BITS_PER_WORD 32
  
  /* Width of a word, in units (bytes).  */
! #define UNITS_PER_WORD 4
  
  /* Width in bits of a pointer.
     See also the macro `Pmode' defined below.  */
! #define POINTER_SIZE 32
  
  /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
! #define PARM_BOUNDARY 32
  
  /* Boundary (in *bits*) on which stack pointer should be aligned.  */
! #define STACK_BOUNDARY 32
  
  /* Boundary (in *bits*) on which the stack pointer preferrs to be
     aligned; the compiler cannot rely on having this alignment.  */
--- 602,623 ----
     Note that this is not necessarily the width of data type `int';
     if using 16-bit ints on a 80386, this would still be 32.
     But on a machine with 16-bit registers, this would be 16.  */
! #define BITS_PER_WORD (TARGET_64BIT ? 64 : 32)
! #define MAX_BITS_PER_WORD 64
  
  /* Width of a word, in units (bytes).  */
! #define UNITS_PER_WORD (TARGET_64BIT ? 8 : 4)
! #define MIN_UNITS_PER_WORD 4
  
  /* Width in bits of a pointer.
     See also the macro `Pmode' defined below.  */
! #define POINTER_SIZE (TARGET_64BIT ? 64 : 32)
  
  /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
! #define PARM_BOUNDARY (TARGET_64BIT ? 64 : 32)
  
  /* Boundary (in *bits*) on which stack pointer should be aligned.  */
! #define STACK_BOUNDARY (TARGET_64BIT ? 64 : 32)
  
  /* Boundary (in *bits*) on which the stack pointer preferrs to be
     aligned; the compiler cannot rely on having this alignment.  */
*************** extern int ix86_arch;
*** 553,559 ****
  
  /* Alignment of field after `int : 0' in a structure. */
  
! #define EMPTY_FIELD_BOUNDARY 32
  
  /* Minimum size in bits of the largest boundary to which any
     and all fundamental data types supported by the hardware
--- 629,635 ----
  
  /* Alignment of field after `int : 0' in a structure. */
  
! #define EMPTY_FIELD_BOUNDARY BITS_PER_WORD
  
  /* Minimum size in bits of the largest boundary to which any
     and all fundamental data types supported by the hardware
*************** extern int ix86_arch;
*** 576,582 ****
  /* BIGGEST_FIELD_ALIGNMENT is also used in libobjc, where it must be
     constant.  Use the smaller value in that context.  */
  #ifndef IN_TARGET_LIBS
! #define BIGGEST_FIELD_ALIGNMENT (TARGET_ALIGN_DOUBLE ? 64 : 32)
  #else
  #define BIGGEST_FIELD_ALIGNMENT 32
  #endif
--- 652,658 ----
  /* BIGGEST_FIELD_ALIGNMENT is also used in libobjc, where it must be
     constant.  Use the smaller value in that context.  */
  #ifndef IN_TARGET_LIBS
! #define BIGGEST_FIELD_ALIGNMENT (TARGET_64BIT ? 128 : (TARGET_ALIGN_DOUBLE ? 64 : 32))
  #else
  #define BIGGEST_FIELD_ALIGNMENT 32
  #endif
*************** while (0)
*** 2113,2119 ****
  
  /* Max number of bytes we can move from memory to memory
     in one reasonably fast instruction.  */
! #define MOVE_MAX 4
  
  /* If a memory-to-memory move would take MOVE_RATIO or more simple
     move-instruction pairs, we will do a movstr or libcall instead.
--- 2314,2325 ----
  
  /* Max number of bytes we can move from memory to memory
     in one reasonably fast instruction.  */
! #define MOVE_MAX 16
! 
! /* MOVE_MAX_PIECES is the number of bytes at a time which we can
!    move efficiently, as opposed to  MOVE_MAX which is the maximum
!    number of bytes we can move with a single instruction. */
! #define MOVE_MAX_PIECES (TARGET_64BIT ? 8 : 4)
  
  /* If a memory-to-memory move would take MOVE_RATIO or more simple
     move-instruction pairs, we will do a movstr or libcall instead.
*************** while (0)
*** 2161,2167 ****
  /* Specify the machine mode that pointers have.
     After generation of rtl, the compiler makes no further distinction
     between pointers and any other objects of this machine mode.  */
! #define Pmode SImode
  
  /* A function address in a call instruction
     is a byte address (for indexing purposes)
--- 2367,2373 ----
  /* Specify the machine mode that pointers have.
     After generation of rtl, the compiler makes no further distinction
     between pointers and any other objects of this machine mode.  */
! #define Pmode (TARGET_64BIT ? DImode : SImode)
  
  /* A function address in a call instruction
     is a byte address (for indexing purposes)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]