1 ;; Constraints for Vitesse IQ2000 processors
2 ;; Copyright (C) 2011-2013 Free Software Foundation, Inc.
4 ;; This file is part of GCC.
6 ;; GCC is free software; you can redistribute it and/or modify
7 ;; it under the terms of the GNU General Public License as published by
8 ;; the Free Software Foundation; either version 3, or (at your option)
11 ;; GCC is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;; GNU General Public License for more details.
16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GCC; see the file COPYING3. If not see
18 ;; <http://www.gnu.org/licenses/>.
20 ;; Register constraints.
21 (define_register_constraint "b" "ALL_REGS"
24 (define_register_constraint "d" "GR_REGS"
27 (define_register_constraint "y" "GR_REGS"
30 ;; Integer constraints.
31 (define_constraint "I"
32 "A 16-bit signed integer."
33 (and (match_code "const_int")
34 (match_test "IN_RANGE (ival, -32768, 32767)")))
36 (define_constraint "J"
38 (and (match_code "const_int")
39 (match_test "ival == 0")))
41 (define_constraint "K"
42 "A 16-bit unsigned integer"
43 (and (match_code "const_int")
44 (match_test "IN_RANGE (ival, 0, 65535)")))
46 (define_constraint "L"
47 "A 32-bit constant whose bottom 16 bits are zero."
48 (and (match_code "const_int")
49 (ior (match_test "(ival | 0x7fff0000) == 0x7fff0000")
50 (match_test "(ival | 0x7fff0000) + 0x10000 == 0"))))
52 (define_constraint "M"
53 "Any constant not matched by 'I', 'K', or 'L'."
54 (and (match_code "const_int")
55 (match_test "!insn_const_int_ok_for_constraint (ival, CONSTRAINT_I)")
56 (match_test "!insn_const_int_ok_for_constraint (ival, CONSTRAINT_K)")
57 (match_test "!insn_const_int_ok_for_constraint (ival, CONSTRAINT_L)")))
59 (define_constraint "N"
60 "Any constant whose lower or upper 16 bits are 0xffff."
61 (and (match_code "const_int")
62 (ior (match_test "(ival & 0xffff) == 0xffff")
63 (match_test "(ival & 0xffff0000) == 0xffff0000"))))
65 (define_constraint "O"
66 "A 5-bit signed integer."
67 (and (match_code "const_int")
68 (match_test "IN_RANGE (ival, -31, 31)")))
70 ;; Floating-point constraints.
71 (define_constraint "G"
72 "Floating-point zero."
73 (and (match_code "const_double")
74 (match_test "op == CONST0_RTX (mode)")))
77 (define_constraint "R"
78 "A memory reference which takes one word for the instruction."
79 (match_test "simple_memory_operand (op, mode)"))