This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: (i386-linux x sh-elf) More weak stack addressing
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: (i386-linux x sh-elf) More weak stack addressing
- From: Toshiyasu Morita <tm at netcom dot com>
- Date: Fri, 21 Jul 2000 16:43:07 -0700 (PDT)
- cc: gcc at gcc dot gnu dot org
On Thu, 20 Jul 2000, Joern Rennecke wrote:
> > On Thu, Jul 20, 2000 at 03:06:35PM -0700, Toshiyasu Morita wrote:
> >
> > > Maybe I'm missing something, but it seems peeking beyond labels is
> > > extremely important for the Hitachi SH. Forgive me for overexplaining
> > > a bit - I'm basically explaining my assumptions to see if people
> > > can spot any glaring oversights.
> > >
> > > Consider:
> > >
> > > The SH uses pc-relative addressing to load large constants,
> > > therefore it generates literal pools in the .text segment. These
> > > literal pools must be "jumped around" to continue execution.
>
> But they don't exist yet at reload time. They are generated in a later
> pass.
Doh! Okay.
I noticed this patch has already been applied to CVS...I'm still seeing
a few more problems in advmilitary.i from stress-1.15 compiled with -O2
-m4-single-only -ml:
1580 073c 7CE1 mov #124,r1 <- here
1581 073e 7CE0 mov #124,r0 <- here
1582 0740 EC31 add r14,r1 <- here
1583 0742 1453 mov.l @(16,r1),r3
1584 0744 EC30 add r14,r0 <- here
1585 0746 9191 mov.w .L255,r1
1586 0748 3152 mov.l @(4,r3),r2
1589 074a 3355 mov.l @(12,r3),r5
1592 074c 1702 mul.l r1,r2
1595 074e 3254 mov.l @(8,r3),r4
1598 0750 1A01 sts macl,r1
1599 0752 AC31 add r10,r1
1600 0754 1C10 mov.l r1,@(48,r0)
1603 0756 4BD1 mov.l .L256,r1
1604 0758 0B41 jsr @r1
1605 075a 0900 nop
...
3599:./advmilitary.i **** { struct genlist_iterator myiter; struct
city * acity ; genlist_iterator_init(&myiter, & apl
1843 08c8 7CE2 mov #124,r2 <- here
1844 08ca 60D1 mov.l .L273,r1
1845 08cc EC32 add r14,r2 <- here
1846 08ce E36B mov r14,r11 <- here
1847 08d0 2B55 mov.l @(44,r2),r5
1848 08d2 7C7B add #124,r11 <- here
1849 08d4 00E6 mov #0,r6
1850 08d6 FC7F add #-4,r15
1851 08d8 B364 mov r11,r4
1852 08da 0B41 jsr @r1
1853 08dc 6075 add #96,r5
1854 08de B151 mov.l @(4,r11),r1
1855 08e0 1251 mov.l @(8,r1),r1
1856 08e2 1821 tst r1,r1
1857 08e4 028F bf.s .L365
1858 08e6 047F add #4,r15
1859 08e8 A0A1 bra .L368
1860 08ea 7CE1 mov #124,r1
...
3456 128c 7CE2 mov #124,r2 <- here
3457 128e 7CE1 mov #124,r1 <- here
3458 1290 1293 mov.w .L350,r3
3459 1292 EC31 add r14,r1 <- here
3460 1294 EC32 add r14,r2 <- here
3461 1296 1450 mov.l @(16,r1),r0
3756:./advmilitary.i **** return(urgency);
3757:./advmilitary.i **** }
3464 1298 747E add #116,r14
3467 129a 2E52 mov.l @(56,r2),r2
3470 129c 787E add #120,r14
3473 129e 2603 mov.l r2,@(r0,r3)
3476 12a0 2360 mov r2,r0
3479 12a2 E36F mov r14,r15
3480 12a4 264F lds.l @r15+,pr
3481 12a6 F66E mov.l @r15+,r14
3482 12a8 F66D mov.l @r15+,r13
3483 12aa F66C mov.l @r15+,r12
3484 12ac F66B mov.l @r15+,r11
3485 12ae F66A mov.l @r15+,r10
3486 12b0 F669 mov.l @r15+,r9
3487 12b2 0B00 rts
3488 12b4 F668 mov.l @r15+,r8
...
4212:./advmilitary.i **** struct unit virtualunit;
4213:./advmilitary.i **** struct city *acity = 0;
7850 2c30 E362 mov r14,r2
7853 2c32 EC31 add r14,r1
7856 2c34 7072 add #112,r2
7859 2c36 0211 mov.l r0,@(8,r1)
7862 2c38 2511 mov.l r2,@(20,r1)
7863 2c3a 7CE1 mov #124,r1 <- here
7864 2c3c EC31 add r14,r1 <- here
7865 2c3e 1152 mov.l @(4,r1),r2
7866 2c40 A991 mov.w .L872,r1
7867 2c42 EC31 add r14,r1
7868 2c44 1261 mov.l @r1,r1
7869 2c46 2221 mov.l r2,@r1
4214:./advmilitary.i **** struct unit *aunit = 0;
7872 2c48 E362 mov r14,r2
7873 2c4a 7CE1 mov #124,r1 <- here
7874 2c4c 6C72 add #108,r2
7875 2c4e EC31 add r14,r1 <- here
7876 2c50 2411 mov.l r2,@(16,r1)
7877 2c52 7CE1 mov #124,r1 <- here
7878 2c54 EC31 add r14,r1 <- here
7879 2c56 1152 mov.l @(4,r1),r2
7880 2c58 9E91 mov.w .L873,r1
Toshi