public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001153] New: HAL_DISABLE_INTERRUPTS not working as expected
@ 2011-02-16 13:43 bugzilla-daemon
  2011-02-16 14:59 ` [Bug 1001153] " bugzilla-daemon
  0 siblings, 1 reply; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-16 13:43 UTC (permalink / raw)
  To: unassigned

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

           Summary: HAL_DISABLE_INTERRUPTS not working as expected
           Product: eCos
           Version: CVS
          Platform: stm32e_eval (ST STM3210E EVAL board)
        OS/Version: Cortex-M
            Status: UNCONFIRMED
          Severity: critical
          Priority: low
         Component: HAL
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: uholeschak@bihl-wiedemann.de
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


The macro

# define HAL_DISABLE_INTERRUPTS(__old)          \
    __asm__ volatile (                          \
        "mrs    %0, basepri             \n"     \
        "mov    r1,%1                   \n"     \
        "msr    basepri,r1              \n"     \
        : "=r" (__old)                          \
        :  "r" (CYGNUM_HAL_CORTEXM_PRIORITY_MAX)\
        : "r1"                                  \
        );

is not working as expected if the compiler uses the same register for input and
output argument. In this case the basepri is not modified because the input
register is overwritten with the old basepri value before the assignment.
The following modification fixes this problem:

# define HAL_DISABLE_INTERRUPTS(__old)          \
    __asm__ volatile (                          \
        "mrs    r2, basepri             \n"     \
        "mov    r1,%1                   \n"     \
        "msr    basepri,r1              \n"     \
        "mov    %0, r2                  \n"     \
        : "=r" (__old)                             \
        :  "r" (CYGNUM_HAL_CORTEXM_PRIORITY_MAX)\
        : "r1", "r2"                            \
        );

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001153] HAL_DISABLE_INTERRUPTS not working as expected
  2011-02-16 13:43 [Bug 1001153] New: HAL_DISABLE_INTERRUPTS not working as expected bugzilla-daemon
@ 2011-02-16 14:59 ` bugzilla-daemon
  0 siblings, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-16 14:59 UTC (permalink / raw)
  To: unassigned

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

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2011-02-16 14:59:38 GMT ---
Thank you for the bug report.

I am marking this as a duplicate of bug 1001154 (rather than vice-versa) since
marking the operand as an earlyclobber operand seems more elegant.

*** This bug has been marked as a duplicate of bug 1001154 ***

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug 1001153] HAL_DISABLE_INTERRUPTS not working as expected
  2011-02-16 13:43 [Bug 1001153] New: " bugzilla-daemon
@ 2011-02-16 14:59 ` bugzilla-daemon
  0 siblings, 0 replies; 3+ messages in thread
From: bugzilla-daemon @ 2011-02-16 14:59 UTC (permalink / raw)
  To: ecos-bugs

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

John Dallaway <john@dallaway.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #1 from John Dallaway <john@dallaway.org.uk> 2011-02-16 14:59:38 GMT ---
Thank you for the bug report.

I am marking this as a duplicate of bug 1001154 (rather than vice-versa) since
marking the operand as an earlyclobber operand seems more elegant.

*** This bug has been marked as a duplicate of bug 1001154 ***

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-16 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-16 13:43 [Bug 1001153] New: HAL_DISABLE_INTERRUPTS not working as expected bugzilla-daemon
2011-02-16 14:59 ` [Bug 1001153] " bugzilla-daemon
2011-02-16 13:43 [Bug 1001153] New: " bugzilla-daemon
2011-02-16 14:59 ` [Bug 1001153] " bugzilla-daemon

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).