This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about GO_IF_LEGITIMIZE_ADDRESS


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]