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]
Other format: [Raw text]

Fix structure returns on the Blackfin


This simplifies and cleans up bfin_return_in_memory a bit, after verifying what our Visual DSP compiler does for structure returns.


Bernd
	* config/bfin/bfin.c (bfin_return_in_memory): Simplify; return
	everything larger than 8 bytes in memory.

Index: config/bfin/bfin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/bfin/bfin.c,v
retrieving revision 1.10
diff -c -p -r1.10 bfin.c
*** config/bfin/bfin.c	26 May 2005 18:14:54 -0000	1.10
--- config/bfin/bfin.c	8 Jun 2005 08:42:54 -0000
*************** bfin_return_in_memory (tree type)
*** 1270,1287 ****
    if (mode == BLKmode)
      return 1;
    size = int_size_in_bytes (type);	
-   if (VECTOR_MODE_P (mode) || mode == TImode)
-     {
-       /* User-created vectors small enough to fit in REG.  */
-       if (size < 8)
-         return 0;
-       if (size == 8 || size == 16)
- 	return 1;
-     }
  
!   if (size > 12)
!     return 1;
!   return 0;
  }
  
  /* Register in which address to store a structure value
--- 1270,1277 ----
    if (mode == BLKmode)
      return 1;
    size = int_size_in_bytes (type);	
  
!   return size > 8;
  }
  
  /* Register in which address to store a structure value

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