Comments
Patch
===================================================================
@@ -1,5 +1,5 @@
;; Predicate definitions for IA-32 and x86-64.
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
;; Free Software Foundation, Inc.
;;
;; This file is part of GCC.
@@ -557,22 +565,27 @@
(match_operand 0 "immediate_operand")))
;; Test for a valid operand for indirect branch.
+;; Allow register operands in word mode only.
(define_predicate "indirect_branch_operand"
- (if_then_else (match_test "TARGET_X32")
- (match_operand 0 "register_operand")
- (match_operand 0 "nonimmediate_operand")))
+ (ior (match_test "register_operand
+ (op, mode == VOIDmode ? mode : word_mode)")
+ (and (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand"))))
;; Test for a valid operand for a call instruction.
+;; Allow register operands in word mode only.
(define_predicate "call_insn_operand"
(ior (match_operand 0 "constant_call_address_operand")
- (match_operand 0 "call_register_no_elim_operand")
+ (match_test "call_register_no_elim_operand
+ (op, mode == VOIDmode ? mode : word_mode)")
(and (not (match_test "TARGET_X32"))
(match_operand 0 "memory_operand"))))
;; Similarly, but for tail calls, in which we cannot allow memory references.
(define_predicate "sibcall_insn_operand"
(ior (match_operand 0 "constant_call_address_operand")
- (match_operand 0 "register_no_elim_operand")))
+ (match_test "register_no_elim_operand
+ (op, mode == VOIDmode ? mode : word_mode)")))
;; Match exactly zero.
(define_predicate "const0_operand"