Re: Seeking suggestion

2009-05-27 Thread Jamie Prescott
From: Jim Wilson wil...@codesourcery.com To: Jamie Prescott jpre...@yahoo.com Cc: Georg-Johann Lay a...@gjlay.de; Ian Lance Taylor i...@google.com; gcc@gcc.gnu.org Sent: Tuesday, May 26, 2009 7:47:45 PM Subject: Re: Seeking suggestion Jamie Prescott wrote: Is there a reason why

Re: Seeking suggestion

2009-05-27 Thread Jamie Prescott
From: Jamie Prescott jpre...@yahoo.com To: Jim Wilson wil...@codesourcery.com Cc: Georg-Johann Lay a...@gjlay.de; Ian Lance Taylor i...@google.com; gcc@gcc.gnu.org Sent: Wednesday, May 27, 2009 10:12:42 AM Subject: Re: Seeking suggestion Thanks for the explanation. I somehow thought

Re: Seeking suggestion

2009-05-27 Thread Eric Botcazou
Thanks for the explanation. I somehow thought that every insn spit out by a define_insn was automatically turned into a parallel. That's true, the template of a define_insn is automatically wrapped up in a PARALLEL. But your addsi3 is a define_expand and this works differently. -- Eric

Re: Seeking suggestion

2009-05-27 Thread Jamie Prescott
From: Eric Botcazou ebotca...@adacore.com To: Jamie Prescott jpre...@yahoo.com Cc: gcc@gcc.gnu.org; Jim Wilson wil...@codesourcery.com; Georg-Johann Lay a...@gjlay.de; Ian Lance Taylor i...@google.com Sent: Wednesday, May 27, 2009 10:37:24 AM Subject: Re: Seeking suggestion Thanks

Re: Seeking suggestion

2009-05-27 Thread Georg-Johann Lay
Jamie Prescott schrieb: Thanks for the explanation. I somehow thought that every insn spit out by a define_insn was automatically turned into a parallel. That's true, the template of a define_insn is automatically wrapped up in a PARALLEL. But your addsi3 is a define_expand and this works

Re: Seeking suggestion

2009-05-27 Thread Jamie Prescott
From: Georg-Johann Lay a...@gjlay.de To: Jamie Prescott jpre...@yahoo.com Cc: Eric Botcazou ebotca...@adacore.com; gcc@gcc.gnu.org; Jim Wilson wil...@codesourcery.com; Ian Lance Taylor i...@google.com Sent: Wednesday, May 27, 2009 12:11:08 PM Subject: Re: Seeking suggestion Jamie

Re: Seeking suggestion

2009-05-26 Thread Jim Wilson
Jamie Prescott wrote: Is there a reason why something like this would not work? if (!TARGET_XXX2) emit_clobber(gen_rtx_REG(CCmode, CC_REGNUM)); emit_insn(gen_addsi3_nc(operands[0], operands[1], operands[2])); Yes. The optimizer will not know that addsi3_nc uses CC_REGNUM, as it

Re: Seeking suggestion

2009-05-25 Thread Jamie Prescott
From: Michael Meissner meiss...@linux.vnet.ibm.com To: Jamie Prescott jpre...@yahoo.com Cc: gcc@gcc.gnu.org Sent: Sunday, May 24, 2009 1:57:19 PM Subject: Re: Seeking suggestion One way is to use match_scratch, and different register classes for the two cases. (define_insn add3

Re: Seeking suggestion

2009-05-24 Thread Georg-Johann Lay
Jamie Prescott schrieb: Is there a reason why something like this would not work? (define_insn addsi3_nc [(set (match_operand:SI 0 fullreg_operand =r) (plus:SI (match_operand:SI 1 fullreg_operand r) (match_operand:SI 2 fullreg_or_imm_operand rn)))] ... )

Re: Seeking suggestion

2009-05-24 Thread Michael Meissner
On Fri, May 22, 2009 at 05:04:22PM -0700, Jamie Prescott wrote: From: Jamie Prescott jpre...@yahoo.com To: gcc@gcc.gnu.org Sent: Friday, May 22, 2009 10:36:47 AM Subject: Seeking suggestion Suppose you're writing the backend for a VM supporting two architectures, in which

Re: Seeking suggestion

2009-05-23 Thread Georg-Johann Lay
Jamie Prescott schrieb: Is the implementation I posted the only one, or there are shorter/better ones? You could use insn attribute to express insns' effects on cc_status. Have a look at the avr backend. Georg-Johann

Re: Seeking suggestion

2009-05-23 Thread Jamie Prescott
From: Georg-Johann Lay a...@gjlay.de To: Jamie Prescott jpre...@yahoo.com Cc: Ian Lance Taylor i...@google.com; gcc@gcc.gnu.org Sent: Saturday, May 23, 2009 12:05:09 AM Subject: Re: Seeking suggestion Jamie Prescott schrieb: Is the implementation I posted the only one

Seeking suggestion

2009-05-22 Thread Jamie Prescott
Suppose you're writing the backend for a VM supporting two architectures, in which one of them clobbers the CC registers for certain instructions, while the other does not. The instructions themselves are exactly the same. What is the best/shortest/more-elegant way to write this, possibly w/out

Re: Seeking suggestion

2009-05-22 Thread Jamie Prescott
From: Jamie Prescott jpre...@yahoo.com To: gcc@gcc.gnu.org Sent: Friday, May 22, 2009 10:36:47 AM Subject: Seeking suggestion Suppose you're writing the backend for a VM supporting two architectures, in which one of them clobbers the CC registers for certain instructions, while

Re: Seeking suggestion

2009-05-22 Thread Ian Lance Taylor
Jamie Prescott jpre...@yahoo.com writes: But now I get and invalid rtx sharing from the push/pop parallels: This normally means that you need a copy_rtx somewhere. Different insns may not share data structure. Ian

Re: Seeking suggestion

2009-05-22 Thread Jamie Prescott
From: Ian Lance Taylor i...@google.com To: Jamie Prescott jpre...@yahoo.com Cc: gcc@gcc.gnu.org Sent: Friday, May 22, 2009 5:45:21 PM Subject: Re: Seeking suggestion Jamie Prescott writes: But now I get and invalid rtx sharing from the push/pop parallels: This normally means