This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about GO_IF_LEGITIMIZE_ADDRESS
- From: Richard Henderson <rth at redhat dot com>
- To: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 18 Feb 2002 15:44:57 -0800
- Subject: Re: Question about GO_IF_LEGITIMIZE_ADDRESS
- References: <200202181627.g1IGR2229200@hyper.wm.sps.mot.com>
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~