public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, microblaze]: Dont allow unsupported target rtx into call_internal1
@ 2013-02-11  6:41 David Holsgrove
  2013-03-04 15:27 ` Michael Eager
  0 siblings, 1 reply; 2+ messages in thread
From: David Holsgrove @ 2013-02-11  6:41 UTC (permalink / raw)
  To: gcc-patches
  Cc: Michael Eager (eager@eagercon.com),
	John Williams, Edgar E. Iglesias (edgar.iglesias@gmail.com),
	Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala, Tom Shui

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

Dont allow unsupported 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 <edgar.iglesias@gmail.com>

  * config/microblaze/predicates.md (call_insn_simple_operand):
     New predicate for supported rtx code types.
  * config/microblaze/microblaze.md (call_internal1): Use
     call_insn_simple_operand predicate.


[-- Attachment #2: 0011-microblaze-Dont-allow-unsuported-target-rtx-into-cal.patch --]
[-- Type: application/octet-stream, Size: 1977 bytes --]

From 687911f2ee9e6b0366b9cc81dd20e65183498f6b Mon Sep 17 00:00:00 2001
From: Edgar E. Iglesias <edgar.iglesias@gmail.com>
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 <edgar.iglesias@gmail.com>

  *  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 <edgar.iglesias@gmail.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch, microblaze]: Dont allow unsupported target rtx into call_internal1
  2013-02-11  6:41 [Patch, microblaze]: Dont allow unsupported target rtx into call_internal1 David Holsgrove
@ 2013-03-04 15:27 ` Michael Eager
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Eager @ 2013-03-04 15:27 UTC (permalink / raw)
  To: David Holsgrove
  Cc: gcc-patches, Michael Eager (eager@eagercon.com),
	John Williams, Edgar E. Iglesias (edgar.iglesias@gmail.com),
	Vinod Kathail, Vidhumouli Hunsigida, Nagaraju Mekala, Tom Shui

On 02/10/2013 10:40 PM, David Holsgrove wrote:
> Dont allow unsupported 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 <edgar.iglesias@gmail.com>
>
>    * config/microblaze/predicates.md (call_insn_simple_operand):
>       New predicate for supported rtx code types.
>    * config/microblaze/microblaze.md (call_internal1): Use
>       call_insn_simple_operand predicate.

Committed revision 196433.


-- 
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-04 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11  6:41 [Patch, microblaze]: Dont allow unsupported target rtx into call_internal1 David Holsgrove
2013-03-04 15:27 ` Michael Eager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).