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]

Re: [PATCH] erroneous use of int_size_in_bytes by m32r RETURN_IN_MEMORY


Hello

I found the same programs of how to use int_size_in_bytes() at other parts.
Please add following patched too.

Regards
Kazuhiro

diff -cp m32r.c.org m32r.c
*** m32r.c.org Thu Jun 12 17:20:35 2003
--- m32r.c Thu Jun 12 17:35:34 2003
*************** m32r_va_arg (valist, type)
*** 1425,1431 ****
    size = int_size_in_bytes (type);
    rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
  
!   if (size > 8)
      {
        tree type_ptr, type_ptr_ptr;
  
--- 1425,1431 ----
    size = int_size_in_bytes (type);
    rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
  
!   if (m32r_return_in_memory(type))
      {
        tree type_ptr, type_ptr_ptr;
  
diff -cp m32r.h.org m32r.h
*** m32r.h.org Thu Jun 12 17:26:15 2003
--- m32r.h Thu Jun 12 17:36:18 2003
*************** M32R_STACK_ALIGN (current_function_outgo
*** 1134,1140 ****
     appropriate for passing a pointer to that type.  */
  /* All arguments greater than 8 bytes are passed this way.  */
  #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
!   ((TYPE) && int_size_in_bytes (TYPE) > 8)
  
  /* Update the data in CUM to advance over an argument
     of mode MODE and data type TYPE.
--- 1134,1140 ----
     appropriate for passing a pointer to that type.  */
  /* All arguments greater than 8 bytes are passed this way.  */
  #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
!   ((TYPE) && m32r_return_in_memory (TYPE))
  
  /* Update the data in CUM to advance over an argument
     of mode MODE and data type TYPE.


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