From 687911f2ee9e6b0366b9cc81dd20e65183498f6b Mon Sep 17 00:00:00 2001 From: Edgar E. Iglesias Date: Fri, 20 Apr 2012 01:48:27 +0200 Subject: [PATCH] microblaze: Dont allow unsuported target rtx into call_internal1 Fix it by adding a simplified call_insn_operand, call_insn_simple_operand that only accepts the supported rtx code types. Changelog 2013-02-11 Edgar E. Iglesias * gcc/config/microblaze/predicates.md (call_insn_simple_operand): New predicate for supported rtx code types. * gcc/config/microblaze/microblaze.md (call_internal1): Use call_insn_simple_operand predicate. Signed-off-by: Edgar E. Iglesias --- gcc/config/microblaze/microblaze.md | 2 +- gcc/config/microblaze/predicates.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md index 49e7fb1..a24a20c 100644 --- a/gcc/config/microblaze/microblaze.md +++ b/gcc/config/microblaze/microblaze.md @@ -2031,7 +2031,7 @@ (set_attr "length" "4")]) (define_insn "call_internal1" - [(call (mem (match_operand:SI 0 "call_insn_operand" "ri")) + [(call (mem (match_operand:SI 0 "call_insn_simple_operand" "ri")) (match_operand:SI 1 "" "i")) (clobber (reg:SI R_SR))] "" diff --git a/gcc/config/microblaze/predicates.md b/gcc/config/microblaze/predicates.md index 9bf9810..e6e9983 100644 --- a/gcc/config/microblaze/predicates.md +++ b/gcc/config/microblaze/predicates.md @@ -49,6 +49,10 @@ (define_predicate "call_insn_operand" (match_test "CALL_INSN_OP (op)")) +(define_predicate "call_insn_simple_operand" + (and (match_test "CALL_INSN_OP (op)") + (match_test "GET_CODE (op) == REG || GET_CODE (op) == SYMBOL_REF || GET_CODE (op) == CONST_INT"))) + ;; Return if OPERAND is valid as a source operand for a move instruction. (define_predicate "move_operand" (and ( -- 1.7.3.2