PATCH: mips16 function attributes, version N+1

Richard Sandiford richard@codesourcery.com
Sat Sep 1 09:18:00 GMT 2007


Sandra Loosemore <sandra@codesourcery.com> writes:
> + /* Similar predicates for "mips16"/"nomips16" attributes.  */
> + 
> + static bool
> + mips_mips16_type_p (tree type)
> + {
> +   return lookup_attribute ("mips16", TYPE_ATTRIBUTES (type)) != NULL;
> + }
> + 
> + static bool
> + mips_nomips16_type_p (tree type)
> + {
> +   return lookup_attribute ("nomips16", TYPE_ATTRIBUTES (type)) != NULL;
> + }

In the post-constification era, these functions need to take a const_tree
argument rather than a tree argument.

> +   if (TARGET_MIPS16)
> +     {
> +       error ("built-in function `%s' not supported for MIPS16",
> + 	     IDENTIFIER_POINTER (DECL_NAME (fndecl)));
> +       return const0_rtx;

`%s' -> %qs

> ***************
> *** 0 ****
> --- 1,82 ----
> + /* Verify that mips16 and nomips16 attributes work, checking all combinations
> +    of calling a nomips16/mips16/default function from a nomips16/mips16/default
> +    function.  */
> + /* { dg-do run } */

Best restrict this to mipsisa*-elf* targets:

/* { dg-do run { target mipsisa*-elf* } } */

OK with those changes, thanks.  No need for a full retest; just check
that the error message is still sensible and that the testcase still runs.

And thanks again for all the work you've done on this, and for your
patience.

Richard



More information about the Gcc-patches mailing list