public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* on nios2 difine_insn indirect_call
@ 2005-07-18  6:48 Liu Haibin
  0 siblings, 0 replies; 2+ messages in thread
From: Liu Haibin @ 2005-07-18  6:48 UTC (permalink / raw)
  To: gcc

Hi, 

The nios2.md has a define_insn "indirect_call"

(define_insn "indirect_call"
  [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
         (match_operand 1 "" ""))
   (clobber (reg:SI RA_REGNO))]
  ""
  "callr\\t%0"
  [(set_attr "type" "control")])

But I find that in test.c.26.flow2, there is such a code.

(call_insn 41 37 42 1 0x101e17b0 (parallel [
            (call (mem:QI (reg/f:SI 3 r3 [58]) [0 S1 A8])
                (const_int 0 [0x0]))
            (clobber (reg:SI 31 ra))
        ]) 41 {indirect_call} (insn_list 40 (insn_list 39 (nil)))
    (expr_list:REG_DEAD (reg:SI 4 r4)
        (expr_list:REG_DEAD (reg/f:SI 3 r3 [58])
            (expr_list:REG_UNUSED (reg:SI 31 ra)
                (nil))))
    (expr_list (use (reg:SI 4 r4))
        (nil)))

Why is there a "parallel" for indirect_call in .26.flow2 but no
"parallel" in define_insn indirect_call? Does it mean that the
"define_insn indirect_call" in md file impilcitly has "parallel"
surrounding it?


Regards,
Timothy

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

* RE: on nios2 difine_insn indirect_call
@ 2005-07-18  8:57 Jonah Graham
  0 siblings, 0 replies; 2+ messages in thread
From: Jonah Graham @ 2005-07-18  8:57 UTC (permalink / raw)
  To: liu.haibin; +Cc: gcc

Hi Timothy, 

Unfortunately the Nios II port of GCC is not (yet) in the gcc tree so
most people don't have access to it.

The reason it is parallel is that if define_insn contains more than one
element, that defines a parallel. Have a look at:
http://gcc.gnu.org/onlinedocs/gccint/Patterns.html

Jonah

=================================
jgraham@altera.com
Altera European Technology Centre
www.altera.com/nios2 

	


	-------- Original Message -------- 
	Subject: 	on nios2 difine_insn indirect_call	
	Date: 	Mon, 18 Jul 2005 14:47:59 +0800	
	From: 	Liu Haibin <liu.haibin@gmail.com>
<mailto:liu.haibin@gmail.com> 	
	Reply-To: 	Liu Haibin <liu.haibin@gmail.com>
<mailto:liu.haibin@gmail.com> 	
	To: 	gcc@gcc.gnu.org	


	Hi, 
	
	The nios2.md has a define_insn "indirect_call"
	
	(define_insn "indirect_call"
	  [(call (mem:QI (match_operand:SI 0 "register_operand" "r"))
	         (match_operand 1 "" ""))
	   (clobber (reg:SI RA_REGNO))]
	  ""
	  "callr\\t%0"
	  [(set_attr "type" "control")])
	
	But I find that in test.c.26.flow2, there is such a code.
	
	(call_insn 41 37 42 1 0x101e17b0 (parallel [
	            (call (mem:QI (reg/f:SI 3 r3 [58]) [0 S1 A8])
	                (const_int 0 [0x0]))
	            (clobber (reg:SI 31 ra))
	        ]) 41 {indirect_call} (insn_list 40 (insn_list 39
(nil)))
	    (expr_list:REG_DEAD (reg:SI 4 r4)
	        (expr_list:REG_DEAD (reg/f:SI 3 r3 [58])
	            (expr_list:REG_UNUSED (reg:SI 31 ra)
	                (nil))))
	    (expr_list (use (reg:SI 4 r4))
	        (nil)))
	
	Why is there a "parallel" for indirect_call in .26.flow2 but no
	"parallel" in define_insn indirect_call? Does it mean that the
	"define_insn indirect_call" in md file impilcitly has "parallel"
	surrounding it?
	
	
	Regards,
	Timothy
	
	


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

end of thread, other threads:[~2005-07-18  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-18  6:48 on nios2 difine_insn indirect_call Liu Haibin
2005-07-18  8:57 Jonah Graham

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).