This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 00/46] Implement MMX intrinsics with SSE
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 4 Feb 2019 10:10:06 +0100
- Subject: Re: [PATCH 00/46] Implement MMX intrinsics with SSE
- References: <20190201211809.963-1-hjl.tools@gmail.com>
On Fri, Feb 1, 2019 at 10:18 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On x86-64, since __m64 is returned and passed in XMM registers, we can
> implement MMX intrinsics with SSE instructions. To support it, we disable
> MMX by default in 64-bit mode so that MMX registers won't be available
> with x86-64. Most of MMX instructions have equivalent SSE versions and
> results of some SSE versions need to be reshuffled to the right order
> for MMX. Thee are couple tricky cases:
I don't think we have to disable MMX registers, but we have to tune
register allocation preferences to not allocate MMX register unless
really necessary. In practice, this means to change y constraints to
*y when TARGET_MMX_WITH_SSE is active (probably using enable
attribute). This would solve problem with assembler clobbers that Andi
exposed.
Uros.