public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: pb@nexus.co.uk To: gcc-gnats@gcc.gnu.org Subject: target/7056: [ARM] zero extend code worse in 3.1 than 3.0 Date: Mon, 17 Jun 2002 07:00:00 -0000 [thread overview] Message-ID: <20020617130927.10569.qmail@sources.redhat.com> (raw) >Number: 7056 >Category: target >Synopsis: [ARM] zero extend code worse in 3.1 than 3.0 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: pessimizes-code >Submitter-Id: net >Arrival-Date: Mon Jun 17 06:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: pb@nexus.co.uk >Release: gcc-3.1 >Organization: >Environment: arm-linux >Description: See code below. With gcc-3.0 -O2, this yields stmfd sp!, {r4, lr} ldrb r3, [r0], #1 @ zero_extendqisi2 ldrb r4, [r0, #0] @ zero_extendqisi2 mov r0, r3 bl g mov r0, r4 @ Sibcall epilogue ldmfd sp!, {r4, lr} b g With gcc-3.1, there is an extra, redundant, AND instruction: stmfd sp!, {r4, lr} ldrb r3, [r0], #1 and r3, r3, #255 ldrb r4, [r0, #0] @ zero_extendqisi2 mov r0, r3 bl g mov r0, r4 @ Sibcall epilogue ldmfd sp!, {r4, lr} b g >How-To-Repeat: void f(unsigned char *p) { unsigned long int a,b; a = *p++; b = *p++; g(a); g(b); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-06-17 13:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-17 7:00 pb [this message] 2002-06-17 9:37 Richard Earnshaw
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=20020617130927.10569.qmail@sources.redhat.com \ --to=pb@nexus.co.uk \ --cc=gcc-gnats@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).