public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ramana at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/42499] Bad register allocation in multiplication code by constant
Date: Tue, 05 Jan 2010 18:28:00 -0000	[thread overview]
Message-ID: <20100105182835.20582.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42499-17572@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from ramana at gcc dot gnu dot org  2010-01-05 18:28 -------
Why is there no load of tv.tv_usec in the code generated that you've pasted?
Are you sure you've pasted this right ? 

With 4.4 arm-eabi - 17/12/2009 snapshot I see the following code ?

for -march=armv5te -mthumb -Os . Are you sure you have given the right options
here ? 



        .arch armv5te
        .fpu softvfp
        .eabi_attribute 20, 1
        .eabi_attribute 21, 1
        .eabi_attribute 23, 3
        .eabi_attribute 24, 1
        .eabi_attribute 25, 1
        .eabi_attribute 26, 1
        .eabi_attribute 30, 4
        .eabi_attribute 18, 4
        .code   16
        .file   "t.c"
        .global __aeabi_idiv
        .text
        .align  2
        .global test
        .code   16
        .thumb_func
        .type   test, %function
test:
        push    {r4, r5, r6, r7, lr}
        sub     sp, sp, #28
        add     r4, sp, #16
        str     r0, [sp, #12]
        mov     r0, r4
        bl      get_time
        mov     r1, #250
        ldr     r0, [r4, #4]
        lsl     r1, r1, #2
        bl      __aeabi_idiv
        ldr     r7, [sp, #16]
        mov     r3, r7
        asr     r7, r7, #31
        mov     r4, r7
        lsl     r7, r7, #5
        lsr     r1, r3, #27
        mov     r2, r7
        orr     r2, r2, r1
        str     r2, [sp, #4]
        mov     r5, r0
        asr     r6, r0, #31
        lsl     r0, r3, #5
        str     r0, [sp]
        ldr     r0, [sp]
        ldr     r1, [sp, #4]
        sub     r0, r0, r3
        sbc     r1, r1, r4
        str     r0, [sp]
        str     r1, [sp, #4]
        ldr     r1, [sp]
        ldr     r7, [sp, #4]
        lsr     r0, r1, #30
        lsl     r2, r7, #2
        orr     r2, r2, r0
        ldr     r0, [sp]
        lsl     r1, r0, #2
        mov     r0, r1
        mov     r1, r2
        add     r0, r0, r3
        adc     r1, r1, r4
        lsr     r4, r0, #29
        lsl     r3, r1, #3
        orr     r3, r3, r4
        ldr     r1, [sp, #12]
        lsl     r2, r0, #3
        add     r5, r5, r2
        adc     r6, r6, r3
        add     sp, sp, #28
        str     r5, [r1]
        str     r6, [r1, #4]
        @ sp needed for prologue
        pop     {r4, r5, r6, r7, pc}
        .size   test, .-test
        .ident  "GCC: (GNU) 4.4.3 20091217 (prerelease)"


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42499


  parent reply	other threads:[~2010-01-05 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-25 10:12 [Bug rtl-optimization/42499] New: " sliao at google dot com
2009-12-31 15:30 ` [Bug rtl-optimization/42499] " rguenth at gcc dot gnu dot org
2010-01-05 18:28 ` ramana at gcc dot gnu dot org [this message]
2010-01-07 12:44 ` sliao at google dot com
2010-01-07 12:55 ` sliao at google dot com

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=20100105182835.20582.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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: link
Be 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).