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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [score/] [predicates.md] - Blame information for rev 203

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

Line No. Rev Author Line
1 38 julius
;; Predicate definitions for Sunplus S+CORE.
2
;; Copyright (C) 2005, 2007 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
(define_predicate "arith_operand"
21
  (ior (match_code "const_int")
22
       (match_operand 0 "register_operand")))
23
 
24
(define_predicate "const_call_insn_operand"
25
  (match_code "const,symbol_ref,label_ref")
26
{
27
  enum score_symbol_type symbol_type;
28
 
29
  return (mda_symbolic_constant_p (op, &symbol_type)
30
          && (symbol_type == SYMBOL_GENERAL));
31
})
32
 
33
(define_predicate "call_insn_operand"
34
  (ior (match_operand 0 "const_call_insn_operand")
35
       (match_operand 0 "register_operand")))
36
 
37
(define_predicate "const_uimm5"
38
  (match_code "const_int")
39
{
40
  return IMM_IN_RANGE (INTVAL (op), 5, 0);
41
})
42
 
43
(define_predicate "hireg_operand"
44
  (and (match_code "reg")
45
       (match_test "REGNO (op) == HI_REGNUM")))
46
 
47
(define_predicate "loreg_operand"
48
  (and (match_code "reg")
49
       (match_test "REGNO (op) == LO_REGNUM")))
50
 
51
(define_predicate "sr0_operand"
52
  (and (match_code "reg")
53
       (match_test "REGNO (op) == CN_REGNUM")))
54
 
55
(define_predicate "g32reg_operand"
56
  (and (match_code "reg")
57
       (match_test "GP_REG_P (REGNO (op))")))
58
 
59
(define_predicate "branch_n_operator"
60
  (match_code "lt,ge"))
61
 
62
(define_predicate "branch_nz_operator"
63
  (match_code "eq,ne,lt,ge"))
64
 
65
(define_predicate "const_simm12"
66
  (match_code "const_int")
67
{
68
  return IMM_IN_RANGE (INTVAL (op), 12, 1);
69
})
70
 
71
(define_predicate "const_simm15"
72
  (match_code "const_int")
73
{
74
  return IMM_IN_RANGE (INTVAL (op), 15, 1);
75
})
76
 

powered by: WebSVN 2.1.0

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