0
|
1 ;; GCC machine description for picochip
|
|
2 ;; Copyright (C) 2008, 2009 Free Software Foundation, Inc.
|
|
3 ;; Contributed by picoChip Designs Ltd (http://www.picochip.com)
|
|
4 ;; Maintained by Daniel Towner (dant@picochip.com) and Hariharan
|
|
5 ;; Sandanagobalane (hariharan@picochip.com)
|
|
6 ;;
|
|
7 ;; This file is part of GCC.
|
|
8 ;;
|
|
9 ;; GCC is free software; you can redistribute it and/or modify
|
|
10 ;; it under the terms of the GNU General Public License as published by
|
|
11 ;; the Free Software Foundation; either version 3, or (at your option)
|
|
12 ;; any later version.
|
|
13 ;;
|
|
14 ;; GCC is distributed in the hope that it will be useful,
|
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 ;; GNU General Public License for more details.
|
|
18 ;;
|
|
19 ;; You should have received a copy of the GNU General Public License
|
|
20 ;; along with GCC; see the file COPYING3. If not, see
|
|
21 ;; <http://www.gnu.org/licenses/>.
|
|
22
|
|
23 (define_constraint "I"
|
|
24 "4-bits signed value"
|
|
25 (and (match_code "const_int")
|
|
26 (match_test " ival >= -8 && ival< 8")))
|
|
27
|
|
28 (define_constraint "J"
|
|
29 "4-bits unsigned value"
|
|
30 (and (match_code "const_int")
|
|
31 (match_test "ival>=0 && ival < 16")))
|
|
32
|
|
33 (define_constraint "K"
|
|
34 "8-bits signed value"
|
|
35 (and (match_code "const_int")
|
|
36 (match_test " ival >= -128 && ival < 128")))
|
|
37
|
|
38 (define_constraint "M"
|
|
39 "4-bits magnitude"
|
|
40 (and (match_code "const_int")
|
|
41 (match_test " abs(ival) < 16")))
|
|
42
|
|
43 (define_constraint "N"
|
|
44 "10-bits signed value"
|
|
45 (and (match_code "const_int")
|
|
46 (match_test "ival >= -512 && ival < 512")))
|
|
47
|
|
48 (define_constraint "O"
|
|
49 "16-bits signed value"
|
|
50 (and (match_code "const_int")
|
|
51 (match_test " ival >= -32768 && ival < 32768 ")))
|
|
52
|
|
53 (define_constraint "a"
|
|
54 "See if this is an absolute address in memory"
|
|
55 (and (match_code "mem")
|
|
56 (match_test "picochip_absolute_memory_operand(op,mode) == 1")))
|
|
57
|
|
58 (define_register_constraint "k" "FRAME_REGS"
|
|
59 "Frame regs")
|
|
60 (define_register_constraint "f" "PTR_REGS"
|
|
61 "Pointer regs")
|
|
62 (define_register_constraint "t" "TWIN_REGS"
|
|
63 "Twin regs")
|
|
64
|