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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
;;- Constraint definitions for the pdp11 for GNU C compiler
2
;; Copyright (C) 2010 Free Software Foundation, Inc.
3
;; Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
4
 
5
;; This file is part of GCC.
6
 
7
;; GCC is free software; you can redistribute it and/or modify
8
;; it under the terms of the GNU General Public License as published by
9
;; the Free Software Foundation; either version 3, or (at your option)
10
;; any later version.
11
 
12
;; GCC is distributed in the hope that it will be useful,
13
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
14
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
;; GNU General Public 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
(define_register_constraint "f" "FPU_REGS"
22
  "Any FPU register")
23
 
24
(define_register_constraint "a" "LOAD_FPU_REGS"
25
  "FPU register that can be directly loaded from memory")
26
 
27
(define_register_constraint "d" "MUL_REGS"
28
  "General register that can be used for 16-bit multiply (odd numbered)")
29
 
30
(define_constraint "I"
31
  "Integer constant that fits in 16 bits unsigned"
32
  (and (match_code "const_int")
33
       (match_test "(ival & 0xffff0000) == 0")))
34
 
35
(define_constraint "J"
36
  "Integer constant whose low 16 bits are zero"
37
  (and (match_code "const_int")
38
       (match_test "(ival & 0xffff) == 0")))
39
 
40
(define_constraint "K"
41
  "Integer constant whose lower and upper 16 bit half are both non-zero"
42
  (and (match_code "const_int")
43
       (match_test "(ival & 0xffff) != 0 && (ival & 0xffff0000) != 0")))
44
 
45
(define_constraint "L"
46
  "Integer constant 1"
47
  (and (match_code "const_int")
48
       (match_test "ival == 1")))
49
 
50
(define_constraint "M"
51
  "Integer constant -1"
52
  (and (match_code "const_int")
53
       (match_test "ival == -1")))
54
 
55
(define_constraint "N"
56
  "Integer constant 0"
57
  (and (match_code "const_int")
58
       (match_test "ival == 0")))
59
 
60
(define_constraint "O"
61
  "Integer constant for which several individual shifts are better than one big one"
62
  (and (match_code "const_int")
63
       (match_test "abs (ival) > 1 && abs (ival) <= 4")))
64
 
65
(define_constraint "G"
66
  "Defines a real zero constant."
67
  (and (match_code "const_double")
68
       (match_test "op == CONST0_RTX (GET_MODE (op))")))
69
 
70
(define_constraint "Q"
71
  "Memory reference that requires an additional word after the opcode"
72
  (and (match_code "mem")
73
       (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
74
                    && !simple_memory_operand (op, GET_MODE (op))")))
75
 
76
(define_constraint "R"
77
  "Memory reference that is encoded within the opcode"
78
  (and (match_code "mem")
79
       (match_test "memory_address_p (GET_MODE (op), XEXP (op, 0))
80
                    && simple_memory_operand (op, GET_MODE (op))")))
81
 

powered by: WebSVN 2.1.0

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