OSDN Git Service

moxie EH fixes
[pf3gnuchains/gcc-fork.git] / gcc / config / mn10300 / predicates.md
1 ;; Predicate definitions for Matsushita MN10300.
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 ;; <http://www.gnu.org/licenses/>.
19
20 ;; Return true if the operand is the 1.0f constant.
21
22 (define_predicate "const_1f_operand"
23   (match_code "const_int,const_double")
24 {
25   return (op == CONST1_RTX (SFmode));
26 })
27
28 ;; Return 1 if X is a CONST_INT that is only 8 bits wide.  This is
29 ;; used for the btst insn which may examine memory or a register (the
30 ;; memory variant only allows an unsigned 8-bit integer).
31
32 (define_predicate "const_8bit_operand"
33   (match_code "const_int")
34 {
35   return (GET_CODE (op) == CONST_INT
36           && INTVAL (op) >= 0
37           && INTVAL (op) < 256);
38 })
39
40 ;; Return true if OP is a valid call operand.
41
42 (define_predicate "call_address_operand"
43   (match_code "symbol_ref,reg,unspec")
44 {
45   if (flag_pic)
46     return (satisfies_constraint_S (op) || GET_CODE (op) == REG);
47
48   return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
49 })
50
51 (define_predicate "impossible_plus_operand"
52   (match_code "plus")
53 {
54   return XEXP (op, 0) == stack_pointer_rtx
55       || XEXP (op, 1) == stack_pointer_rtx;
56 })