1 ;; Constraint definitions for S+CORE
2 ;; Copyright (C) 2005-2014 Free Software Foundation, Inc.
3 ;; Contributed by Sunnorth.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published
9 ;; by the Free Software Foundation; either version 3, or (at your
10 ;; option) any later version.
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 ;; License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>. */
21 ;; -------------------------------------------------------------------------
23 ;; -------------------------------------------------------------------------
25 ;; Register constraints.
26 (define_register_constraint "d" "G32_REGS"
29 (define_register_constraint "e" "G16_REGS"
32 (define_register_constraint "t" "T32_REGS"
33 "r8 to r11 | r22 to r27")
35 (define_register_constraint "h" "HI_REG"
38 (define_register_constraint "l" "LO_REG"
41 (define_register_constraint "x" "CE_REGS"
44 (define_register_constraint "q" "CN_REG"
47 (define_register_constraint "y" "LC_REG"
50 (define_register_constraint "z" "SC_REG"
53 (define_register_constraint "a" "SP_REGS"
56 (define_register_constraint "c" "CR_REGS"
59 ;; Integer constant constraints.
60 (define_constraint "I"
61 "High 16-bit constant (32-bit constant with 16 LSBs zero)."
62 (and (match_code "const_int")
63 (match_test "(ival & 0xffff) == 0")))
65 (define_constraint "J"
66 "Unsigned 5 bit integer (in the range 0 to 31)."
67 (and (match_code "const_int")
68 (match_test "ival >= 0 && ival <= 31")))
70 (define_constraint "K"
71 "Unsigned 16 bit integer (in the range 0 to 65535)."
72 (and (match_code "const_int")
73 (match_test "ival >= 0 && ival <= 65535")))
75 (define_constraint "L"
76 "Signed 16 bit integer (in the range −32768 to 32767)."
77 (and (match_code "const_int")
78 (match_test "ival >= -32768 && ival <= 32767")))
80 (define_constraint "M"
81 "Unsigned 14 bit integer (in the range 0 to 16383)."
82 (and (match_code "const_int")
83 (match_test "ival >= 0 && ival <= 16383")))
85 (define_constraint "N"
86 "Signed 14 bit integer (in the range −8192 to 8191)."
87 (and (match_code "const_int")
88 (match_test "ival >= -8192 && ival <= 8191")))
90 (define_constraint "Z"
92 (and (match_code "symbol_ref")
93 (match_test "GET_CODE (op) == SYMBOL_REF")))