Ping Patch: PR target/24879: SSE3 intrinsic bug

Ian Lance Taylor ian@airs.com
Tue May 2 21:49:00 GMT 2006


"H. J. Lu" <hjl@lucon.org> writes:

> On Mon, May 01, 2006 at 11:41:16PM -0700, Ian Lance Taylor wrote:

> > I don't understand why the definition of __builtin_ia32_monitor and
> > __builtin_ia32_mwait change for 64-bit mode.  As I understand it, they
> > always take two SImode values.  So it seems to me that the type should
> > be the same for both, whether you are in 32-bit mode or 64-bit mode.
> > 
> 
> The IA32 SDM isn't very clear for this. I have checked with our chip
> people.  The 64bit version should be
> 
> 	mwait  %rax,%rcx
> 	monitor %eax,%rcx,%rdx

Yes, I believe I understand that.  But my understanding is that
despite the use of 64-bit registers for the final two arguments of
each instruction, only the low order 32-bits are significant.
Therefore, it seems to me that the builtin function (not the
instruction; the builtin function) should always use a 32-bit
parameter type, whether you are doing a 32-bit build or a 64-bit
build.  That is the part of your patch that I am questioning.

Ian



More information about the Gcc-patches mailing list