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]

PATCH: MIPS -mgp32


This patch passes the "-mgp32" / "-mgp64" arg to gas, which needs this
information to generate correct code for these options.  It also uses
correct versions of SIZE_TYPE and PTRDIFF_TYPE in -mgp32 mode.

The appropriate patches to binutils are already approved and checked
in.

Approved by Gavin, checked in.

Andrew.

2000-02-22  Andrew Haley  <aph@cygnus.com>

	* config/mips/mips.h (GAS_ASM_SPEC): Pass -mgp32/-mgp64 to gas.
	(SIZE_TYPE): Is 32 bits when using -mgp32.
	(PTRDIFF_TYPE): Ditto.

Index: mips.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/mips.h,v
retrieving revision 1.88
diff -c -r1.88 mips.h
*** mips.h	2000/02/21 20:48:23	1.88
--- mips.h	2000/02/23 14:29:10
***************
*** 773,779 ****
  /* GAS_ASM_SPEC is passed when using gas, rather than the MIPS
     assembler.  */
  
! #define GAS_ASM_SPEC "%{mcpu=*} %{m4650} %{mmad:-m4650} %{m3900} %{v}"
  
  /* TARGET_ASM_SPEC is used to select either MIPS_AS_ASM_SPEC or
     GAS_ASM_SPEC as the default, depending upon the value of
--- 773,779 ----
  /* GAS_ASM_SPEC is passed when using gas, rather than the MIPS
     assembler.  */
  
! #define GAS_ASM_SPEC "%{mcpu=*} %{m4650} %{mmad:-m4650} %{m3900} %{v} %{mgp32} %{mgp64}"
  
  /* TARGET_ASM_SPEC is used to select either MIPS_AS_ASM_SPEC or
     GAS_ASM_SPEC as the default, depending upon the value of
***************
*** 4659,4670 ****
  
  #ifndef SIZE_TYPE
  #define NO_BUILTIN_SIZE_TYPE
! #define SIZE_TYPE (Pmode == DImode ? "long unsigned int" : "unsigned int")
  #endif
  
  #ifndef PTRDIFF_TYPE
  #define NO_BUILTIN_PTRDIFF_TYPE
! #define PTRDIFF_TYPE (Pmode == DImode ? "long int" : "int")
  #endif
  
  /* See mips_expand_prologue's use of loadgp for when this should be
--- 4659,4672 ----
  
  #ifndef SIZE_TYPE
  #define NO_BUILTIN_SIZE_TYPE
! #define SIZE_TYPE (Pmode == DImode || !TARGET_64BIT		\
! 		   ? "long unsigned int" : "unsigned int")
  #endif
  
  #ifndef PTRDIFF_TYPE
  #define NO_BUILTIN_PTRDIFF_TYPE
! #define PTRDIFF_TYPE (Pmode == DImode || !TARGET_64BIT 	\
!  		      ? "long int" : "int")
  #endif
  
  /* See mips_expand_prologue's use of loadgp for when this should be

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