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]

[PING] Modify semantics of the 'm' constraint for inline assemblies


Hello,

the mail thread starting here describes why it is crucial to loosen the
coupling between the 'm' constraint and GO_IF_LEGITIMATE_ADDRESS for
inline assemblies:

http://gcc.gnu.org/ml/gcc-patches/2007-10/msg01407.html

In that email I also proposed a target hook which allows the back end
to rewrite inline assembly constraints.  Besides this I currently see
two alternative solutions:

1. [PATCH] Enable back ends to override standard constraint definitions
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00319.html

2. A target macro suggested by Richard Sandiford which allows to
redefine the constraint letter to be used for general memory
addresses.
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00144.html


In the long term I think 1. is what we want to have.  The patch can be
enhanced further.  Future versions should get rid of the whole
constraint switch statement in the reload/recog loops and should
provide hooks implementing the default behaviour of all constraint
letters.  The back end then can easily be enabled to fall back to the
default behaviour depending e.g. on architecture flags by just calling
the default implementations and provide its own implementations
otherwise.  For GCC 4.3 2. looks sufficiently simple to me.  Any
opinions about that?

Bye,

-Andreas-


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