Understanding Predicate and Constrains

Omar gcc.omar@gmail.com
Mon Apr 7 22:00:00 GMT 2008

 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

More information about the Gcc-help mailing list