public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Dara Hazeghi <dhazeghi@yahoo.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/8867: [sh] wrong code: double use of register Date: Sat, 10 May 2003 09:16:00 -0000 [thread overview] Message-ID: <20030510091601.768.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/8867; it has been noted by GNATS. From: Dara Hazeghi <dhazeghi@yahoo.com> To: gcc-gnats@gcc.gnu.org, marcus@mc.pp.se Cc: Subject: Re: optimization/8867: [sh] wrong code: double use of register Date: Sat, 10 May 2003 02:06:17 -0700 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gcc&pr=8867 Hello, could the submitter please determine whether more current versions of gcc (ie 3.3 prerelease) generate valid code? I checked with 3.2.3, but the code it generated seems pretty much identical to the (wrong) code generated by 3.2.1. With 3.3, I get something a bit different, and mainline cvs gives something even more different. So if the submitter could determine if those are correct, it would be greatly appreciated. Thanks, Dara code generated by 3.3: .file "junk.c" .text .text .align 1 .global _foo .type _foo, @function _foo: mov.l r8,@-r15 mov.l r9,@-r15 mov.l r10,@-r15 mov.l r11,@-r15 mov.l r12,@-r15 mov.l r13,@-r15 mov.l r14,@-r15 sts.l pr,@-r15 add #-84,r15 mov r15,r14 mov #64,r0 mov.l r4,@(r0,r14) mov r5,r13 mov r6,r12 mov.l @r12+,r0 tst r0,r0 bt .L3 .L7: shll2 r0 mov.l .L9,r1 mov.l @(r0,r1),r1 mov #64,r2 add r14,r2 mov.l r1,@(4,r2) mov.l .L10,r1 mov.l @(r0,r1),r8 mov.l .L11,r1 mov.l @(r0,r1),r10 mov.l .L12,r1 mov.l @(r0,r1),r11 mov.l .L13,r1 mov.l @(r0,r1),r1 mov.l r1,@(8,r2) mov.l .L14,r1 mov.l @(r0,r1),r1 mov.l r1,@(12,r2) mov.l @(4,r2),r1 tst r1,r1 bt .L5 mov.l @(0,r2),r4 add r11,r4 mov r13,r1 add r8,r1 mov.l r1,@(16,r2) mov.l .L20,r2 jsr @r2 mov r1,r5 mov #64,r0 mov.l @(r0,r14),r9 add r8,r9 mov.l @(r0,r14),r8 add r10,r8 mov r9,r4 mov.l .L20,r2 jsr @r2 mov r8,r5 mov r9,r10 add r11,r10 mov r10,r4 mov.l .L20,r1 jsr @r1 mov r8,r5 mov #72,r0 mov.l @(r0,r14),r2 add r2,r8 mov r9,r4 mov.l .L20,r1 jsr @r1 mov r8,r5 mov r10,r4 mov.l .L20,r2 jsr @r2 mov r8,r5 mov #64,r1 add r14,r1 mov.l @(4,r1),r5 add r11,r5 mov.l .L20,r2 jsr @r2 mov.l @(16,r1),r4 .L5: mov #64,r1 add r14,r1 mov.l @(0,r1),r2 mov.l @(12,r1),r1 add r1,r2 mov #64,r1 add r14,r1 mov.l r2,@(0,r1) mov.l @(12,r1),r2 sub r2,r13 cmp/pl r13 bf .L3 mov.l @r12+,r0 tst r0,r0 bf .L7 .L3: add #84,r14 mov r14,r15 lds.l @r15+,pr mov.l @r15+,r14 mov.l @r15+,r13 mov.l @r15+,r12 mov.l @r15+,r11 mov.l @r15+,r10 mov.l @r15+,r9 rts mov.l @r15+,r8 .L21: .align 2 .L9: .long _g1 .L10: .long _g3 .L11: .long _g4 .L12: .long _g5 .L13: .long _g6 .L14: .long _g7 .L20: .long _bar .size _foo, .-_foo .ident "GCC: (GNU) 3.3 20030509 (prerelease)" Code generated by 3.4: .file "junk.c" .text .text .align 1 .global _foo .type _foo, @function _foo: mov.l r8,@-r15 mov.l r9,@-r15 mov.l r10,@-r15 mov.l r11,@-r15 mov.l r12,@-r15 mov.l r13,@-r15 mov.l r14,@-r15 sts.l pr,@-r15 add #-88,r15 mov r15,r14 mov r4,r11 mov r5,r12 mov #64,r0 mov r6,r2 add #4,r2 mov.l r2,@(r0,r14) add #-4,r2 mov.l @r2+,r0 .L8: tst r0,r0 bt .L3 shll2 r0 mov.l .L9,r1 mov.l @(r0,r1),r1 mov #64,r2 add r14,r2 mov.l r1,@(4,r2) mov.l .L10,r1 mov.l @(r0,r1),r8 mov.l .L11,r1 mov.l @(r0,r1),r1 mov.l r1,@(8,r2) mov.l .L12,r1 mov.l @(r0,r1),r13 mov.l .L13,r1 mov.l @(r0,r1),r1 mov.l r1,@(12,r2) mov.l .L14,r1 mov.l @(r0,r1),r10 mov.l @(4,r2),r1 tst r1,r1 bt .L4 mov r12,r1 add r8,r1 mov.l r1,@(16,r2) mov r11,r4 add r13,r4 mov.l .L20,r2 jsr @r2 mov r1,r5 mov r11,r9 add r8,r9 mov #72,r0 mov.l @(r0,r14),r8 add r11,r8 mov r9,r4 mov.l .L20,r2 jsr @r2 mov r8,r5 mov r9,r2 add r13,r2 mov #84,r0 mov.l r2,@(r0,r14) mov r2,r4 mov.l .L20,r1 jsr @r1 mov r8,r5 mov #76,r0 mov.l @(r0,r14),r2 add r2,r8 mov r9,r4 mov.l .L20,r1 jsr @r1 mov r8,r5 mov #84,r0 mov.l @(r0,r14),r4 mov.l .L20,r1 jsr @r1 mov r8,r5 mov #64,r2 add r14,r2 mov.l @(16,r2),r4 mov.l @(4,r2),r5 mov.l .L20,r1 jsr @r1 add r13,r5 .L4: add r10,r11 sub r10,r12 cmp/pl r12 bf .L3 mov #64,r0 mov.l @(r0,r14),r1 add #4,r1 mov.l r1,@(r0,r14) add #-4,r1 bra .L8 mov.l @r1+,r0 .align 1 .L3: add #88,r14 mov r14,r15 lds.l @r15+,pr mov.l @r15+,r14 mov.l @r15+,r13 mov.l @r15+,r12 mov.l @r15+,r11 mov.l @r15+,r10 mov.l @r15+,r9 rts mov.l @r15+,r8 .L21: .align 2 .L9: .long _g1 .L10: .long _g3 .L11: .long _g4 .L12: .long _g5 .L13: .long _g6 .L14: .long _g7 .L20: .long _bar .size _foo, .-_foo .ident "GCC: (GNU) 3.4 20030509 (experimental)"
next reply other threads:[~2003-05-10 9:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-10 9:16 Dara Hazeghi [this message] 2003-05-10 16:36 Marcus Comstedt 2003-05-10 19:46 Dara Hazeghi 2003-05-12 11:28 giovannibajo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030510091601.768.qmail@sources.redhat.com \ --to=dhazeghi@yahoo.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).