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/] [avr/] [predicates.md] - Blame information for rev 199

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

Line No. Rev Author Line
1 38 julius
;; Predicate definitions for ATMEL AVR micro controllers.
2
;; Copyright (C) 2006, 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
;; Registers from r0 to r15.
21
(define_predicate "l_register_operand"
22
  (and (match_code "reg")
23
       (match_test "REGNO (op) <= 15")))
24
 
25
;; Registers from r16 to r31.
26
(define_predicate "d_register_operand"
27
  (and (match_code "reg")
28
       (match_test "REGNO (op) >= 16 && REGNO (op) <= 31")))
29
 
30
;; SP register.
31
(define_predicate "stack_register_operand"
32
  (and (match_code "reg")
33
       (match_test "REGNO (op) == REG_SP")))
34
 
35
;; Return true if OP is a valid address for lower half of I/O space.
36
(define_predicate "low_io_address_operand"
37
  (and (match_code "const_int")
38
       (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)")))
39
 
40
;; Return true if OP is a valid address for high half of I/O space.
41
(define_predicate "high_io_address_operand"
42
  (and (match_code "const_int")
43
       (match_test "IN_RANGE((INTVAL (op)), 0x40, 0x5F)")))
44
 
45
;; Returns 1 if OP is a SYMBOL_REF.
46
(define_predicate "symbol_ref_operand"
47
  (match_code "symbol_ref"))
48
 
49
;; Return true if OP is a constant that contains only one 1 in its
50
;; binary representation.
51
(define_predicate "single_one_operand"
52
  (and (match_code "const_int")
53
       (match_test "exact_log2(INTVAL (op) & GET_MODE_MASK (mode)) >= 0")))
54
 
55
;; Return true if OP is a constant that contains only one 0 in its
56
;; binary representation.
57
(define_predicate "single_zero_operand"
58
  (and (match_code "const_int")
59
       (match_test "exact_log2(~INTVAL (op) & GET_MODE_MASK (mode)) >= 0")))
60
 
61
;; True for EQ & NE
62
(define_predicate "eqne_operator"
63
  (match_code "eq,ne"))
64
 
65
;; True for GE & LT
66
(define_predicate "gelt_operator"
67
  (match_code "ge,lt"))
68
 
69
;; True for GT, GTU, LE & LEU
70
(define_predicate "difficult_comparison_operator"
71
  (match_code "gt,gtu,le,leu"))
72
 
73
;; False for GT, GTU, LE & LEU
74
(define_predicate "simple_comparison_operator"
75
  (and (match_operand 0 "comparison_operator")
76
       (not (match_code "gt,gtu,le,leu"))))

powered by: WebSVN 2.1.0

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