This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping Patch: PR target/24879: SSE3 intrinsic bug
- From: Ian Lance Taylor <ian at airs dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 02 May 2006 14:49:13 -0700
- Subject: Re: Ping Patch: PR target/24879: SSE3 intrinsic bug
- References: <20060116191206.GA12703@lucon.org> <20060217140527.GA17200@lucon.org> <m3odyh3p4j.fsf@gossamer.airs.com> <20060502185126.GA12653@lucon.org>
"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