Re: [BUG FIX] Make x86_32 uni-processor Atomic ops, Atomic

From: H. Peter Anvin
Date: Tue May 26 2009 - 13:13:37 EST


Michael S. Zick wrote:
>
> Disassembly of section .text:
>
> 00000000 <diff_umask>:
> 0: 8b 44 24 0c mov 0xc(%esp),%eax
> 4: 8b 4c 24 04 mov 0x4(%esp),%ecx
> 8: 8b 10 mov (%eax),%edx
> a: 8d 04 11 lea (%ecx,%edx,1),%eax
> d: 8b 54 24 08 mov 0x8(%esp),%edx
> 11: 2b 02 sub (%edx),%eax
> 13: 21 c8 and %ecx,%eax
> 15: c3 ret
>
> = = = =
>
> Checking the byte string 0x8d, 0x04, 0x11 against the Intel
> documentation shows that the disassembly output of objdump
> is incorrect - that bit string does not have an offset field.
> That is the byte encoding for the gcc assembly input.
>
> What's a person to do when the tool-chain lies?
>

The ,1 isn't an offset field... it's a scale factor.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/