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

Subversion Repositories openrisc

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
;; Constraints for Vitesse IQ2000 processors
2
;; Copyright (C) 2011 Free Software Foundation, Inc.
3
 
4
;; This file is part of GCC.
5
 
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)
9
;; any later version.
10
 
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.
15
 
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
;; .
19
 
20
;; Register constraints.
21
(define_register_constraint "b" "ALL_REGS"
22
  "@internal")
23
 
24
(define_register_constraint "d" "GR_REGS"
25
  "@internal")
26
 
27
(define_register_constraint "y" "GR_REGS"
28
  "@internal")
29
 
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)")))
35
 
36
(define_constraint "J"
37
  "Zero."
38
  (and (match_code "const_int")
39
       (match_test "ival == 0")))
40
 
41
(define_constraint "K"
42
  "A 16-bit unsigned integer"
43
  (and (match_code "const_int")
44
       (match_test "IN_RANGE (ival, 0, 65535)")))
45
 
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"))))
51
 
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)")))
58
 
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"))))
64
 
65
(define_constraint "O"
66
  "A 5-bit signed integer."
67
  (and (match_code "const_int")
68
       (match_test "IN_RANGE (ival, -31, 31)")))
69
 
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)")))
75
 
76
;; Extra constraints.
77
(define_constraint "R"
78
  "A memory reference which takes one word for the instruction."
79
  (match_test "simple_memory_operand (op, mode)"))

powered by: WebSVN 2.1.0

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