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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [microblaze/] [predicates.md] - Blame information for rev 749

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

Line No. Rev Author Line
1 709 jeremybenn
;; Predicate definitions for Xilinx MicroBlaze
2
;; Copyright 2009, 2010 Free Software Foundation, Inc.
3
;;
4
;; Contributed by Michael Eager .
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
 
23
;; Return whether OP can be used as an operands in arithmetic.
24
(define_predicate "arith_operand"
25
  (ior (match_code "const_int,const_double")
26
       (match_operand 0 "register_operand")))
27
 
28
(define_predicate "arith_operand32"
29
  (ior (match_operand 0 "register_operand")
30
       (and (match_code "const_int,const_double")
31
            (match_test "LARGE_INT (op)"))))
32
 
33
(define_predicate "const_0_operand"
34
  (and (match_code "const_int,const_double")
35
       (match_test "op == CONST0_RTX (GET_MODE (op))")))
36
 
37
;; Return whether OP is a register or the constant 0.
38
(define_predicate "reg_or_0_operand"
39
  (ior (match_operand 0 "const_0_operand")
40
       (match_operand 0 "register_operand")))
41
 
42
;;  Return if the operand is either the PC or a label_ref.
43
(define_special_predicate "pc_or_label_operand"
44
  (ior (match_code "pc,label_ref")
45
       (and (match_code "symbol_ref")
46
            (match_test "!(strcmp ((XSTR (op, 0)), \"_stack_overflow_exit\"))"))))
47
 
48
;; Test for valid call operand
49
(define_predicate "call_insn_operand"
50
  (match_test "CALL_INSN_OP (op)"))
51
 
52
;; Return if OPERAND is valid as a source operand for a move instruction.
53
(define_predicate "move_operand"
54
  (and (
55
     not (
56
       and (match_code "plus")
57
           (not (match_test "(GET_CODE (XEXP (op, 0)) == REG) ^ (GET_CODE (XEXP (op,1)) == REG)"))
58
         )
59
       )
60
       (match_operand 0 "general_operand")))
61
 
62
;; Test for valid PIC call operand
63
(define_predicate "call_insn_plt_operand"
64
  (match_test "PLT_ADDR_P (op)"))

powered by: WebSVN 2.1.0

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