]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mn10300-protos.h: Remove the prototypes for call_address_operand, const_8bit_operand.
authorKazu Hirata <kazu@cs.umass.edu>
Sat, 19 Mar 2005 00:21:23 +0000 (00:21 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sat, 19 Mar 2005 00:21:23 +0000 (00:21 +0000)
* config/mn10300/mn10300-protos.h: Remove the prototypes for
call_address_operand, const_8bit_operand.
* config/mn10300/mn10300.c (call_address_operand,
const_8bit_operand, const_1f_operand): Move to predicates.md.
* config/mn10300/mn10300.h (PREDICATE_CODES): Remove.
* config/mn10300/mn10300.md: Include predicates.md.
* config/mn10300/predicates.md: New.

From-SVN: r96712

gcc/ChangeLog
gcc/config/mn10300/mn10300-protos.h
gcc/config/mn10300/mn10300.c
gcc/config/mn10300/mn10300.h
gcc/config/mn10300/mn10300.md
gcc/config/mn10300/predicates.md [new file with mode: 0644]

index a35d25843560034b6362475a818e733848b28e7c..d0882f39e29be254abc090a32437ec2b5689a022 100644 (file)
@@ -1,3 +1,13 @@
+2005-03-18  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/mn10300/mn10300-protos.h: Remove the prototypes for
+       call_address_operand, const_8bit_operand.
+       * config/mn10300/mn10300.c (call_address_operand,
+       const_8bit_operand, const_1f_operand): Move to predicates.md.
+       * config/mn10300/mn10300.h (PREDICATE_CODES): Remove.
+       * config/mn10300/mn10300.md: Include predicates.md.
+       * config/mn10300/predicates.md: New.
+
 2005-03-18  Joseph S. Myers  <joseph@codesourcery.com>
 
        * c-common.c, c-decl.c, c-format.c, c-typeck.c: Use %D for
index 77af9a9b131f41d42176a701e50efc61489454dc..2936dcf0de1837c3aa0b58290058cd3d57c7ee9e 100644 (file)
@@ -40,9 +40,7 @@ extern enum reg_class secondary_reload_class (enum reg_class,
 extern const char *output_tst (rtx, rtx);
 extern int store_multiple_operation (rtx, enum machine_mode);
 extern int symbolic_operand (rtx, enum machine_mode);
-extern int call_address_operand (rtx, enum machine_mode);
 extern int impossible_plus_operand (rtx, enum machine_mode);
-extern int const_8bit_operand (rtx, enum machine_mode);
 
 extern bool mn10300_wide_const_load_uses_clr (rtx operands[2]);
 #endif /* RTX_CODE */
index 16832054c0d5def29c1561718278067d846748e6..c419101c388d930866035befd9f49f53bbfe7393 100644 (file)
@@ -1295,17 +1295,6 @@ store_multiple_operation (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
   return mask;
 }
 
-/* Return true if OP is a valid call operand.  */
-
-int
-call_address_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
-  if (flag_pic)
-    return (EXTRA_CONSTRAINT (op, 'S') || GET_CODE (op) == REG);
-
-  return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
-}
-
 /* What (if any) secondary registers are needed to move IN with mode
    MODE into a register in register class CLASS. 
 
@@ -1675,24 +1664,6 @@ impossible_plus_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
   return 0;
 }
 
-/* Return 1 if X is a CONST_INT that is only 8 bits wide.  This is used
-   for the btst insn which may examine memory or a register (the memory
-   variant only allows an unsigned 8 bit integer).  */
-int
-const_8bit_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
-  return (GET_CODE (op) == CONST_INT
-         && INTVAL (op) >= 0
-         && INTVAL (op) < 256);
-}
-
-/* Return true if the operand is the 1.0f constant.  */
-int
-const_1f_operand (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
-{
-  return (op == CONST1_RTX (SFmode));
-}
-
 /* Similarly, but when using a zero_extract pattern for a btst where
    the source operand might end up in memory.  */
 int
index 121d087a1e545d5ea47a4124238360a11e09e746..4b1e44debf1a44f8a5e01410925cc4acdef941fa 100644 (file)
@@ -1073,11 +1073,6 @@ while (0)
 
 #define FILE_ASM_OP "\t.file\n"
 
-#define PREDICATE_CODES                                        \
-  {"const_1f_operand", {CONST_INT, CONST_DOUBLE}},     \
-  {"const_8bit_operand", {CONST_INT}},                 \
-  {"call_address_operand", {SYMBOL_REF, REG, UNSPEC}},
-
 typedef struct mn10300_cc_status_mdep
   {
     int fpCC;
index 8b6933b4aa62f8142dbd6fd69fd5ad6a4e9ef8b7..0d51857a199bd08f2f55b1de7f9ec6d435c9b609 100644 (file)
@@ -1,5 +1,5 @@
 ;; GCC machine description for Matsushita MN10300
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ;; Free Software Foundation, Inc.
 ;; Contributed by Jeff Law (law@cygnus.com).
 
@@ -47,6 +47,8 @@
   (UNSPEC_GOTOFF       3)
   (UNSPEC_PLT          4)
 ])
+
+(include "predicates.md")
 \f
 ;; ----------------------------------------------------------------------
 ;; MOVE INSTRUCTIONS
diff --git a/gcc/config/mn10300/predicates.md b/gcc/config/mn10300/predicates.md
new file mode 100644 (file)
index 0000000..752ccd8
--- /dev/null
@@ -0,0 +1,50 @@
+;; Predicate definitions for Matsushita MN10300.
+;; Copyright (C) 2005 Free Software Foundation, Inc.
+;;
+;; This file is part of GCC.
+;;
+;; GCC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GCC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GCC; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; Return true if the operand is the 1.0f constant.
+
+(define_predicate "const_1f_operand"
+  (match_code "const_int,const_double")
+{
+  return (op == CONST1_RTX (SFmode));
+})
+
+;; Return 1 if X is a CONST_INT that is only 8 bits wide.  This is
+;; used for the btst insn which may examine memory or a register (the
+;; memory variant only allows an unsigned 8 bit integer).
+
+(define_predicate "const_8bit_operand"
+  (match_code "const_int")
+{
+  return (GET_CODE (op) == CONST_INT
+         && INTVAL (op) >= 0
+         && INTVAL (op) < 256);
+})
+
+;; Return true if OP is a valid call operand.
+
+(define_predicate "call_address_operand"
+  (match_code "symbol_ref,reg,unspec")
+{
+  if (flag_pic)
+    return (EXTRA_CONSTRAINT (op, 'S') || GET_CODE (op) == REG);
+
+  return (GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == REG);
+})