[PATCH/RFC] m68k: add pc as register

Zack Weinberg zack@codesourcery.com
Tue Aug 10 01:00:00 GMT 2004


Roman Zippel <zippel@linux-m68k.org> writes:

> Hi,
>
> 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 
> operations.

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.

zw



More information about the Gcc-patches mailing list