Question about GO_IF_LEGITIMIZE_ADDRESS

Richard Henderson rth@redhat.com
Mon Feb 18 16:16:00 GMT 2002


There's no way to remove addressing modes on a per-insn basis.

You can attempt games with EXTRA_CONSTRAINTS, but that doesn't
tend to work out terribly well when reload can't figure out how
to fix up the address.

You can attempt games by which you match the mem and address
explicitly, e.g.

  [(set (zero_extract:SI
	  (mem:QI (match_operand:SI 0 "register_operand" "a"))
          (const_int 1)
          (minus:SI (const_int 7) (match_operand:SI 1 "general_operand" "d")))
        (const_int 0))]

  [(set (zero_extract:SI
	  (mem:QI (plus:SI
		    (match_operand:SI 0 "register_operand" "a")
		    (match_operand:SI 1 "nonmemory_operand" "id")))
          (const_int 1)
          (minus:SI (const_int 7) (match_operand:SI 1 "general_operand" "d")))
        (const_int 0))]

  ...

which tends to work out slightly better, but is going to be
really irritating with m68k addressing modes, since you'll
need about 8 patterns per insn.


r~



More information about the Gcc mailing list