This is the mail archive of the gcc-bugs@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]

(i386-linux x sh-elf) stack-rel pointers in stack slots


version: CVS
   host: i386-linux
 target: sh-elf
   opts: -O2 -m4-single-only -ml -S -g

I've mentioned this before, but I'll mention it again.

GCC runs out of registers, so it starts spilling to the stack.
Each time it spills/restores, it needs the address of the stack slot,
and so it spills/restores the address of the stack slots to stack slots
as well. Doh!

1594:./slalom.i    ****                         for (jpatch=loop[jface][0] ; jpatch <= loop[jface][1] ; jpatch++) {
 1815                   .LM271:
 1816 08b2 6CE0                 mov     #108,r0
 1817 08b4 EC30                 add     r14,r0
 1818                   .L278:
 1819 08b6 0260                 mov.l   @r0,r0
 1820 08b8 0261                 mov.l   @r0,r1
 1821 08ba 40E0                 mov     #64,r0
 1822 08bc EC30                 add     r14,r0
 1823 08be 0B52                 mov.l   @(44,r0),r2
 1824 08c0 1510                 mov.l   r1,@(20,r0)
 1825 08c2 2151                 mov.l   @(4,r2),r1
 1826 08c4 0553                 mov.l   @(20,r0),r3
 1827 08c6 1733                 cmp/gt  r1,r3
 1828 08c8 028F                 bf.s    .L270
 1829 08ca E367                 mov     r14,r7
 1830 08cc 88A1                 bra     .L273
 1831 08ce 40E6                 mov     #64,r6
 1832                   .L270:
 1833 08d0 E365                 mov     r14,r5
 1834 08d2 E366                 mov     r14,r6
 1835 08d4 E369                 mov     r14,r9
 1836 08d6 2075                 add     #32,r5
 1837 08d8 7CE1                 mov     #124,r1
 1838 08da 3076                 add     #48,r6
 1839 08dc 5C10                 mov.l   r5,@(48,r0)     <- r14 + 32 at r14 + 112
 1840 08de 2877                 add     #40,r7
 1841 08e0 6E10                 mov.l   r6,@(56,r0)     <- r14 + 48 at r14 + 120
 1842 08e2 3879                 add     #56,r9
 1843 08e4 7D10                 mov.l   r7,@(52,r0)     <- r14 + 40 at r14 + 116
 1844 08e6 40E5                 mov     #64,r5
 1845 08e8 9F10                 mov.l   r9,@(60,r0)     <- r14 + 56 at r14 + 124
...
1606:./slalom.i    ****                                 for (m = 0 ; m < 2 ; m++) {
 1985 099c 00E6                 mov     #0,r6
 1988 099e 17FE                 fmov.s  fr1,@(r0,r14)
 1991 09a0 40E0                 mov     #64,r0
 1992 09a2 EC30                 add     r14,r0
 1993 09a4 0C52                 mov.l   @(48,r0),r2     <- read r14 + 112 to get r14 + 32
,,,
1619:./slalom.i    ****                                                 tmp2 = -4.0 * tmp4 * tmp8 - tmp2 - tmp6 *
 2123 0a36 78E1                 mov     #120,r1
 2124 0a38 74E5                 mov     #116,r5
 2125 0a3a EC31                 add     r14,r1
 2126 0a3c 70E7                 mov     #112,r7
 2127 0a3e EC35                 add     r14,r5
 2128 0a40 1261                 mov.l   @r1,r1          <- read r14 + 120 to get r14 + 48
 2129 0a42 EC37                 add     r14,r7
 2130 0a44 08A0                 bra     .L244
 2131 0a46 5265                 mov.l   @r5,r5          <- read r14 + 116 to get r14 + 40


Toshi


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