public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFD: constraint letter suffixes
@ 2002-09-12  7:01 Joern Rennecke
  2002-12-23  9:46 ` Joern Rennecke
  0 siblings, 1 reply; 9+ messages in thread
From: Joern Rennecke @ 2002-09-12  7:01 UTC (permalink / raw)
  To: gcc

Constraint letters are often in short supply, be it for register
classes, integer constants or extra constraints.
We can overcome these limitations by allowing suffixes to distinguish
different variants.  IMHO the most obvious suffix would be to append
a single digit.   This will work if matching constraints are generally
named first in any list of constraints with equal visibility within an
alternative.  Of course, every time we make a new arbitrary limit, we
run the risk of exceeding that limit in the future.  So if we are
putting a mechanism in place to handle constraint letter suffixes,
we might as well allow multi-letter/digit suffixes.

So I propose the following new target macros:

CONSTRAINT_LETTER_SUFFIX_LEN(C)
 For constraint letter C, give the length of the suffix.  defaults.h
 provides a default definition as 0 for all letters.
 This macro is used when iterating over a constraint list to correctly
 advance to the next constraint.  Note that the default definition will
 provide backwards compatibility with ports that put matching constraint
 digits immediately after constraint letters.

CONST_OK_FOR_LETTER_AND_SUFFIX_P(VALUE, C, STR)
 For constraint letter C and the suffix at the start of STR (STR is the
 rest of the constraints string after C), return 1 if VALUE is in the
 appropriate range, 0 otherwise.  If CONST_OK_DOR_LETTER_P is defined,
 defaults.h provides a default definition based on the latter macro.
 
Likewise for:
REG_CLASS_FROM_LETTER_AND_SUFFIX(C, STR)
EXTRA_CONSTRAINT_WITH_SUFFIX(VALUE, C, STR)

-- 
--------------------------
SuperH (UK) Ltd.
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: RFD: constraint letter suffixes
@ 2002-12-24 10:47 Ulrich Weigand
  2003-01-06 14:21 ` Joern Rennecke
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Ulrich Weigand @ 2002-12-24 10:47 UTC (permalink / raw)
  To: joern.rennecke; +Cc: gcc

Joern Rennecke wrote:

>EXTRA_MEMORY_CONSTRAINT is defined only by one port, and
>EXTRA_ADDRESS_CONSTRAINT by none, so I suppose adding another
>parameter to these macros isn't too much of a switch burden.

I have a patch that will introduce EXTRA_ADDRESS_CONSTRAINT
to the s390 port as well; I had been holding this until the
3.4 development was opened.

In any case, I don't mind another parameter there, in particular
if I get more constraint letters from it ;-)

Will it be possible to have more different integer constant
constraints with your patch?  This would be helpful for s390 ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-01-13 21:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-12  7:01 RFD: constraint letter suffixes Joern Rennecke
2002-12-23  9:46 ` Joern Rennecke
2002-12-24 10:08   ` Joern Rennecke
2002-12-24 10:47 Ulrich Weigand
2003-01-06 14:21 ` Joern Rennecke
2003-01-06 17:50 ` Joern Rennecke
2003-01-13 21:28   ` Ulrich Weigand
2003-01-14  0:28     ` Joern Rennecke
2003-01-07 21:54 ` Joern Rennecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).