aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/config/m32r/constraints.md
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-07-22 14:03:48 -0700
committerJing Yu <jingyu@google.com>2010-07-22 14:03:48 -0700
commitb094d6c4bf572654a031ecc4afe675154c886dc5 (patch)
tree89394c56b05e13a5413ee60237d65b0214fd98e2 /gcc-4.4.3/gcc/config/m32r/constraints.md
parentdc34721ac3bf7e3c406fba8cfe9d139393345ec5 (diff)
downloadtoolchain_gcc-b094d6c4bf572654a031ecc4afe675154c886dc5.tar.gz
toolchain_gcc-b094d6c4bf572654a031ecc4afe675154c886dc5.tar.bz2
toolchain_gcc-b094d6c4bf572654a031ecc4afe675154c886dc5.zip
commit gcc-4.4.3 which is used to build gcc-4.4.3 Android toolchain in master.
The source is based on fsf gcc-4.4.3 and contains local patches which are recorded in gcc-4.4.3/README.google. Change-Id: Id8c6d6927df274ae9749196a1cc24dbd9abc9887
Diffstat (limited to 'gcc-4.4.3/gcc/config/m32r/constraints.md')
-rw-r--r--gcc-4.4.3/gcc/config/m32r/constraints.md137
1 files changed, 137 insertions, 0 deletions
diff --git a/gcc-4.4.3/gcc/config/m32r/constraints.md b/gcc-4.4.3/gcc/config/m32r/constraints.md
new file mode 100644
index 000000000..da126c27c
--- /dev/null
+++ b/gcc-4.4.3/gcc/config/m32r/constraints.md
@@ -0,0 +1,137 @@
+;; Constraint definitions for Renesas M32R cpu for GNU C compiler
+;; Copyright (C) 2007 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 3, 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 COPYING3. If not see
+;; <http://www.gnu.org/licenses/>.
+
+
+;; The letters I, J, K, L, M, N, O, P in a register constraint string
+;; can be used to stand for particular ranges of immediate operands.
+;; The letters Q, R, S, T, U are used to segregate specific types of
+;; operands, usually memory references, for the target machine.
+;;
+;; I is used for 8-bit signed immediates.
+;; J is used for 16-bit signed immediates.
+;; K is used for 16-bit unsigned immediates.
+;; L is used for 16-bit immediates left shifted by 16 (sign ???).
+;; M is used for 24-bit unsigned immediates.
+;; N is used for 8-bit signed immediates for compares
+;; (values in the range -127 to +128).
+;; O is used for 5-bit unsigned immediates (shift count).
+;; P is used for 16-bit signed immediates for compares
+;; (values in the range -32767 to +32768).
+;;
+;; Q is for symbolic addresses loadable with ld24.
+;; R is for symbolic addresses when ld24 can't be used.
+;; S is for stores with pre {inc,dec}rement
+;; T is for indirect of a pointer.
+;; U is for loads with post increment.
+;; W is used for an immediate value of 0.
+;;
+;; Register constraints
+
+(define_register_constraint "a" "ACCUM_REGS"
+ "@internal")
+
+(define_register_constraint "c" "CARRY_REG"
+ "@internal")
+
+;; Integer constraints
+(define_constraint "I"
+ "8-bit signed immediate."
+ (and (match_code "const_int")
+ (match_test "ival >= -0x80 && ival <= 0x7f")))
+
+(define_constraint "J"
+ "16-bit signed immediate."
+ (and (match_code "const_int")
+ (match_test "ival >= -0x8000 && ival <= 0x7fff")))
+
+(define_constraint "K"
+ "16-bit unsigned immediate."
+ (and (match_code "const_int")
+ (match_test "(unsigned HOST_WIDE_INT) ival <= 0x0000ffff")))
+
+(define_constraint "L"
+ "16-bit signed immediate left shifted by 16."
+ (and (match_code "const_int")
+ (match_test "(ival & 0xffff) == 0")
+ (match_test "(ival >> 16) >= -0x8000 && (ival >> 16) <= 0x7fff")))
+
+(define_constraint "M"
+ "24-bit unsigned immediate."
+ (and (match_code "const_int")
+ (match_test "(unsigned HOST_WIDE_INT) ival <= 0x00ffffff")))
+
+(define_constraint "N"
+ "8-bit signed immediate for compare."
+ (and (match_code "const_int")
+ (match_test "ival >= -127 && ival <= 128")))
+
+(define_constraint "O"
+ "5-bit unsigned immediate."
+ (and (match_code "const_int")
+ (match_test "ival >= 0 && ival < 32")))
+
+(define_constraint "P"
+ "16-bit signed immediate for compare."
+ (and (match_code "const_int")
+ (match_test "ival >= -0x7fff && ival <= 0x8000")))
+
+;; Floating-point constraints
+(define_constraint "G"
+ "Double constant loadable with 2 ldi insns."
+ (and (match_code "const_double")
+ (match_test "easy_di_const (op)")))
+
+(define_constraint "H"
+ "Double constant loadable with movdf."
+ (and (match_code "const_double")
+ (match_test "easy_df_const (op)")))
+
+;; Extra constraints
+(define_constraint "Q"
+ "A symbolic address loadable when ld24."
+ (ior (and (match_test "TARGET_ADDR24")
+ (match_test "GET_CODE (op) == LABEL_REF"))
+ (match_test "addr24_operand (op, VOIDmode)")))
+
+(define_constraint "R"
+ "A symbolic address loadable with ld24 can't be used."
+ (ior (and (match_test "TARGET_ADDR32")
+ (match_test "GET_CODE (op) == LABEL_REF"))
+ (match_test "addr32_operand (op, VOIDmode)")))
+
+(define_constraint "S"
+ "A store with pre {inc,dec}rement."
+ (and (match_code "mem")
+ (match_test "STORE_PREINC_PREDEC_P (GET_MODE (op), XEXP (op, 0))")))
+
+(define_constraint "T"
+ "An indirect of a pointer."
+ (and (match_code "mem")
+ (match_test "memreg_operand (op, GET_MODE (op))")))
+
+(define_constraint "U"
+ "A load with post increment."
+ (and (match_code "mem")
+ (match_test "LOAD_POSTINC_P (GET_MODE (op), XEXP (op, 0))")))
+
+(define_constraint "W"
+ "zero immediate."
+ (and (match_code "const_int")
+ (match_test "ival == 0")))
+