From ccfc6cc8fa5ab66c0e2dede177aa5b1010523ffc Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Wed, 14 Aug 2002 10:04:51 +0000 Subject: reload.c (find_reloads): Handle constraint letters marked by EXTRA_ADDRESS_CONSTRAINT and... * reload.c (find_reloads): Handle constraint letters marked by EXTRA_ADDRESS_CONSTRAINT and EXTRA_MEMORY_CONSTRAINT. (alternative_allows_memconst): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. * recog.c (asm_operand_ok, preprocess_constraints, constrain_operands): Likewise. * regclass.c (record_operand_costs, record_reg_classes): Likewise. * local-alloc.c (block_alloc, requires_inout): Likewise. * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * defaults.h (EXTRA_MEMORY_CONSTRAINT): Provide a default. (EXTRA_ADDRESS_CONSTRAINT): Likewise. * doc/tm.texi: Document these two new target macros. * config/s390/s390.c (s390_expand_plus_operand): Accept already valid operands. (q_constraint): New function. config/s390/s390-protos.h (q_constraint): Declare it. config/s390/s390.h (EXTRA_CONSTRAINT): Use it. (EXTRA_MEMORY_CONSTRAINT): New macro. * config/s390/s390.md: Throughout the machine description, replace all instances of the constraint combinations 'Qo' or 'oQ' with simply 'Q'. From-SVN: r56291 --- gcc/doc/tm.texi | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gcc/doc') diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index d13b53e..064120d 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -2614,6 +2614,44 @@ letter @samp{Q} is defined as representing a memory address that does a @samp{Q} constraint on the input and @samp{r} on the output. The next alternative specifies @samp{m} on the input and a register class that does not include r0 on the output. + +@findex EXTRA_MEMORY_CONSTRAINT +@item EXTRA_MEMORY_CONSTRAINT (@var{c}) +A C expression that defines the optional machine-dependent constraint +letters, amongst those accepted by @code{EXTRA_CONSTRAINT}, that should +be treated like memory constraints by the reload pass. + +It should return 1 if the operand type represented by the constraint +letter @var{c} comprises a subset of all memory references including +all those whose address is simply a base register. This allows the reload +pass to reload an operand, if it does not directly correspond to the operand +type of @var{c}, by copying its address into a base register. + +For example, on the S/390, some instructions do not accept arbitrary +memory references, but only those that do not make use of an index +register. The constraint letter @samp{Q} is defined via +@code{EXTRA_CONSTRAINT} as representing a memory address of this type. +If the letter @samp{Q} is marked as @code{EXTRA_MEMORY_CONSTRAINT}, +a @samp{Q} constraint can handle any memory operand, because the +reload pass knows it can be reloaded by copying the memory address +into a base register if required. This is analogous to the way +a @samp{o} constraint can handle any memory operand. + +@findex EXTRA_ADDRESS_CONSTRAINT +@item EXTRA_ADDRESS_CONSTRAINT (@var{c}) +A C expression that defines the optional machine-dependent constraint +letters, amongst those accepted by @code{EXTRA_CONSTRAINT}, that should +be treated like address constraints by the reload pass. + +It should return 1 if the operand type represented by the constraint +letter @var{c} comprises a subset of all memory addresses including +all those that consist of just a base register. This allows the reload +pass to reload an operand, if it does not directly correspond to the operand +type of @var{c}, by copying it into a base register. + +Any constraint marked as @code{EXTRA_ADDRESS_CONSTRAINT} can only +be used with the @code{address_operand} predicate. It is treated +analogously to the @samp{p} constraint. @end table @node Stack and Calling -- cgit v1.1