diff options
author | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 19:39:30 +0000 |
---|---|---|
committer | pkoning <pkoning@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 19:39:30 +0000 |
commit | 44d2fca6b19e17f80678b4ba9c213a1fabe0eeae (patch) | |
tree | 8104fc631e1f5f8f4c6c62cf75196d766b5df41c /gcc/config/pdp11/constraints.md | |
parent | 3bddda63c5e70a378504142817105140c39ddc5c (diff) | |
download | gcc-44d2fca6b19e17f80678b4ba9c213a1fabe0eeae.tar.gz |
* config/pdp11/pdp11-protos.md (arith_operand,
const_immediate_operand, expand_shift_operand,
immediate15_operand): Delete
* config/pdp11/pdp11.c: Ditto.
* config/pdp11/pdp11.h (REG_CLASS_FROM_LETTER,
CONST_OK_FOR_LETTER_P, CONST_DOUBLE_OK_FOR_LETTER_P,
EXTRA_CONSTRAINT): Delete.
* config/pdp11/pdp11.md (various): Use standard constraints
instead of removed ones.
* config/pdp11/constraints.md: New file.
* config/pdp11/predicates.md: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165784 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pdp11/constraints.md')
-rw-r--r-- | gcc/config/pdp11/constraints.md | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/gcc/config/pdp11/constraints.md b/gcc/config/pdp11/constraints.md new file mode 100644 index 00000000000..6e5a5798ecc --- /dev/null +++ b/gcc/config/pdp11/constraints.md @@ -0,0 +1,81 @@ +;;- Constraint definitions for the pdp11 for GNU C compiler +;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at). + +;; This file is part of GCC. + +;; GCC is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; GCC is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GCC; see the file COPYING3. If not see +;; <http://www.gnu.org/licenses/>. + +(define_register_constraint "f" "FPU_REGS" + "Any FPU register") + +(define_register_constraint "a" "LOAD_FPU_REGS" + "FPU register that can be directly loaded from memory") + +(define_register_constraint "d" "MUL_REGS" + "General register that can be used for 16-bit multiply (odd numbered)") + +(define_constraint "I" + "Integer constant that fits in 16 bits unsigned" + (and (match_code "const_int") + (match_test "(ival & 0xffff0000) == 0"))) + +(define_constraint "J" + "Integer constant whose low 16 bits are zero" + (and (match_code "const_int") + (match_test "(ival & 0xffff) == 0"))) + +(define_constraint "K" + "Integer constant whose lower and upper 16 bit half are both non-zero" + (and (match_code "const_int") + (match_test "(ival & 0xffff) != 0 && (ival & 0xffff0000) != 0"))) + +(define_constraint "L" + "Integer constant 1" + (and (match_code "const_int") + (match_test "ival == 1"))) + +(define_constraint "M" + "Integer constant -1" + (and (match_code "const_int") + (match_test "ival == -1"))) + +(define_constraint "N" + "Integer constant 0" + (and (match_code "const_int") + (match_test "ival == 0"))) + +(define_constraint "O" + "Integer constant for which several individual shifts are better than one big one" + (and (match_code "const_int") + (match_test "abs (ival) > 1 && abs (ival) <= 4"))) + +(define_constraint "G" + "Defines a real zero constant." + (and (match_code "const_double") + (match_test "op == CONST0_RTX (GET_MODE (op))"))) + +(define_constraint "Q" + "Memory reference that requires an additional word after the opcode" + (and (match_code "mem") + (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0)) + && !simple_memory_operand (op, GET_MODE (op))"))) + +(define_constraint "R" + "Memory reference that is encoded within the opcode" + (and (match_code "mem") + (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0)) + && simple_memory_operand (op, GET_MODE (op))"))) + |