This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [m68k]: convert mode 5 addressing w/zero offset into mode2


Ian Lance Taylor <ian@wasabisystems.com> writes:

> Peter Barada <peter@the-baradas.com> writes:
>
>> This following patch converts:
>> 
>>      <op> 0(%Ay),%Rx
>>      <op> %Ry,0(%Ax)
>>      <op> 0(%Ay),0(%Ax)
>> 
>> into:
>> 
>>      <op> (%Ay),%Rx
>>      <op> %Ry,(%Ax)
>>      <op> (%Ay),(%Ax)
>> 
>> To reduce the size of the instruction by the word used to hold the
>> offset.
>
> This kind of patch makes me nervous.  Sometimes people write assembler
> code with the full intention of generating a specific addressing mode,
> even if it is apparently less efficient.  I'm not sure it is
> appropriate for the assembler to second-guess the programmer in a case
> like this.

I had the same concern, but you can disable this optimization by writing
0:w instead of 0.  This is in par with other kinds of optimizations that
only happen when using unspecified size operands.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]