http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57583

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Mikael Pettersson from comment #3)
> It's not too difficult to make the m68k backend use 32-bit offsets in its
> jump tables (adjust CASE_VECTOR_MODE, ASM_OUTPUT_ADDR_DIFF_ELT,
> ASM_RETURN_CASE_JUMP, drop the sign-extend from the tablejump expander,
> likewise in the unnamed insn that matches the output from the tablejump
> expander).  I have a crude patch to do that,

Does your patch define CASE_VECTOR_SHORTEN_MODE?
Otherwise that'll probably be one of the first review comments.

> and make it compile-time
> selectable via an option.

FWIW, -mbigtable for sh.

> However, it seems to me that the compiler should be able to figure out for
> itself if a given jump table might need 32-bit offsets.

The length insn attribute needs to be defined in order to take advantage of the
existing machinery.  It seems it currently isn't, for m68k.

Reply via email to