https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65105

            Bug ID: 65105
           Summary: [i386] XMM registers are not used for 64bit
                    computations on 32bit target
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: enkovich.gnu at gmail dot com

XMM registers may be used for 64bit operations on 32bit target.  It should make
code faster and free some GPRs.

Here is an example test where GCC doesn't use XMM registers and possible code
with XMM usage:

>cat test.c
long long
test1 (long long x, long long y, long long z)
{
  return ((x | z ) + (y & z) - z);
}
>cat test_xmm.s
        .file "test.c"
        .text
        .globl test1
test1:
        movq      4(%esp), %xmm2
        movq      20(%esp), %xmm1
        movq      12(%esp), %xmm0
        por       %xmm1, %xmm2
        pand      %xmm1, %xmm0
        paddq     %xmm0, %xmm2
        psubq     %xmm1, %xmm2
        movd      %xmm2, %eax
        psrlq     $32, %xmm2
        movd      %xmm2, %edx
        ret

Reply via email to