David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (call_operand): Allow LINK and COUNT
registers.
(symbol_ref_operand): New.
* config/rs6000/rs6000.h (PREDICATE_CODES): Add symbol_ref_operand.
* config/rs6000/rs6000.md (call_nonlocal_aix): Use symbol_ref_operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52231
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-04-12 Jan Hubicka <jh@suse.cz>
+ David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (call_operand): Allow LINK and COUNT
+ registers.
+ (symbol_ref_operand): New.
+ * config/rs6000/rs6000.h (PREDICATE_CODES): Add symbol_ref_operand.
+ * config/rs6000/rs6000.md (call_nonlocal_aix): Use symbol_ref_operand.
+
2002-04-12 Andreas Schwab <schwab@suse.de>
* config/ia64/ia64.h (ASM_SPEC): Moved from here ...
|| INTVAL (XEXP (XEXP (inner, 0), 1)) % 4 == 0));
}
+/* Return 1 if the operand, used inside a MEM, is a SYMBOL_REF. */
+
+int
+symbol_ref_operand (op, mode)
+ rtx op;
+ enum machine_mode mode;
+{
+ if (mode != VOIDmode && GET_MODE (op) != mode)
+ return 0;
+
+ return (GET_CODE (op) == SYMBOL_REF);
+}
+
/* Return 1 if the operand, used inside a MEM, is a valid first argument
- to CALL. This is a SYMBOL_REF or a pseudo-register, which will be
- forced to lr. */
+ to CALL. This is a SYMBOL_REF, a pseudo-register, LR or CTR. */
int
call_operand (op, mode)
return 0;
return (GET_CODE (op) == SYMBOL_REF
- || (GET_CODE (op) == REG && REGNO (op) >= FIRST_PSEUDO_REGISTER));
+ || (GET_CODE (op) == REG
+ && (REGNO (op) == LINK_REGISTER_REGNUM
+ || REGNO (op) == COUNT_REGISTER_REGNUM
+ || REGNO (op) >= FIRST_PSEUDO_REGISTER)));
}
/* Return 1 if the operand is a SYMBOL_REF for a function known to be in
{"mask64_operand", {CONST_INT, CONST_DOUBLE}}, \
{"count_register_operand", {REG}}, \
{"xer_operand", {REG}}, \
+ {"symbol_ref_operand", {SYMBOL_REF}}, \
{"call_operand", {SYMBOL_REF, REG}}, \
{"current_file_function_operand", {SYMBOL_REF}}, \
{"input_operand", {SUBREG, MEM, REG, CONST_INT, \
(set_attr "length" "8")])
(define_insn "*call_nonlocal_aix32"
- [(call (mem:SI (match_operand:SI 0 "call_operand" "s"))
+ [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s"))
(match_operand 1 "" "g"))
(use (match_operand:SI 2 "immediate_operand" "O"))
(clobber (match_scratch:SI 3 "=l"))]
(set_attr "length" "8")])
(define_insn "*call_nonlocal_aix64"
- [(call (mem:SI (match_operand:DI 0 "call_operand" "s"))
+ [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s"))
(match_operand 1 "" "g"))
(use (match_operand:SI 2 "immediate_operand" "O"))
(clobber (match_scratch:SI 3 "=l"))]
(define_insn "*call_value_nonlocal_aix32"
[(set (match_operand 0 "" "")
- (call (mem:SI (match_operand:SI 1 "call_operand" "s"))
+ (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s"))
(match_operand 2 "" "g")))
(use (match_operand:SI 3 "immediate_operand" "O"))
(clobber (match_scratch:SI 4 "=l"))]
(define_insn "*call_value_nonlocal_aix64"
[(set (match_operand 0 "" "")
- (call (mem:SI (match_operand:DI 1 "call_operand" "s"))
+ (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s"))
(match_operand 2 "" "g")))
(use (match_operand:SI 3 "immediate_operand" "O"))
(clobber (match_scratch:SI 4 "=l"))]