Feature request: Set the direction flag on x86/x64 register->register operations

Jan Beulich jbeulich@novell.com
Tue Dec 2 09:03:00 GMT 2008


>>> Stefan Dösinger<stefan@codeweavers.com> 01.12.08 22:29 >>>
>> >> Is this safe? So far I haven't run the gas testsuite yet
>> 
>> You'd have to prove it.
>I ran the testsuite in the meantime and found a few bugs: I have an
>updated, but still imperfect patch attached(the modification of the tests
>and 16 bit movs).

You mean 16-bit stuff not done, yet? Because that's how the patch looks
like.

>> First of all you'd need to complete what you started: Your patch
>> apparently
>> only cares about 32- and 64-bit register operands at present, but
>> should
>> in particular also deal with 16-bit ones (i.e. it should be generalized,
>> since
>> if the command line option you propose is passed, the user ought to be
>> allowed to expect that *all* code gets handled the alternative way).
>I have to double check what I actually want in that case, and see how
>msvc handles these cases, and then think how to keep the behavior
>consistent. (Microsoft software doesn't always show consistent behavior
>unfortunately)

But the option to be use should be descriptive of the functionality: If you
keep the name, you ought to consistently set the D bit. If you want to
match some sort of inconsistent behavior, then the option name ought to
reflect that. But honestly, in such a case I would be inclined to recommend
to H.J. to not accept the patch.

>The testsuite now seems to pass if I force the change on, of course if the
>opcodes that the patch intentionally changes are "fixed" in the testsuite.
>I'll add a new test instead of modifying the existing ones.

Of course, as you don't want to force the option on in what you may
eventually commit - it would be just the new test case(s) that make use of
the option.

Jan



More information about the Binutils mailing list