[ros-dev] Re: [ros-svn] [royce] 14523: patch by kjk::hyperion,
fix syntax of gcc inline asm
Hartmut Birr
hartmut.birr at gmx.de
Wed Apr 6 17:52:55 CEST 2005
Filip Navara wrote:
> royce at svn.reactos.com wrote:
>
>> patch by kjk::hyperion, fix syntax of gcc inline asm
>>
>>
>> Updated files:
>> trunk/reactos/hal/halx86/include/hal.h
>>
>>
> This is not acceptable solution IMHO...there are problems with certain
> GCC versions assigning AMD64 registers on i386. See revision 13587 and
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10153.
>
> - Filip
Hi,
I think that the "0" in the output operand is the problem (same register
like input).
__asm__ __volatile__("movb %%fs:(%1),%0":"=q" (b):"0" (offset));
Gas is sometimes a little bit buggy and puts the same value frome the
first operand the second. This results in message like this:
{standard input}: Assembler messages:
{standard input}:2474: Error: `%fs:(%bl)' is not a valid base/index
expression
The correct workeround is something like this:
__asm__ __volatile__("movb %%fs:(%1),%0":"=q" (b):"r" (offset));
or
__asm__ __volatile__("movb %%fs:(%1),%0":"=r" (b):"r" (offset));
- Hartmut
More information about the Ros-dev
mailing list