public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* arithmetic standard pattern using only memory_operand
@ 2011-10-21 14:54 BELBACHIR Selim
  2011-10-21 16:20 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: BELBACHIR Selim @ 2011-10-21 14:54 UTC (permalink / raw)
  To: gcc

Hi,

My target has arithmetic instruction whose operands can ONLY be memory (offseted, post/pre inc, ...).

For example 'add' can only have a memory operand as its first operand :

add mem($C1), $C2, $C3



I tried to simply write the addsi3 pattern with using memory_operand as predicate for operand 2 but gcc often (always?) tries to use a register instead of memory and finally send the error message : 

unrecognizable insn :
set (reg:SI 0) (plus:SI (reg SI 1) (reg SI 2))


Is it possible to define arithmetic standard parttern with operands matched by memory_operand only ? How ?
Maybe I forgot a important MACRO in may <target>.h ?


	Regards,

		Selim

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

* Re: arithmetic standard pattern using only memory_operand
  2011-10-21 14:54 arithmetic standard pattern using only memory_operand BELBACHIR Selim
@ 2011-10-21 16:20 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2011-10-21 16:20 UTC (permalink / raw)
  To: BELBACHIR Selim; +Cc: gcc

On 10/21/2011 06:10 AM, BELBACHIR Selim wrote:
> Is it possible to define arithmetic standard parttern with operands matched by memory_operand only?

No.


r~

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

end of thread, other threads:[~2011-10-21 15:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21 14:54 arithmetic standard pattern using only memory_operand BELBACHIR Selim
2011-10-21 16:20 ` Richard Henderson

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