This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95 `switch' handling / bootstrap failure
- To: "Philippe De Muyter" <phdm at macqel dot be>
- Subject: Re: gcc-2.95 `switch' handling / bootstrap failure
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 02 Aug 1999 02:48:34 -0600
- cc: gcc-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199907192200.AAA29506@mail.macqel.be>you write:
> Since years, and up to egcs-1.1.2 included, switches were compiled on
> m68k-motorola-sysv as follows.
>
> mov.w 12(%pc,%d0.l*2),%d0 ;# 1102 movhi+1
> jmp 8(%pc,%d0.w) ;# 1104 tablejump+2
> swbeg &72
> L%L244:
> short L%L191-L%L244
> ...
>
> Note that there is no instruction between the table fetch and the jump,
> and that the offsets are given as constants in the `mov' and `jmp' instruct
> ions.
>
> Now with gcc-2.95, there are sometimes intervening instructions as follows
> :
>
> mov.w 12(%pc,%d0.l*2),%d0 ;# 1102 movhi+1
> mov.l %d3,%d5 ;# 1363 movsi+1/1 <<<<<<<
> addq.l &1,%d5 ;# 1288 *addsi3_internal/4 <<<<<<<
> jmp 8(%pc,%d0.w) ;# 1104 tablejump+2
> even
> swbeg &72
> L%L244:
> short L%L191-L%L244
> ...
>
> Of course, this prevents gcc-2.95 to bootstrap on m68k-motorola-sysv,
> because the native assembler can't cope with the solutions involving the
> table address label in the `mov' instruction.
>
> Does someone know why this has changed and how this could be fixed (perhaps
> with an appropriate target macro) ?
I doubt this was an intentional change. Use the debugging dumps to find out
where insns 1288 and 1104 were first introduced. That should tell you what
pass is messing things up.
jeffv