This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Target macro to redefine 'm' constraint letter
- From: Richard Sandiford <rsandifo at nildram dot co dot uk>
- To: "Andreas Krebbel" <Andreas dot Krebbel at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Mar 2008 13:31:01 +0000
- Subject: Re: [PATCH] Target macro to redefine 'm' constraint letter
- References: <20080320160940.GA13997@homer.boeblingen.de.ibm.com>
"Andreas Krebbel" <Andreas.Krebbel@de.ibm.com> writes:
> as discussed in the mail-thread starting with:
> http://gcc.gnu.org/ml/gcc-patches/2007-10/msg01407.html
> it might be necessary to override the meaning of the 'm' constraint
> when adding new address formats to the GO_IF_LEGITIMATE_ADDRESS_P
> hook.
>
> The attached patch implements the suggestion from Richard Sandiford.
> A new target macro called TARGET_MEM_CONSTRAINT is introduced which
> allows to change the constraint letter used for the addresses matched
> by the legitimate address hook. That way it is possible to extend the
> set of accepted addresses in the hook without changing the semantics of
> the 'm' constraint what would be fatal for inline assemblies using
> that constraint.
>
> Another solution might be to provide a more general mechanism letting
> back ends override all standard constraints. The middle-end would
> just provide default implementations which might be replaced in a back
> end by using the standard constraint definition mechanism:
> http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00319.html
>
> Since I never got a response to that I've decided to go with Richards
> suggestion in order to have at least one supporter ;)
;)
And yeah, the patch certainly looks good to me FWIW. Hope it
gets approved.
Richard