This is the mail archive of the gcc-patches@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: [PATCH/RFC] m68k: add pc as register


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


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