PATCH: PR gas/1874: mwait/monitor don't work in 64bit

H. J. Lu hjl@lucon.org
Wed Nov 16 17:19:00 GMT 2005
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.


H.J.



More information about the Binutils mailing list