OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [score/] [constraints.md] - Blame information for rev 709

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
;; Constraint definitions for S+CORE
2
;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3
;; Contributed by Sunnorth.
4
 
5
;; This file is part of GCC.
6
 
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.
11
 
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.
16
 
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
;; .  */
20
 
21
;; -------------------------------------------------------------------------
22
;; Constraints
23
;; -------------------------------------------------------------------------
24
 
25
;; Register constraints.
26
(define_register_constraint "d" "G32_REGS"
27
  "r0 to r31")
28
 
29
(define_register_constraint "e" "G16_REGS"
30
  "r0 to r15")
31
 
32
(define_register_constraint "t" "T32_REGS"
33
  "r8 to r11 | r22 to r27")
34
 
35
(define_register_constraint "h" "HI_REG"
36
  "hi")
37
 
38
(define_register_constraint "l" "LO_REG"
39
  "lo")
40
 
41
(define_register_constraint "x" "CE_REGS"
42
  "hi + lo")
43
 
44
(define_register_constraint "q" "CN_REG"
45
  "cnt")
46
 
47
(define_register_constraint "y" "LC_REG"
48
  "lcb")
49
 
50
(define_register_constraint "z" "SC_REG"
51
  "scb")
52
 
53
(define_register_constraint "a" "SP_REGS"
54
  "cnt + lcb + scb")
55
 
56
(define_register_constraint "c" "CR_REGS"
57
  "cr0 to cr15")
58
 
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")))
64
 
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")))
69
 
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")))
74
 
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")))
79
 
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")))
84
 
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")))
89
 
90
(define_constraint "Z"
91
  "Any SYMBOL_REF."
92
  (and (match_code "symbol_ref")
93
       (match_test "GET_CODE (op) == SYMBOL_REF")))

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.