This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi 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 3/8] sparc: Rewrite everything


From: Richard Henderson <rth@twiddle.net>
Date: Tue, 28 Oct 2014 12:45:50 -0700

> +    case FFI_TYPE_STRUCT:
> +      if (rtype->size > 32)
> +	{
> +	  flags = SPARC_RET_VOID | SPARC_FLAG_RET_IN_MEM;
> +	  bytes = 8;
> +	}
> +      else
> +	flags = SPARC_RET_STRUCT;
> +      break;

Here you use a cutoff of 32 bytes.

> +	case FFI_TYPE_LONGDOUBLE:
> +	case FFI_TYPE_STRUCT:
> +	  z = ty->size;
> +	  if (z > 16)
> +	    {
> +	      /* For structures larger than 16 bytes we pass reference.  */
> +	      *argp++ = (unsigned long)a;
> +	      break;
> +	    }
> +	  if (((unsigned long)argp & 15) && ty->alignment > 8)
> +	    argp++;
> +	  memcpy(argp, a, z);
> +	  argp += ALIGN(z, 8) / 8;
> +	  break;

Yet here in args prep, the cutoff is 16.

Maybe I'm missing something?


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