[rtems commit] i386: Fix _CPU_Bitfield_Find_first_bit()
Sebastian Huber
sebh at rtems.org
Mon Jun 13 11:22:43 UTC 2016
Module: rtems
Branch: master
Commit: 3bf9fdbe040136753e6a2c809bd18a44ac5fac03
Changeset: http://git.rtems.org/rtems/commit/?id=3bf9fdbe040136753e6a2c809bd18a44ac5fac03
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Jun 13 09:46:17 2016 +0200
i386: Fix _CPU_Bitfield_Find_first_bit()
Bug introduced by b04b76c6a0c87ffc9670d356e793108411ce355a.
---
cpukit/score/cpu/i386/rtems/score/cpu.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
index 3f0e336..6cfeee6 100644
--- a/cpukit/score/cpu/i386/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
@@ -552,14 +552,13 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
#define _CPU_Bitfield_Find_first_bit( _value, _output ) \
{ \
- register uint16_t __value_in_register = (_value); \
- \
- _output = 0; \
- \
+ register uint16_t __value_in_register = ( _value ); \
+ uint16_t __output = 0; \
__asm__ volatile ( "bsfw %0,%1 " \
- : "=r" (__value_in_register), "=r" (_output) \
- : "0" (__value_in_register), "1" (_output) \
+ : "=r" ( __value_in_register ), "=r" ( __output ) \
+ : "0" ( __value_in_register ), "1" ( __output ) \
); \
+ ( _output ) = __output; \
}
/* end of Bitfield handler macros */
More information about the vc
mailing list