diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-24 04:16:25 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-24 04:16:25 +0000 |
commit | 46222c1821f32a4b0e0840125a1f15e708e78376 (patch) | |
tree | 43f723d14b2b85261e109309ad7df778f073cc92 /gcc/config/mep/constraints.md | |
parent | 7ab76cecd643d0d098fb7293340afa0e2b5f9f37 (diff) | |
download | gcc-46222c1821f32a4b0e0840125a1f15e708e78376.tar.gz |
[toplevel]
* MAINTAINERS: Add myself as mep maintainer.
[gcc]
Add MeP port.
* config.gcc: Add mep support.
* recog.c: Resurrect validate_replace_rtx_subexp().
* recog.h: Likewise.
* config/mep/: Add new port:
* config/mep/constraints.md: New file.
* config/mep/default.h: New file.
* config/mep/intrinsics.h: New file.
* config/mep/intrinsics.md: New file.
* config/mep/ivc2-template.h: New file.
* config/mep/mep-c5.cpu: New file.
* config/mep/mep-core.cpu: New file.
* config/mep/mep-default.cpu: New file.
* config/mep/mep-ext-cop.cpu: New file.
* config/mep/mep-intrin.h: New file.
* config/mep/mep-ivc2.cpu: New file.
* config/mep/mep-lib1.asm: New file.
* config/mep/mep-lib2.c: New file.
* config/mep/mep-pragma.c: New file.
* config/mep/mep-protos.h: New file.
* config/mep/mep-tramp.c: New file.
* config/mep/mep.c: New file.
* config/mep/mep.cpu: New file.
* config/mep/mep.h: New file.
* config/mep/mep.md: New file.
* config/mep/mep.opt: New file.
* config/mep/predicates.md: New file.
* config/mep/t-mep: New file.
[gcc/testsuite]
Add MeP port.
* lib/target-supports.exp: Add mep support (no profiling).
[libgcc]
Add MeP port.
* config.host: Add mep support.
[libstdc++-v3]
Add MeP port.
* configure.host: Add mep support.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148890 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mep/constraints.md')
-rw-r--r-- | gcc/config/mep/constraints.md | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/gcc/config/mep/constraints.md b/gcc/config/mep/constraints.md new file mode 100644 index 00000000000..5aa2de69c15 --- /dev/null +++ b/gcc/config/mep/constraints.md @@ -0,0 +1,162 @@ +;; Toshiba Media Processor Machine constraints +;; Copyright (C) 2009 Free Software Foundation, Inc. +;; Contributed by Red Hat Inc. +;; +;; 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 "a" "SP_REGS" + "The $sp register.") + +(define_register_constraint "b" "TP_REGS" + "The $tp register.") + +(define_register_constraint "c" "CONTROL_REGS" + "Any control register.") + +(define_register_constraint "d" "HILO_REGS" + "Either the $hi or the $lo register.") + +(define_register_constraint "em" "LOADABLE_CR_REGS" + "Coprocessor registers that can be directly loaded ($c0-$c15).") + +(define_register_constraint "ex" "mep_have_copro_copro_moves_p ? CR_REGS : NO_REGS" + "Coprocessor registers that can be moved to each other.") + +(define_register_constraint "er" "mep_have_core_copro_moves_p ? CR_REGS : NO_REGS" + "Coprocessor registers that can be moved to core registers.") + +(define_register_constraint "h" "HI_REGS" + "The $hi register.") + +(define_register_constraint "j" "RPC_REGS" + "The $rpc register.") + +(define_register_constraint "l" "LO_REGS" + "The $lo register.") + +(define_register_constraint "t" "TPREL_REGS" + "Registers which can be used in $tp-relative addressing.") + +(define_register_constraint "v" "GP_REGS" + "The $gp register.") + +(define_register_constraint "x" "CR_REGS" + "The coprocessor registers.") + +(define_register_constraint "y" "CCR_REGS" + "The coprocessor control registers.") + +(define_register_constraint "z" "R0_REGS" + "The $0 register.") + +(define_register_constraint "A" "USER0_REGS" + "User-defined register set A.") + +(define_register_constraint "B" "USER1_REGS" + "User-defined register set B.") + +(define_register_constraint "C" "USER2_REGS" + "User-defined register set C.") + +(define_register_constraint "D" "USER3_REGS" + "User-defined register set D.") + + + +(define_constraint "I" + "Offsets for $gp-rel addressing." + (and (match_code "const_int") + (match_test "ival >= -32768 && ival < 32768"))) + +(define_constraint "J" + "Constants that can be used directly with boolean insns." + (and (match_code "const_int") + (match_test "ival >= 0 && ival < 65536"))) + +(define_constraint "K" + "Constants that can be moved directly to registers." + (and (match_code "const_int") + (match_test "ival >= 0 && ival < 0x01000000"))) + +(define_constraint "L" + "Small constants that can be added to registers." + (and (match_code "const_int") + (match_test "ival >= -32 && ival < 32"))) + +(define_constraint "M" + "Long shift counts." + (and (match_code "const_int") + (match_test "ival >= 0 && ival < 32"))) + +(define_constraint "N" + "Small constants that can be compared to registers." + (and (match_code "const_int") + (match_test "ival >= 0 && ival < 16"))) + +(define_constraint "O" + "Constants that can be loaded into the top half of registers." + (and (match_code "const_int") + (match_test "!(ival & 0xffff) && ival >= -2147483647-1 && ival <= 2147483647"))) + +(define_constraint "S" + "Signed 8-bit immediates." + (and (match_code "const_int") + (match_test "ival >= -128 && ival < 127"))) + + + +;; This must only be used with mep_call_address_operand() as the predicate. +(define_constraint "R" + "@internal +Near symbols that can be used as addresses for CALL." + (not (match_code "reg"))) + +(define_constraint "T" + "Symbols encoded for $tp-rel or $gp-rel addressing." + (ior (ior + (and (match_code "unspec") + (match_code "symbol_ref" "a")) + (and (match_code "const") + (and (match_code "unspec" "0") + (match_code "symbol_ref" "0a")))) + (and (match_code "const") + (and (match_code "plus" "0") + (and (match_code "unspec" "00") + (match_code "symbol_ref" "00a")))))) + +(define_constraint "U" + "Non-constant addresses for loading/saving coprocessor registers." + (and (match_code "mem") + (match_test "! CONSTANT_P (XEXP (op, 0))"))) + +(define_constraint "W" + "The top half of a symbol's value." + (and (match_code "high") + (match_code "symbol_ref" "0"))) + +(define_constraint "Y" + "A register indirect address without offset." + (and (match_code "mem") + (match_code "reg" "0"))) + +(define_constraint "Z" + "Symbolic references to the control bus." + (and (and (match_code "mem") + (match_code "symbol_ref" "0")) + (match_test "mep_section_tag (op) == 'c'"))) |