;; Operand and operator predicates for the GCC MMIX port.
-;; Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2013 Free Software Foundation, Inc.
;; This file is part of GCC.
;;
return 1;
/* Fall through. */
default:
- return address_operand (op, mode);
+ return mmix_address_operand (op, mode);
}
})
(ior
(match_operand 0 "register_operand")
(and (match_code "const_int")
- (match_test "CONST_OK_FOR_LETTER_P (INTVAL (op), 'I')"))))
+ (match_test "satisfies_constraint_I (op)"))))
+
+;; True if this is a memory address, possibly strictly.
+;; See also comment above the "*call_real" pattern.
+
+(define_predicate "mmix_address_operand"
+ (if_then_else (match_test "reload_in_progress || reload_completed")
+ (match_test "strict_memory_address_p (Pmode, op)")
+ (match_test "memory_address_p (Pmode, op)")))
+
+(define_predicate "frame_pointer_operand"
+ (ior
+ (and
+ (match_code "reg")
+ (match_test "op == hard_frame_pointer_rtx || op == frame_pointer_rtx"))
+ (and
+ (match_code "plus")
+ (match_code "reg" "0")
+ (match_code "const_int" "1")
+ (match_test "XEXP (op, 0) == stack_pointer_rtx"))))