This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH/RFC] m68k: add pc as register
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Roman Zippel <zippel at linux-m68k dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 09 Aug 2004 17:42:18 -0700
- Subject: Re: [PATCH/RFC] m68k: add pc as register
- References: <Pine.LNX.email@example.com>
Roman Zippel <firstname.lastname@example.org> writes:
> This is an experimental patch I'd like to get some comments on. The main
> purpose is to add the pc as another register, so it can be used in address
I can't comment on most of this, but ...
> Another issue is that on m68k a pc relative address must not appear
> as the destination of an operation. A rather simple solution would
> be to modify nonimmediate_operand to reject pc relative operands. Is
> it acceptable to add a hook to nonimmediate_operand() or is it
> better to replace nearly all of them within m68k.md?
I *think* you can get the effect you want from nonimmediate_operand by
giving the PC hard-register class NO_REGS.