public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001528] compat/posix: porting to GCC 4.6
Date: Tue, 13 Mar 2012 12:34:00 -0000	[thread overview]
Message-ID: <20120313123416.E13922F78001@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001528-104@http.bugs.ecos.sourceware.org/>

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001528

--- Comment #3 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2012-03-13 12:34:09 GMT ---
Sorry, for delayed answer. Snippets are below:

 tests/signal2.c:128
    volatile int x;
    volatile CYG_ADDRESS p=(CYG_ADDRESS) &jbuf;

    do
    {
        x = *(volatile int *)(p);
        p += (CYG_ADDRESS)0x100000;
    } while( p != (CYG_ADDRESS)&jbuf );

 GCC 4.3 (-O2)
 16c:   e58d400c        str     r4, [sp, #12]
 170:   e1a00004        mov     r0, r4
 174:   e59d300c        ldr     r3, [sp, #12]
 178:   e5932000        ldr     r2, [r3]
 17c:   e58d2010        str     r2, [sp, #16]
 180:   e59d300c        ldr     r3, [sp, #12]
 184:   e2833601        add     r3, r3, #1048576        ; 0x100000
 188:   e58d300c        str     r3, [sp, #12]
 18c:   e59d200c        ldr     r2, [sp, #12]
 190:   e1500002        cmp     r0, r2
 194:   1afffff6        bne     174 <main+0x174>

 GCC 4.6 (-O2)
 158:   e58d4014        str     r4, [sp, #20]
 15c:   e59d3014        ldr     r3, [sp, #20]
 160:   e5933000        ldr     r3, [r3]
 164:   e58d3010        str     r3, [sp, #16]
 168:   e59d3014        ldr     r3, [sp, #20]
 16c:   e2833601        add     r3, r3, #1048576        ; 0x100000
 170:   e58d3014        str     r3, [sp, #20]
 174:   e59d3014        ldr     r3, [sp, #20]
 178:   e1540003        cmp     r4, r3
 17c:   1afffff6        bne     15c <main+0x15c>

Thus, new compiler uses less registers, but, GCC 4.6 provides the same
functionality (I tested the loop in GDB, and I got `sigbus' call at the
end with new code). Though, you are right, a using CYGBLD_ATTRIB_UNUSED
for the forced volatile variables would break smart things.

Then, maybe leave signal2 test without the changes as I tested the code
for one CPU only? What is your verdict?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

  parent reply	other threads:[~2012-03-13 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 20:27 [Bug 1001528] New: " bugzilla-daemon
2012-03-11 23:19 ` [Bug 1001528] " bugzilla-daemon
2012-03-12 17:36 ` bugzilla-daemon
2012-03-13 12:34 ` bugzilla-daemon [this message]
2012-03-13 14:27 ` bugzilla-daemon
2012-03-13 14:54 ` bugzilla-daemon

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=20120313123416.E13922F78001@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.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).