OpenCores
URL https://opencores.org/ocsvn/hf-risc/hf-risc/trunk

Subversion Repositories hf-risc

[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [gcc/] [gcc/] [config/] [riscv/] [constraints.md] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
;; Constraint definitions for RISC-V target.
2
;; Copyright (C) 2011-2014 Free Software Foundation, Inc.
3
;; Contributed by Andrew Waterman (waterman@cs.berkeley.edu) at UC Berkeley.
4
;; Based on MIPS target for GNU compiler.
5
;;
6
;; This file is part of GCC.
7
;;
8
;; GCC is free software; you can redistribute it and/or modify
9
;; it under the terms of the GNU General Public License as published by
10
;; the Free Software Foundation; either version 3, or (at your option)
11
;; any later version.
12
;;
13
;; GCC is distributed in the hope that it will be useful,
14
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
;; GNU General Public License for more details.
17
;;
18
;; You should have received a copy of the GNU General Public License
19
;; along with GCC; see the file COPYING3.  If not see
20
;; .
21
 
22
;; Register constraints
23
 
24
(define_register_constraint "f" "TARGET_HARD_FLOAT ? FP_REGS : NO_REGS"
25
  "A floating-point register (if available).")
26
 
27
(define_register_constraint "b" "ALL_REGS"
28
  "@internal")
29
 
30
(define_register_constraint "j" "T_REGS"
31
  "@internal")
32
 
33
(define_register_constraint "l" "JALR_REGS"
34
  "@internal")
35
 
36
;; Integer constraints
37
 
38
(define_constraint "Z"
39
  "@internal"
40
  (and (match_code "const_int")
41
       (match_test "1")))
42
 
43
(define_constraint "I"
44
  "An I-type 12-bit signed immediate."
45
  (and (match_code "const_int")
46
       (match_test "SMALL_OPERAND (ival)")))
47
 
48
(define_constraint "J"
49
  "Integer zero."
50
  (and (match_code "const_int")
51
       (match_test "ival == 0")))
52
 
53
;; Floating-point constraints
54
 
55
(define_constraint "G"
56
  "Floating-point zero."
57
  (and (match_code "const_double")
58
       (match_test "op == CONST0_RTX (mode)")))
59
 
60
;; General constraints
61
 
62
(define_constraint "Q"
63
  "@internal"
64
  (match_operand 0 "const_arith_operand"))
65
 
66
(define_memory_constraint "A"
67
  "An address that is held in a general-purpose register."
68
  (and (match_code "mem")
69
       (match_test "GET_CODE(XEXP(op,0)) == REG")))
70
 
71
(define_constraint "S"
72
  "@internal
73
   A constant call address."
74
  (and (match_operand 0 "call_insn_operand")
75
       (match_test "CONSTANT_P (op)")))
76
 
77
(define_constraint "T"
78
  "@internal
79
   A constant @code{move_operand}."
80
  (and (match_operand 0 "move_operand")
81
       (match_test "CONSTANT_P (op)")))
82
 
83
(define_memory_constraint "W"
84
  "@internal
85
   A memory address based on a member of @code{BASE_REG_CLASS}."
86
  (and (match_code "mem")
87
       (match_operand 0 "memory_operand")))
88
 
89
(define_constraint "YG"
90
  "@internal
91
   A vector zero."
92
  (and (match_code "const_vector")
93
       (match_test "op == CONST0_RTX (mode)")))

powered by: WebSVN 2.1.0

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