This is the mail archive of the binutils@sourceware.org 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: PATCH: PR gas/1874: mwait/monitor don't work in 64bit


>>> "H. J. Lu" <hjl@lucon.org> 16.11.05 18:19:21 >>>
>On Wed, Nov 16, 2005 at 06:12:30PM +0100, Jan Beulich wrote:
>> >Are you saying "monitor %eax,%ecx,%edx" should be allowed in 64bit
>> >mode? Why? How will it be used?
>> 
>> Just like any other 32-bit addressing in 64-bit mode: probably
rarely,
>> but it should be allowed for whoever is able to find meaningful use
for
>> this. We also don't disallow 16-bit addressing in 32-bit mode, even
>> though it's unlikely to ever be used...
>
>I disagree. In 64bit mode, the correct way to use monitor is
>
>	load %rax
>	load %edx
>	load %ecx
>	monitor %rax, %edx, %ecx # It is the same as "monitor".
>
>It is misleading and confusing to do
>
>	load %eax
>	load %edx
>	load %ecx
>	monitor %eax, %edx, %ecx
>
>Assembler will generate the same opcode for those forms anyway. I
don't
>see why "monitor %eax, %edx, %ecx" has to be allowed in 64bit.

That's what's wrong - the second form should emit an address size
override.

Jan


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