public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Understanding Predicate and Constrains
@ 2008-04-07 22:00 Omar
  2008-04-08 17:53 ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Omar @ 2008-04-07 22:00 UTC (permalink / raw)
  To: gcc-help

Hi,
 I am trying to understand predicate and constraints. To this end, I
created a simple define_insn :
(define_insn "movqi"
  [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r,r,>,<,r")
	 (match_operand:QI 1 "general_operand" 	          "r,m,r,>,<,r,r,i"))]
  ""
  "@
   move.b %0,%1; <movqi reg := reg>
   move.b %0,%1; <movqi reg := mem>
   move.b %0,%1; <movqi mem := reg>
   move.b %0,%1; <movqi reg := mem with autoincrement>
   move.b %0,%1; <movqi reg := mem with autodecrement>
   move.b %0,%1; <movqi mem with autoincrement := reg>
   move.b %0,%1; <movqi mem with autodecrement := reg>
   move.b %0,%1; <movqi reg := const>")

My questions are:
1) How '>' really work, am i using it correctly or do I need to use it
with another another constraint (like 'm>')?
   1.1) Which file should I load while debugging to understand how
constrains are being use?
2) How I limit the 'i' constraint so that only constants below or
equal to 255 are allowed?

Thanks in advance for your help!
Regards, -Omar

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

end of thread, other threads:[~2008-04-11 15:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-07 22:00 Understanding Predicate and Constrains Omar
2008-04-08 17:53 ` Jim Wilson
     [not found]   ` <178adb870804081024n6c055d2boab4bed7750f5b16d@mail.gmail.com>
2008-04-08 19:52     ` Omar
2008-04-08 22:15       ` Omar
2008-04-11 19:13       ` Jim Wilson

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