diff options
author | J"orn Rennecke <joern.rennecke@superh.com> | 2003-01-09 17:28:49 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2003-01-09 17:28:49 +0000 |
commit | 97488870283d923cea932db7763346087cbd9452 (patch) | |
tree | 71e3146782ec281fdcd5e689d1f1cbbe5f3c2286 /gcc/defaults.h | |
parent | e2c734c181b1235369d02d76b554925faec4753b (diff) | |
download | gcc-97488870283d923cea932db7763346087cbd9452.zip gcc-97488870283d923cea932db7763346087cbd9452.tar.gz gcc-97488870283d923cea932db7763346087cbd9452.tar.bz2 |
defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument.
* defaults.h (EXTRA_MEMORY_CONSTRAINT): Add STR argument.
(EXTRA_ADDRESS_CONSTRAINT): Likewise.
(CONSTRAINT_LEN): Provide default definition.
(CONST_OK_FOR_CONSTRAINT_P): Likewise.
(CONST_DOUBLE_OK_FOR_CONSTRAINT_P): Likewise.
(EXTRA_CONSTRAINT_STR): Likewise.
(REG_CLASS_FROM_CONSTRAINT): Define.
* genoutput.c (check_constraint_len, constraint_len): New functions.
(validate_insn_alternatives): Check CONSTRAINT_LEN for each
constraint / modifier.
(gen_insn): Call check_constraint_len.
* local-alloc.c (block_alloc): Update to use new macros / pass
second argument to EXTRA_{MEMORY,ADDRESS}_CONSTRAINT.
* ra-build.c (handle_asm_insn): Likewise.
* recog.c (asm_operand_ok, preprocess_constraints): Likewise.
(constrain_operands, peep2_find_free_register): Likewise.
* regclass.c (record_operand_costs, record_reg_classes): Likewise.
* regmove.c (find_matches): Likewise.
* reload.c (push_secondary_reload, find_reloads): Likewise.
(alternative_allows_memconst): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
(reload_cse_simplify_operands): Likewise.
* stmt.c (parse_output_constraint, parse_input_constraint): Likewise.
* doc/tm.texi (CONSTRAINT_LEN, REG_CLASS_FROM_CONSTRAINT): Document.
(CONST_OK_FOR_CONSTRAINT_P): Likewise.
(CONST_DOUBLE_OK_FOR_CONSTRAINT_P, EXTRA_CONSTRAINT_STR): Likewise.
(EXTRA_MEMORY_CONSTRAINT, EXTRA_ADDRESS_CONSTRAINT): Add STR argument.
* config/s390/s390.h (EXTRA_MEMORY_CONSTRAINT): Likewise.
From-SVN: r61119
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index 445aa5a..39f9d09 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -604,13 +604,38 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE! /* Determine whether extra constraint letter should be handled via address reload (like 'o'). */ #ifndef EXTRA_MEMORY_CONSTRAINT -#define EXTRA_MEMORY_CONSTRAINT(C) 0 +#define EXTRA_MEMORY_CONSTRAINT(C,STR) 0 #endif /* Determine whether extra constraint letter should be handled as an address (like 'p'). */ #ifndef EXTRA_ADDRESS_CONSTRAINT -#define EXTRA_ADDRESS_CONSTRAINT(C) 0 +#define EXTRA_ADDRESS_CONSTRAINT(C,STR) 0 +#endif + +/* When a port defines CONSTRAINT_LEN, it should use DEFAULT_CONSTRAINT_LEN + for all the characters that it does not want to change, so things like the + 'length' of a digit in a matching constraint is an implementation detail, + and not part of the interface. */ +#define DEFAULT_CONSTRAINT_LEN(C,STR) 1 + +#ifndef CONSTRAINT_LEN +#define CONSTRAINT_LEN(C,STR) DEFAULT_CONSTRAINT_LEN (C, STR) +#endif + +#if defined (CONST_OK_FOR_LETTER_P) && ! defined (CONST_OK_FOR_CONSTRAINT_P) +#define CONST_OK_FOR_CONSTRAINT_P(VAL,C,STR) CONST_OK_FOR_LETTER_P (VAL, C) +#endif + +#if defined (CONST_DOUBLE_OK_FOR_LETTER_P) && ! defined (CONST_DOUBLE_OK_FOR_CONSTRAINT_P) +#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(OP,C,STR) \ + CONST_DOUBLE_OK_FOR_LETTER_P (OP, C) +#endif + +#define REG_CLASS_FROM_CONSTRAINT(C,STR) REG_CLASS_FROM_LETTER (C) + +#if defined (EXTRA_CONSTRAINT) && ! defined (EXTRA_CONSTRAINT_STR) +#define EXTRA_CONSTRAINT_STR(OP, C,STR) EXTRA_CONSTRAINT (OP, C) #endif #endif /* ! GCC_DEFAULTS_H */ |