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: sh64-elf (SH5) port


On Sun, Feb 03, 2002 at 08:18:28AM -0200, Alexandre Oliva wrote:
...
> The following change is necessary for SH5's TRAMPOLINE_ADJUST_ADDRESS
> to be able to reference add_optab.  This was necessary because I have
> to set the lowest bit of the trampoline address when generating a
> trampoline in SHmedia mode (the lowest bit of a function address is
> used to indicate whether it's in SHcompact of SHmedia mode):
...
> +#define TRAMPOLINE_ADJUST_ADDRESS(TRAMP) do				\
> +{									\
> +  if (TARGET_SH5)							\
> +    (TRAMP) = expand_binop (Pmode, add_optab, (TRAMP), GEN_INT (1),	\
> +			    gen_reg_rtx (Pmode), 0, OPTAB_LIB_WIDEN);	\
> +} while (0)
> +
> 
> I'd appreciate suggestions on other ways to overcome this problem.

You can use expand_simple_binop here: just change add_optab to PLUS.

zw


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